Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 32

Thread: How to increase dedicated server FPS

  1. #11
    The bottleneck (thread that runs 25% aka 1 core) is clearly the AI thread. You can easily see it if you test different amounts of AI. Once the AI thread starts running 100% of the time, the more AI you add you will actually see less CPU usage, as AI thread continues to run 100% of the time but FPS goes down meaning other threads run a lower % of the time. This doesn't just happen on servers, happens on hosted servers and single player as well.

    The only real solution is to get a faster CPU (not more cores, but simply a faster one) or wait for the Messiah to arrive and re-program Arma 2's AI so that it uses more than 1 thread (or at least makes it less heavy on the CPU).

    If you're getting low FPS in a mission with absolutely no AI then I really don't know what to say.

    Scripts, assuming they aren't running through dirty hacks like using eventhandlers and the likes to get extra runtime, are actually not allowed to run long enough to affect FPS. Instead the game engine just makes the scripts run less. This can be easily tested by spawning a lot of scripts that run infinite loops that do nothing and see how your FPS remains the same (though other scripts that are running may become slow/unresponsive).

  2. #12
    Quote Originally Posted by Terox View Post
    A mission which basically stresses all elements of the .cfg settings
    I doubt that the problem is with the .cfg settings as I barely use networking now. What kind of data output you get via #monitor? I have around 1800 Kbps when the mission runs in its full glory.

    Quote Originally Posted by Terox View Post
    Thats bloody unusual, they are exactly the same settings we use and I mean exactly. I dont think its as optimised as it could be though
    Probably I took them from the same place...

    ---------- Post added at 06:40 PM ---------- Previous post was at 06:22 PM ----------

    Quote Originally Posted by galzohar View Post
    The bottleneck (thread that runs 25% aka 1 core) is clearly the AI thread. You can easily see it if you test different amounts of AI.
    If its true, it does that in a strange way. I just tried respawning one side's entire army, destroying all vehicles and units when the mission was already running for a long time. It means removing hundreds of units and vehicles at once. It had no hit on the server FPS. So what is going on here?

    Quote Originally Posted by galzohar View Post
    The only real solution is to get a faster CPU (not more cores, but simply a faster one) or wait for the Messiah to arrive and re-program Arma 2's AI so that it uses more than 1 thread (or at least makes it less heavy on the CPU).
    This is indeed the best hardware option. The devs said something that the next betas are going to speed up AI pathfinding... fingers crossed.

    Quote Originally Posted by galzohar View Post
    If you're getting low FPS in a mission with absolutely no AI then I really don't know what to say.
    I get a decent server FPS with no AI. My question is more about how to improve FPS with lots of units. For example, if I change group waypoints less frequently, it may have an impact on AI pathfinding. Does it matter? From the experiment above, it does not. So only the number of AI units counts?

    Quote Originally Posted by galzohar View Post
    Scripts, assuming they aren't running through dirty hacks like using eventhandlers and the likes to get extra runtime, are actually not allowed to run long enough to affect FPS. Instead the game engine just makes the scripts run less. This can be easily tested by spawning a lot of scripts that run infinite loops that do nothing and see how your FPS remains the same (though other scripts that are running may become slow/unresponsive).
    Thanks for sharing this insight. I suspected something alike, so until scripts do finish in a reasonable time, I should not worry about them.

  3. #13
    The only reason to be worried about scripts is that if a script takes up too much of the "script runtime", other scripts might lag. But FPS and network communication will remain untouched. Of course some scripting commands can cause FPS drops or network traffic, like a script that spams creating vehicles or publicVariable, but "normally", scripts won't do that.

    It seems that any kind of moving AI is causing pain, especially in urban areas. I'm not sure but it seems that even static AI in urban areas can cause some pain. It also gets much worse if they detect an enemy inside that urban area, FPS can go down to 1/2 of its original value then (though this might be because UPSMON then sends other groups to attack you, but then again those groups should've already been moving).

    Another thing I noticed at one of my tests is that when I was using ungrouped AI, I could place more AI on the map while getting the same server FPS (as in, 75 AI each in his own group seemed to have given more FPS than having 75 AI grouped in various group sizes). This was a very specific test, though, and might not always be true, but is another thing you can try.


    All in all I really do hope they improve AI pathfinding. There are a lot of mission ideas I'm not implementing simply because of that limitation.

  4. #14
    This is strange isn't it.

    We got a i7 960 with 12GB memory, win7 64 and we run most missions at 50FPS.
    All 4 cores active. Turned of HyperThreading in the BIOS.

    The network traffic is between 150k and 8500k from the server.
    Artificial intelligence is no match for natural stupidity

    NoPryl of Norway

  5. #15
    I had the impression that only 2 cores would be used by a server. My server have nerver used more than 2 of the four cores, no matter what. Affinity set to four cores it will use 1 core fully and 1 core aprx 30 to 50%. Setting afinity to 2 cores seems to spread the load more evenly over the 2 cores. Never seen it use all 4 cores.
    Play pc:
    I7 2600K@4.6GHz
    Nvidia gtx680
    Intel 160gb ssd
    16gb DDR3 1600Mhz ram
    win7 64
    ---------
    Dedi Server: (91.100.101.163)
    I7 875K@4.1GHz
    Intel 250gb ssd sata3
    8gb ram
    win7 64

  6. #16
    used all 4 cores with -exThreads=7
    Don't know why tho...

  7. #17
    Quote Originally Posted by galzohar View Post
    Of course some scripting commands can cause FPS drops or network traffic, like a script that spams creating vehicles or publicVariable, but "normally", scripts won't do that.
    Even if the FPS is dependent on mostly AI pathfinding, in the end, the scripts *do* influence FPS by making the choices to do a lot of pathfinding. So it is worthy to know what is actually making the server running slow. Your observations about AI in urban areas is important, however I do not understand why a standing unit in a town is consuming more time.

    ---------- Post added at 02:33 AM ---------- Previous post was at 02:32 AM ----------

    Quote Originally Posted by NoBrainer View Post
    used all 4 cores with -exThreads=7
    Don't know why tho...
    I believe -exThreads=7 is the automatic choice with 4 cores. And the server actually runs 4 active threads, so it is obviously distributed amongst the cores. But do they all run on 100%? I doubt it. I also doubt that you can run Benny's Warfare with 50 FPS, especially with hard resistance/occupation defenses.
    Last edited by Proton; Jul 25 2010 at 01:36.

  8. #18
    however I do not understand why a standing unit in a town is consuming more time.

    IIRC, the AI code does include some aspect of detecting possible directions of threat and enemy lines of fire. In addition, AI clearly have 'lines of sight'. In an urban area, that's more complex because you need to figure out how all those buildings occlude you.

    Whether those things are active during 'safe' mode I don't know - you could try changing the mode of the soldier from safe to danger and back again to test.
    Author of PVPmissionWizard ArmA2FPSAnalyser AddonChecker and ... squint

    Tools homepage

    Crosseyed and Painless - a blog about my ArmA2 developments



  9. #19

    Post

    Here is the result of a small study I made over the weekend.

    I use a modded Warfare mission on Chernarus with the latest beta (72197) of OA, where each town immediately spawns all defending teams. The mission was started by a client, who immediately disconnected after start (server is persistent DS). I measured the performance in the first couple of minutes after that.

    Considered parameters:

    1. Hardware/OS. Two pieces were used, one running Q6600/XP64 Pro, the other one is i7 920/Win7 64-bit.
    2. Number of groups/units created. Each group consists of 6-12 units. I tried 30 and 120 groups.
    3. The effect of AI. After creating the groups, one version let the default AI run and created random patrol waypoints for each group which kept them moving. I also set the group behaviour to "COMBAT", but this was almost immediately set back by engine to AWARE for most groups.
      The other, "AI disabled" version immediately sets the group behaviour to SAFE, and issues
      Code:
      { doStop _x;
      _x disableAI "TARGET";
      _x disableAI "AUTOTARGET";
      _x disableAI "MOVE";
      _x disableAI "ANIM";
      } foreach (units _team);
    4. Location. One version used a limited distance from town centres which kept all units close to or within town borders. The other one let the groups randomly spawn over the entire map.


    This is 2^4=16 parameter combinations, of which 12 were actually tested. The benchmark consists of 4 parameters:

    1. Real execution time vs. engine time. This measures whether all the scripts could run in their devoted time. Measures were scheduled to run in each 30 seconds via the 'time' function. If the measures executed at longer intervals in real time, it means that the engine was unable to run all scheduled scripts as requested, and the mission will inevitably slow down to a crawl (until it can reduce the data input to match its processing capability), or crash at some point. I waited for at least three measurements.
    2. server FPS via diag_fps,
    3. minimal server FPS via diag_fpsmin,
    4. the running time of a small benchmark script:
      Code:
      for "_i" from 1 to 1000 do { [_i] call {_this} };


    The results are usually getting worse with later measurements as the player teams (controlled by AI here) start buying units and vehicles for themselves.

    Results:



    Conclusions:

    • It is definitely worthy to own the latest hardware for a DS. The i7/Win7 combo seems to handle scripts much better, even when FPS is low - or it just has enough power to finish in the scripting time slice, unlike the Q6600.
    • The single most important factor is the number of units in play. As a rule of thumb, 4x more units make the server run 4x slower, even when the AI is not doing anything!
    • AI seems to have a significant effect, somewhere between 5-10 FPS. However, (at least per-unit) AI calculations seems to come only second to the impact of the actual existence of units.
    • It is not true that towns slow down AI calculations, at least random starts looks like being harder to crunch.


    Two questions remain: why in hell does it matter that a non-moving, non-controlled unit is created? It should be treated like a tree or a house. Why does it push the FPS down almost linearly?

    The other thing I do not really understand yet that why my server goes down to 10 FPS by time, as it rarely have more than 30 of these groups spawned at the same time. Temporal analysis follows.
    Last edited by Proton; Jul 26 2010 at 04:01.

  10. #20
    Purely guessing here, but for the first question:
    - Non-moving unit is not same as a placable object like a house or tree. AI's still carries a lot of logic to loop through even if the response to the logic is filtered to do nothing.
    Last edited by =WFL= Sgt Bilko; Jul 26 2010 at 08:52. Reason: spell check

    ~~ He flung himself upon his camel and rode madly off in all directions ~~

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •