Jump to content
Sign in to follow this  
bluesteel

[Answered] ArmA 2 - Multicore-CPU support flawed? (only 50% CPU usage on quadcore)

Recommended Posts

I have done a few tests with the ArmA 2 multicore support and have to come to the conclusion that there is theoretically room for improvement.

My test scenario is the beginning of campaign mission "Razor Two". This is a large-scale mission, so a lot of AI-scripts should be running in the background. For the sake of testing CPU-performance, I lowered the graphics-settings and set the resolution to 800x600. That should eliminate any GPU-related bottlenecks. I am just standing at the beginning of the mission, looking straight ahead.

System:

Core2Quad Q6600, OC'ed to 3.4GHz

4GB DDR2 Memory

GeForce GTX 260 (192 shadercores)

Windows 7 x64 RC

No background apps like virus scanners, firewalls,...

The framerate hovers around 40fps, CPU usage never goes over 50%:

arma2cpucampaign.png

Pressing Esc to pause (this should also pause the AI scripts) I get 60fps and the CPU usage changes, but still does not go over 50%:

arma2cpucampaignpaused.png

For comparison reasons, if I go to the same position in the editor (empty map), I also get the 60fps from the second example. [before someone asks, this is NOT V-sync-limited, I get 80-150fps when I look into the sky]

What is interesting to note here is that even with the higher CPU load of the AI scripts in the background, the CPU usage never exceeds 50% (2 cores). What I would expect here is the CPU usage going up with increased AI activity instead of the framerate going down.

In a perfect world, all the systems would run in independant threads. So there would be totally independant threads for AI, audio and so on besides the renderer. In that case the renderer could always run at full speed, while the other systems just run on the other available CPU cores. The framerate would only go down, if the other systems actually use up all of "their" CPU cores and the renderer has to sacrifice some of "his" core. I know this is simplified, but otherwise it gets too complicated to explain quickly.

The Real Virtuality engine was obviously not built with multicore-support in mind, at least not when it was started 10 years ago. So I am impressed by the amount of multithreading that BI was able to squeeze in here. At the same time I am curious if there is a simple way to enable even more parallel processing; the fact that performance is capped at 50% CPU usage on a quadcore suggests that there is a small bug somewhere that is limiting the true potential.

Edited by Dwarden

Share this post


Link to post
Share on other sites

can confirm this!

I've got a Q9550 @ 2,83 GHz and mine also never exceeds 50% CPU-usage...

br

Share this post


Link to post
Share on other sites

Hmm i can confirm this for normal games, but how about you try to place a lot of Units on the map and having a huge fight?

EDIT: At least in 1.00 release i was rather convinced that more than 50% was used...

Share this post


Link to post
Share on other sites

This is why min spec is dual-core....1 for micro-AI and 1 for rest.

The only good thing about having quad is your game is less effected by other background applications & OS as they utilize the free CPU power ;).

Share this post


Link to post
Share on other sites

blue u said ur CPU is 3.4 ghz...... maybe thats far more than enuff to play the game, so it never needs more than 50% of ur cpu power? surely this would make u happy? i would look at that an think great, i can leave tab out an load up the sheep porn :)

Share this post


Link to post
Share on other sites

Well, it seems to be using all four cores, so it seems BIS delivered on their promise.

I really don't get the problem here... Maybe the game doesnt need to use more than 50% of the CPU's capacity on a high end Quad core when running at a really low resolution? Did you notice any slow downs? If it ran fine, then why do you want it to use more CPU power?

Share this post


Link to post
Share on other sites

It is about the parallel processing ability of the engine...to keep it simple, Arma2 can have 2 parallel processing. If you have 2 CPUs, ArmA2 uses the CPU speed to the max, 100% utilization and calculate those 2 parallel processes.

The reason you see 50 % is the game utilizes 2 simultaneous cycles but since you did not assign any affinity, those process requests from 2 parallel task is distributed across the 4 cpus thus utilizing 50% of your CPU power.

If you assign 2 cores to ArmA2 you will see that they run @100% and rest at 0% or so.

Sort of like having 1 pepper and 1 salt and 4 arms.. ;)

You cannot double the process by having your other free 2 arms helping the working 2.

Edited by Cross

Share this post


Link to post
Share on other sites

This is how it looks on my PC when 520 AI is running down an airstrip while I fly in an UH-1Y.

cpuarma2.png

Share this post


Link to post
Share on other sites

So you're saying that it's splitting 2 threads across four cores as opposed to having a thread for each core? That's fair enough, but at least it's still splitting the workload out...

Edited by echo1

Share this post


Link to post
Share on other sites
So you're saying that it's splitting 2 threads across four cores as opposed to having four threads for each core? That's fair enough, but at least it's still splitting the workload out...

Yes...and of course it does. Arma1 is doing it as well...You'd see 50% on dualcore and 25% on quadcore. It is not something new.

The new part is engine can now process tasks simultaneously and use the data from each other, from each separate process. ie AI engine & Other engine run separately but talk at some point.

It is about how much one process is linked in the whole structure or one variable is dependent on another that maybe in another core. It is about the design. Less the processes are dependent on each other, easier it is for you to split them and assign to separate processes that may eventually get assigned to a parallel cycle or thread.

For ArmA2 BIS was able to isolate Micro-AI and was able to run it separately on another thread then rest of the game.

Edited by Cross

Share this post


Link to post
Share on other sites
blue u said ur CPU is 3.4 ghz...... maybe thats far more than enuff to play the game, so it never needs more than 50% of ur cpu power? surely this would make u happy? i would look at that an think great, i can leave tab out an load up the sheep porn :)

If it does not need more than those 50%, why would my fps drop then? Besides, with a proper resolution (1680x1050) I get only 25-30fps in that campaign mission; even if I get around 40-50fps when I just stand around at the same spot in an empty map.

What is even more weird btw, I tried disabling 2 cores (changing affinity to only 2 cores) and that yielded extremely much lower fps (went from 50 to 30 in that case) and the CPU usage was down to 25-35%.

To sum this up, when the game has 2 cores availabe, it uses only 50-75% of those two cores. But if it gets 4 cores, it uses only 50% of all 4. Something is seriously wrong with this picture.

Share this post


Link to post
Share on other sites

I'm getting 60-80% on all cores, but i've never seen games max the CPU out.

Now if I used Vegas video editor or photoshop CS 4 they are the only two apps that really max out the CPU.

Share this post


Link to post
Share on other sites

The way ArmA includes "Quadcore" in the recommended system specs, it feels a bit sad that the performance of the render thread goes down so much before even half of the available resources are used up. For me "quadcore" support means that the game uses more than 2 cores, so it should use more than those 50% on my system.

According to several previews/interviews, one of the big things with ArmA 2 was to have the AI running on a separate thread, so it does not slow the game down as much as in ArmA 1. And now we have campaign missions where we have the same problem as before, 30fps with AI and 60fps when the game is paused (and only rendering is going on). I was under the impression that it should stay at 60fps and the AI would be running on one of the other available cores, instead of slowing everything down again.

Share this post


Link to post
Share on other sites

Gents, it's wrong method to judge multicore support by looking at CPU utilization. Games in nature are not Prime95 test that peg CPU 100%. Windows will always split load between available cores. Dual core CPU is not pegged 100% while paying Arma2, so that Quad core could run at 50%.

There are limited number of things that could run concurrently. This is very difficult to accomplish. Intel and Microsoft will soon release multicore compiler as part of Visual C library - this will help a lot. There are very few games that show FPS improvement when going from one to two, then three cores. Unreal3 and Lost Planet are two of them. You get like 20% FPS improvement when going from 1 to 3, and almost none when going from 3 to 4 cores. Unreal3 balances load by splitting main game logic, level unpacking/loading, audio and network code. Don't know much about Lost Planet, but folks at HardOCP seem to think they have done great job at multicore suport.

According to several previews/interviews, one of the big things with ArmA 2 was to have the AI running on a separate thread, so it does not slow the game down as much as in ArmA 1.

That could be the case to some extent, when there is no detection/reaction to human players. When that happens you will have single scheduling que, that cant be run in parallel.

Edited by Skeptic

Share this post


Link to post
Share on other sites
Gents, it's wrong method to judge multicore support by looking at CPU utilization. Games in nature are not Prime95 test that peg CPU 100%. Windows will always split load between available cores. Dual core CPU is not pegged 100% while paying Arma2, so that Quad core could run at 50%.

There are limited number of things that could run concurrently. This is very difficult to accomplish. Intel and Microsoft will soon release multicore compiler as part of Visual C library - this will help a lot. There are very few games that show FPS improvement when going from one to two, then three cores. Unreal3 and Lost Planet are two of them. You get like 20% FPS improvement when going from 1 to 3, and almost none when going from 3 to 4 cores. Unreal3 balances load by splitting main game logic, level unpacking/loading, audio and network code. Don't know much about Lost Planet, but folks at HardOCP seem to think they have done great job at multicore suport.

Don't forget that those games you mention are vastly different from ArmA. What makes ArmA unique here is the fact that there are is an immense load of AI scripts running in the background, which leads to the described slowdown comparing the same spot on Chernarus, once with a campaign running and once just in editor/emtpy map. The renderer is running threaded already, which seems to be working quite nicely.

But too much AI/mission scripts in the background seem to slow down the renderer aswell, and that is where I think might be room for improvement, as long as there are free CPU resources. As I said earlier, in a perfect world the renderer would run completely independantly, no matter how busy the AI thread is on the other cores.

Don't get me wrong, I do not want to criticize BI, Suma or anyone involved. I merely want to report my findings, in the hope that there is either a bug to be fixed or an "easy" optimization to be made.

