Announcement

Collapse
No announcement yet.

Server Performance and Your Missions

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Server Performance and Your Missions

    This evening we tried playing a new custom mission by one of our members. The performance was awful. It made me realize that many mission makers in our community (and including me in the past) try to put too much load on the server.

    -How to monitor server performance...
    use the "#monitor x" command to monitor server performance when you are an admin. Where "X" is the time in seconds when performance information is displayed. So "#monitor 15" would display performance information every 15 seconds. What you want to pay attention to in the data line listed is the server frames per seconds (listed as "FPS").

    -Performance goals...
    Anything below 15 FPS on a server is considered unplayable and laggy. You should shoot to have 30 FPS. (and note, Domination and Evolution with 30 people CANNOT meet this even on the best of servers. I don't know why Xeno or KillJoy made them to support 30 or 40 people). The mission we tested tonight (with about 30 people I think) was running at 4 or 5 FPS. If a mission is performing at this level ANY time during it use.. that mission should be considered broken and in need of revision.


    -Where to get help
    If you are unsure how to improve your mission, you should get in touch with someone from the mission development team here at TG to advise you on your mission. I am currently the Head of Mission Development, so feel free to PM me or try and catch me on Teamspeak. Otherwise, you can ask an admin to put you in touch with someone else from the mission development team.


    -General Guidelines..
    This is hard to gauge. I'm not going to kid you, even I don't have the servers "feeled out" for what they can do in every situation. Its an art form you pick up based off mission editing experience and playing on the server. But, in general, you should use the stock missions B.I. Studios makes for ArmA as a guide to what you can do with the editor. And personally, I would suggest that you ALWAYS design with the idea in mind that you will probably over do it and will need to thin out your mission.

    If you want to make a 30 or 40 player coop. mission. You probably shouldn't be going over 100 enemy. And even those should be spread out over a 1000 meter or 2000m area. If you cram 100 enemy into a city.. you will lag the server out.

    -quantity of action...
    Remember, not just large player counts or enemy counts can lag servers. Player activity can do it too. If you have 20 players tightly together all firing their weapons at the same time, I can assure you that the server will take a dent in performance. So when you can, try to spread out the action for players on a large player count coop mission. And honestly, anything over 10 players should be considered large in coop. And remember scripts! How many scripts do you have running? Remember each trigger active in a mission is check EVERY SECOND by the server. 100 triggers.. 100 to check EVERY SECOND. It adds up quick.

    -The real scale of arma...
    Remember, ArmA is really a squad or platoon level combat simulator. Large domination style maps should really be avoided for larger player count missions (30-60 etc.). Remember, there not limit to what you can put on the editor screen and every mission editor is guilty of over loading missions when they first start. Don't be afriad to make missions "too easy". Lighten up on A.I. Try to use the minimal amount of forces necessary to do a mission. Also, consider having less objectives.

    -Good example...
    A good example of missions, from what I've seen, are the Sim HQ missions. They will usually maintain 30-40 FPS on a server while being played with several people. Maybe download them from Armaholic and check them out.

    Hope this helps,

    General.
    Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. - General George S. Patton.

  • #2
    Re: Server Performance and Your Missions

    Yea sorry about that guys, didn't mean to try to melt the server.. Oh if the admins want to remove F16TAC_CoOp47_TheLZ_v3 please do unless your playing it with 10< players nothing good will happen. v4 is fixed and in the mission thread.

    Comment


    • #3
      Re: Server Performance and Your Missions

      Well considering this is all I focus on most of the time when editing. If you want to steer away from inconsistencies and bugs. Don't USE ANYTHING made by BIS, that means all the modules and functions library, gone. They all have memory leaks.

      But on a more probably relevant note, centralise your while loops, check your code with -showScriptErrors, an error creates 200% more lag than a laggy piece of code. Nothing wrong with scripts, you can make a less-laggy mission with scripts.

      Spawn and de-spawn groups. Delete unused groups. Refrain from having AI moving everywhere all the time. Pathfinding and general AI alertness takes up 75% more persistent CPU cycles than an idle AI. Make it zone dependant. (For patrols, sync all the patrol waypoints to a BLUFOR present trigger, so the AI are not moving unless the player is within the area.)

      Delete everything that is unused. Save on compilation times. Etc Etc.
      Put everything you can on the client side, if it makes the client lag, then it shouldn't be used.

      Below 10FPS, the server can no longer send out the messages to all players each CPU cycle, therefore no internet connection will change the desync experienced.

      Comment


      • #4
        Re: Server Performance and Your Missions

        Also, use triggers sparsely. A sleep isn't very demanding for the server to handle. To every frame check the condition of all triggers in the mission is server-stressing though. Never have more triggers in the mission than you need to. If possible, create triggers only when you need them. You'll be surprised at the difference it can make.



        Comment


        • #5
          Re: Server Performance and Your Missions

          I have to admit i just don't get our servers at all, my old mission where AI were created an marched towards you every 2min we had about 500 AI shooting at us and 20 people on the server and it was getting 22FPS, it was set to 2000 view distance and the AI skill was set to the middle value it gives you when you just place a random unit. My 2 UPS missions with about a 1/8 of the amount of AI run at like 15FPS and even though i don't notice any difference ill take people word that that is almost unplayable. Now what this has led me to believe is that the amount of AI is not that taxing on the server and that it has much more to do with the scripts. I think it would be nice if the admins let us melt a server one afternoon for fun and for testing to see if we can find a way around this. One thing i have noticed is any BIS this other then command interface will kill the server like rommel said.
          I know UPS is VERY taxing as my computer can hardly run the missions when i finished them, and marine was complaining about the same problem when he updated the missions, and had a massive amount of AI, I cant wait till we actually play it. A 70 player mission with 50+ groups of AI all using UPS, now THAT will be a stress test.
          Of course i have no idea whatsoever with anything about scripting or running a server in arma so ill shut up now.

          Comment


          • #6
            Re: Server Performance and Your Missions

            Yeah, scripts like UPS should be limited to only a few squads. One possible solution is to have some 'key' squads work with UPS while the rest work with a Move->Cycle waypoint loop with as large placement radius on both as seen fit, then have a Switch waypoint controlled by an Enemy Detected trigger, leading to Guard or Hold waypoints.

            It is a reasonably well functioning way of making them patrol and protect, although not as awesome as UPS is. A mix of both is both nice on performance and quite nice for effect.



            Comment


            • #7
              Re: Server Performance and Your Missions

              FYI triggers are checked every 0.5 seconds in Arma2(and I believe also in Arma), not every frame, so their performance hit isn't quite as bad as people think.

              Source: BIS Wiki

              Comment


              • #8
                Re: Server Performance and Your Missions

                Ahh. Thanks for the correction. Fact remains though that trigger-heavy missions tend to run worse than those light on triggers. Obviously this is most relevant for triggers that has to do with units (like checking against thisList). Triggers checking against a couple of variables aren't having any real impact. Those working against units do.



                Comment


                • #9
                  Re: Server Performance and Your Missions

                  From my experience, server performance is directly related to the number of players and the number of AI.

                  If you have 10 players, 400 AI is fine, 20 players, 250 AI, 30 players, 100 AI, 40+, it struggles with even 50 AI.

                  Large scale coop missions are very difficult to design because of this.

                  Comment


                  • #10
                    Re: Server Performance and Your Missions

                    one effective method in designing large scale CoOp missions is using the 3D editor by pressing alt+e in the main menu screen in game. The 3D editor generates a .sqf script in the mission directory where you have the capability to execute the script whenever you want in your mission. That way, if you have multiple objectives in different locations, you can spawn in 50 AIs whenever blufor/opfor/ind is near a particular objective and then spawn the other 50 in the next objective. Very powerful tool to use to make missions efficient.


                    IN GAME ARMA: |TG-Irr| Lq.Snake

                    Comment


                    • #11
                      Re: Server Performance and Your Missions

                      Originally posted by nthamma View Post
                      one effective method in designing large scale CoOp missions is using the 3D editor by pressing alt+e in the main menu screen in game. The 3D editor generates a .sqf script in the mission directory where you have the capability to execute the script whenever you want in your mission. That way, if you have multiple objectives in different locations, you can spawn in 50 AIs whenever blufor/opfor/ind is near a particular objective and then spawn the other 50 in the next objective. Very powerful tool to use to make missions efficient.
                      I did this in my Red October mission to great effect, the mission is like 50 player with 250 ai~

                      Comment


                      • #12
                        Re: Server Performance and Your Missions

                        Originally posted by GeneralCarver View Post
                        -Performance goals...
                        Anything below 15 FPS on a server is considered unplayable and laggy. You should shoot to have 30 FPS. (and note, Domination and Evolution with 30 people CANNOT meet this even on the best of servers. I don't know why Xeno or KillJoy made them to support 30 or 40 people). The mission we tested tonight (with about 30 people I think) was running at 4 or 5 FPS. If a mission is performing at this level ANY time during it use.. that mission should be considered broken and in need of revision.
                        Well, Domination runs fine with 40 players on our server (which is a Core i7 920), 15 or more server cycles (FPS) is no problem at all. I even managed it to play a coop mission with 60 players and had 15+ FPS on the server the whole evening. 50 player coop missions are no problem at all, played a lot allready with no chains at all.
                        Dom at mission start, if you are alone on the server, runs smooth at 50 FPS serverside with all AI units spawned.

                        It takes a long time to find the best settings for the server, but, it also needs a lot of work to get a mission right (and no, I'm not talking about me but the average mission maker).
                        Compared to A1 you can't place 144 groups in MP missions, it simply doesn't work anymore.
                        The A2 AI eats up a lot of performance.
                        It took me quite some time and a lot of tests and a lot of other optimizations, like optimizing scripts or converting scripts to FSM, to bring back performance.
                        Specially scripts are now underlying new rules. They have only a little time slice per frame to get their stuff done, otherwise further execution gets pushed to the next frame which means, expensive operations can be delayed for several seconds.

                        So keep your missions simple or try to find a way to optimize your missions. There is no need to place AI at targets which are not yet visible or simply spoken, try to spawn AI wherever possible (and remove dead AI as soon as possible).
                        And another hint, don't use BI modules in MP. They either don't work in MP or cause massive lags like the animals module.

                        Xeno

                        Comment


                        • #13
                          Re: Server Performance and Your Missions

                          Agreed with all points there; especially this equation.

                          n(Groups) ∝ n(FPS drop)

                          Whilst groups has the higher lag coefficient, number of units within a group if decreased can increase client side performance very efficiently. Therefore, use entire platoons for groups, but have them spawn at a distance, with the group leader holding the position (presuming you want persistent units).

                          FYI: FSM are just a visual way of doing SQF; no performance difference (quote BIS).
                          Last edited by Rommel; 11-01-2009, 06:20 PM.

                          Comment

                          Connect

                          Collapse

                          TeamSpeak 3 Server

                          Collapse

                          Advertisement

                          Collapse

                          Twitter Feed

                          Collapse

                          Working...
                          X