I am also aware of the fact that the engine was not designed for multithreading from ground up, so what I reported might just be a "neccessary evil" to get multithreading at all. Maybe the renderer has to wait for the other threads to finish so it does not get out of sync, and that leads to lower framerate when the other threads are more busy. Maybe Suma even had the threads running fully independently at some point, but it was getting desynced too easily and he had to go back to the current model. Maybe it is something else entirely. I don't know, but I'd like to find out.

Share this post


Link to post
Share on other sites

If there ever was a program that could benifit from Multi Procs its ArmA.... its FULL support for multicore IS important. The power is there if they want to use it. No excuses just get it done it would make the product a better simulator.

Edited by Majormauser

Share this post


Link to post
Share on other sites

I am also aware of the fact that the engine was not designed for multithreading from ground up, so what I reported might just be a "neccessary evil" to get multithreading at all. Maybe the renderer has to wait for the other threads to finish so it does not get out of sync, and that leads to lower framerate when the other threads are more busy. Maybe Suma even had the threads running fully independently at some point, but it was getting desynced too easily and he had to go back to the current model. Maybe it is something else entirely. I don't know, but I'd like to find out.

You might be on to something here. It seems there is some sort of CPU bottleneck, especially in MP. What I noticed is that relaxing Video options does not help increase FPS. Right now I clocked my E8400 back to default, will try 4GHz and see if it helps. But that shouldn't be CPU-bound like that...

Share this post


Link to post
Share on other sites

So, the question here is: Is it worth buying a quad-core processor over a dual-core for playing ArmA 2? Or will there be such a minimal difference that the cost is not worth it?

Share this post


Link to post
Share on other sites

interesting. but if u have the money an choice, id still go quad core, for other future games or programs etc. but there coul db alot off ppl who bought 1 for no reason

Share this post


Link to post
Share on other sites
So, the question here is: Is it worth buying a quad-core processor over a dual-core for playing ArmA 2? Or will there be such a minimal difference that the cost is not worth it?

Considering that cost of Phenom II 945 Quad Core 3Gh is pretty close to Intel's E8400 I would go for Quad.

If you're comparing same brand's dual over quad and are budget minded - go for dual core.

In majority of games you won't see benefits of quad core over dual. We are hitting the ceiling of parallel processing abilities. I know that Intel/AMD will descend upon us with Hex/Octa cores soon, but it is other improvements in CPU design of next generation (32nm process and etc) that will bring improvements to games.

For those who are interested in multi-thread design... a good read with some methodology explanation..

a bit outdated but does the job

http://techreport.com/articles.x/11237/1

Thanks for the link. I think it's a great article, but benchmark is misleading:

Valve also gave us a particle system benchmark that actually runs inside the Source engine. This test steps through a series of particle simulations, and according to Valve, it's completely CPU-bound. Unlike VRAD, this test case is more typical of what an actual gamer might experience.

particle.gif

This particle demo does not involve heavy scheduling that happens in game. That kind of processing is actually offloaded to GPU, and it would be silly not to do so since GPUs are massively parallel in nature and very strong at particle effects.

Edited by Skeptic

Share this post


Link to post
Share on other sites

OK, another question, just out of interest. What differences would I notice going from a Single Core running at 2.4GHz to a Quad Core at 3GHz? As in on the desktop and in games? I should hope it'd be noticeable.

Share this post


Link to post
Share on other sites
OK, another question, just out of interest. What differences would I notice going from a Single Core running at 2.4GHz to a Quad Core at 3GHz? As in on the desktop and in games? I should hope it'd be noticeable.

If you benched real game with high end GPU, you'd see about 20% average FPS improvement. What's more important you will get almost doubling in Min FPS which I think is most important and quite often neglected. Those lags and stutters you suffer often? They are from Min FPS dropping below 20 or so. On single core in modern games I will guarantee that min FPS will be dropping below 20 and more frequently than on dual-, tri- or quad- core systems.

Share this post


Link to post
Share on other sites
OK, another question, just out of interest. What differences would I notice going from a Single Core running at 2.4GHz to a Quad Core at 3GHz? As in on the desktop and in games? I should hope it'd be noticeable.

single 2.4 to quad 3? A BIG DIFFERENCE!!!

i think you meant single 3.0 to quad 2.4. The quad should still be better in most cases but if you're playing a game which ONLY uses one core, then you might be better off with the single for that game.

I have a q6600 and i think its worth it because my experiences with a single core were laggy... veeerryy veerryy laagggyyyy

A dual 3.0 is a better comparison to a quad 2.4 and in most cases the dual core would win except the quad can handle many more units in ARMA2, whilst the Dual will give steadier performance if it isn't being pushed.

imagine dual and quad as 2x and 4x, this helped me a lot when i made my first ever choices for a computer e.g. 2.4 x 4= 9.6.

Technically it isn't the same because the processing cores on the quad are smaller but i'll leave you with this for now ;)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×