McArcher 0 Posted February 6, 2010 - number of graphic objects when many AI in view. That's it, the more AI in view, the more polygons, the more processing graphic power needed. but why does GPU and CPU load decreases (!) when we add new AIs to map? logically, the more tasks to do must result in higher loads of central and graphic processing units... What we see is illogical (and we don't know how arma's engine works)... Share this post Link to post Share on other sites
lee_h._oswald 0 Posted February 6, 2010 Is there really no way to get around this stupid BS? Someone should port the OFP ai to get this game working.... MfG Lee *kopfschüttel* Share this post Link to post Share on other sites
galzohar 31 Posted February 6, 2010 but why does GPU and CPU load decreases (!) when we add new AIs to map? logically, the more tasks to do must result in higher loads of central and graphic processing units... What we see is illogical (and we don't know how arma's engine works)... Because your FPS cannot go above a certain value due to AI calculations that need to happen every frame, and well if your FPS is lower for reasons not related to heavier graphics then your GPU does not need to work as hard, and neither do your other 3 CPU cores (with 4th being 100% engaged with calculating AI stuff). Share this post Link to post Share on other sites
McArcher 0 Posted February 6, 2010 I don't understand... Then, if we need to do a lot of AI calculations, CPU load must increase, but it decreases! :D I don't understand this! :D ---------- Post added at 23:10 ---------- Previous post was at 23:08 ---------- http://forums.bistudio.com/showthread.php?t=91860&page=3 Test 1 has no AI, CPU load is seen, Test 2 has 300 AI , and CPU load decreases, comparing to CPU load without AI ! Amazing ! :D Share this post Link to post Share on other sites
galzohar 31 Posted February 6, 2010 Because you have 1 thread running at 100% but a thread cannot run on more than 1 CPU. Since your FPS goes down waiting for that 1 thread to complete each frame, the other threads don't have to work as hard and thus the TOTAL CPU/GPU load decreases. If instead you would have had 1 super-core as a CPU you'd see it going up to 100%. Basically it all sums up to not-very-good multicore useage - if they wanted to improve things the first thing they would do is find a way to split AI calculations to more than a single thead - which is probably easier said than done. Share this post Link to post Share on other sites
McArcher 0 Posted February 6, 2010 threads can be done simulteneously if game was written to support it. parallel calculations can be coded for very many processes, especially for such complicated as our game.... game was written for Pentium III , lol :D Share this post Link to post Share on other sites
afp 1 Posted February 6, 2010 (edited) I don't understand...Then, if we need to do a lot of AI calculations, CPU load must increase, but it decreases! :D I don't understand this! :D ---------- Post added at 23:10 ---------- Previous post was at 23:08 ---------- http://forums.bistudio.com/showthread.php?t=91860&page=3 Test 1 has no AI, CPU load is seen, Test 2 has 300 AI , and CPU load decreases, comparing to CPU load without AI ! Amazing ! :D Well its pretty obvious. First case, no AI, 880FPS - CPU is heavy loaded to obtain these FPS since there are no other things to process. Also some posible code design flaw like one "while" loop without "sleep", since there is no AI. Each frame only draw (compute) landscape and 3D stuff. Second case is the real scenario, 300 AIs, only 33FPS. Much less calculations for those 33 FPS, think that each frame is about the same number of calculations. Therefore less CPU usage. But its not a clear cause, it may be related to code design + bugs, a single "sleep" instruction missing or in the wrong place may change the whole statistics. I think the tests should be performed with 100 AIs and 300AIs, that will probably lead to a performance decrease with more AIs. Edited February 6, 2010 by afp Share this post Link to post Share on other sites
McArcher 0 Posted February 6, 2010 oh, I have only understood that the author of that test, didn't test dedicated server in such coditions to see if 3D rendering takes much CPU time. We must recheck in dedicated server with and witout AI. I hope I'll do it sometime, but not this moment. Share this post Link to post Share on other sites
afp 1 Posted February 6, 2010 Sorry, I edited this later: "I think the tests should be performed with 100 AIs and 300AIs, that will probably lead to a performance decrease with more AIs." No AI is not really relevant. Share this post Link to post Share on other sites
S-M 10 Posted February 8, 2010 In the past i did some tests, i ran my quad @ stock speeds = 2.66ghz and got the same results as overclocking it to 3.5ghz :rolleyes: Also had next to no real performance hit upon running everything on very high, this according to this thread probably means the game is waiting for my lard arse cpu to catch up? This was pre patch 1.05, so maybe some things have changed since then. I was on a server once and something happened, the fps jumped up to around 40-50, i cant tell you what happened at the time, but it was great. Playing a 15 player coop game just before i was averaging around 25fps according to the EVGA on screen display, but still with a bit of texture popping and them horrible z buffer flashing thingybobs now and again. Share this post Link to post Share on other sites
galzohar 31 Posted February 9, 2010 Are you sure that you tested heavy AI situations (such as the ones described here that actually get to the point where total CPU load goes DOWN) and yet OCing didn't help? I find that hard to believe, or at least I have no logical explanation for that. OCing makes all 4 cores faster which means the AI core runs faster as well which means you can run more AI before running into problems. Share this post Link to post Share on other sites
jumpinghubert 49 Posted February 9, 2010 (edited) on Berzerk-Map http://www.die-amokossis.de/ (PvP up to 120 players) I have similar fps drop when number of human players raises above 70+. I will log the cpu-usage next time playing on this server. Edited February 9, 2010 by JumpingHubert Share this post Link to post Share on other sites
Dead3yez 0 Posted February 9, 2010 I have studied this issue too, here are my conclusion:Causes: - number of graphic objects when many AI in view. That's it, the more AI in view, the more polygons, the more processing graphic power needed. - AI processing when hosted server. This involve pathfinding, distances calculations, decisions, generally the FSM stuff. If your computer has to do all these together with graphics processing, you'll get more lag. If we're on the same page then the issue we're actually talking about has nothing to do whether the AI is in view or not. Slowdowns within the game are still very noticable whether the AI is in view or not. It doesn't make a difference unless your GPU is actuallly the bottleneck - which is likely not the case. AI processing when hosted server, possibly correct. This is why it is an issue for the clients. Why does the issue persist as a client to a dedicated server. Solutions:1. Use dedicated server on a separate computer. If you do it on the same computer you're playing the game, you will get even more lag because some objects have duplicate processing, in server space and also in client space. If you have a dedicated server, you will get rid of AI processing on your computer and share processing power on multiple processors. This involves a decent bandwith and some tunnings but results are generally better. 2. Do not put all AIs on the mission map, spawn AI when needed. Millions of AI in the same time is not always a good idea. This depends on the mission design, the best thing you can do is to use respawn camps, like the ones in DAC. Instead of having 300 AI simultaneous on map, you can have only 30 and respawn groups as they die, having much better speed and the same feeling. Plus you can have countless AIs. DAC also have others optimisations like zones removal or group reducing, I think zones removal may worth take a look too. 3. Optimise scripts. Some patrols scripts add a lot of lag while big number of human players, consider replacing some patrols with camps or static observers. Try to understand how thread switching works and adapt paralel computing to game engine correctly. Count the number of loops you use and check if they are really needed. Too many features added to a single mission also may impact over performance, if you want artillery, revive, air stuff, etc etc each one of them adds something to server processing. 4. Use AI game engine if possible. If you use some fancy script for each AI on the map, this script will execute and overlap with AI engine processing, as they are not independent each other. This will add a lot of overhead and may lag in the end. Guard waypoints have very good results in terms of AI behaviour, as far as I could notice. Use AI scripts only where needed. Well, the performances resides in the end in mission design and designer skills. Also, some custom AI systems added to the mission in the right way may have good results in terms of AI behaviour and performance balance. 1. This is bollocks, no-one hosts a dedi-server and plays on the same machine. Only if testing etc. 2. The game is based around putting AIs on the map. Game modes like domination already do this. Games with even 50 AI (~5 squads), the effects are noticable there. 3. Again (if you're talking about third-party scripts), this has nothing to do with the topic in hand. We are talking about default placement of AI. 4. LOL. The issue is the AI game engine. on Berzerk-Map http://www.die-amokossis.de/ (PvP up to 120 players) I have similar fps drop when number of human players raises above 70+. I will log the cpu-usage next time playing on this server. Out of pure speculation, I think this might have to do with the dead AIs also causing CPU usage. Dead AIs being equivalent to human players (due to processes that mus keep running). But like I said, speculation. Share this post Link to post Share on other sites
Flash Thunder 10 Posted February 9, 2010 Any chance that will see this fixed in Operation Arrowhead and then patched into the Arma 2 architecture? :confused: This is a huge deal for PVP! Share this post Link to post Share on other sites
afp 1 Posted February 10, 2010 (edited) Deadeyez, Kju have already answered to your exact problem, I was talking in general how to improve AI performances. Besides some game engine optimisations there are already in progress at every patch, I don't think that it is so weird. It is obvious that ArmA2 is using more intensively CPU than GPU. While GPU cover the needs, if you change graphics settings, game performace still depends mostly by CPU, which means AI count, instead of drawing stuff. The multiplayer code also may have some bugs so the syncronisation affects client framerate at high number of AI, but I guess they are working on it. Edited February 10, 2010 by afp Share this post Link to post Share on other sites
Phantom Mark 0 Posted February 11, 2010 I think the most frustrating thing is to have 4 cores, and only 1 being used by 99% of games these days, especially when multi core tech is so old, industry in general has been super slack in taking up the most from modern hardware quite frankly..... Share this post Link to post Share on other sites
McArcher 0 Posted February 11, 2010 I think the most frustrating thing is to have 4 cores, and only 1 being used by 99% of games these days, especially when multi core tech is so old, industry in general has been super slack in taking up the most from modern hardware quite frankly..... i have 3 cores and no core is loaded to 100% or even 90%. much much lower!! this game is very unoptimized for modern hardware ... Share this post Link to post Share on other sites
NoRailgunner 0 Posted February 11, 2010 Guess you didn't search/found/read these infos from BIS: BIS developers-blog/real-virtuality-going-multicore Share this post Link to post Share on other sites
rübe 127 Posted February 11, 2010 You "boohooo, :( my cores aren't anywhere near 100% used, I'm so pissed off right now"-guys just have absolutely no idea of parallel computing. Instead of just swallowing the marketing bullshit of computer vendors selling you two, three, four and more cores (while you think this equals 100%, 200% ... the power/speed), you may wanna inform yourself about what parallel computing is actually capable of - currently and in general. Give it a try and it should dawn on you earily enough, that parallel computing isn't the holy grail and certainly not the answer to all your and everbody elses problems. Parallel computing is still a very young and hot research topic. You can't just add it to an existing program as a feature. Maybe even your programming language/environment sucks to write good parallel code, for it enforces the "wrong" programming paradigms. New languages may be more appropriate to unleash some more of the parallel fun (while easier to write and cheaper to maintain). And last but not least: not everything can be parallelized - ever. (check out this Amdahl guy to understand the consequences thereof) BIS guys do what they can. Or are you guys implying that they don't care to use the available hardware? :rolleyes: What do you guys expect from them? Seriously. Go run some monte carlo algorithms instead of Arma2 if you really feel that bad about your precious cores. Share this post Link to post Share on other sites
galzohar 31 Posted February 11, 2010 I never said it was easy to make things run in parallel. In fact I know the issues with it very well. However having my CPU hardly used while having very very low FPS is something that is worth the effort to fix. AI simply take too much processing power to only have 1 thread running for them (and everything tested by people so far points at AI only running 1 thread). Note that if the whole program is slowed down by waiting for 1 thread, it doesn't mean that 1 thread will show as using 100% of a single CPU, as windows often changes the CPU that the thread runs on so that you don't heat a single core too much, but still it will not run on more than 1 core at a time so in terms of performance it is the same as using only 1 core to 100% even if it shows using each core 25%. Share this post Link to post Share on other sites
Phantom Mark 0 Posted February 12, 2010 I am actually a programmer in the games industry, different simulation genre, and I can tell you right now, we are not currently getting the very best from our hardware in any way shape or form, budgets, cross platforming, time pressures all ensure we probably only at best make use of 75% of the potential of the modern gaming PC, this is especially true in the simulation genre where processor power is pushed very hard.......simply running certain physics process's on another core has the potential to improve performance quite drastically in some situations, most post was not a dig at BIS but a general observation of the games industry in general. You only have to look at consoles to appreciate how much more can be gained in quality and performance between the start of a consoles life and the end years where programmers are maximising the full potential of the hardware, the problem with a PC is that the hardware is every changing and the code written for it never fully makes use of all the bells and whistles. ARMA and many other sims could really make good use of those extra cores as and when a developer has the time and resources, or in fact will to embrace modern technology fully. Share this post Link to post Share on other sites
Dead3yez 0 Posted February 15, 2010 I found a little way to improve performance some more. Setting the CPU priority to high managed to get me a couple more frames per second. It's not much but, 30 beats 27. To do this without enterting task manager you can edit your shorcut target line: C:\WINDOWS\system32\cmd.exe /C START "ArmA 2" /high "D:\Program files\Bohemia Interactive\ArmA 2\beta\arma2.exe" -world=empty -nosplash -winxp -mod=@ace;@acex;@acex_pla;@acex_sm;@cba;beta Note adding: C:\WINDOWS\system32\cmd.exe /C START "ArmA 2" /high Share this post Link to post Share on other sites
Hker 10 Posted February 17, 2010 Push very useful post ever same issue why drops alot FPS even MP PVP Compare with ARMA1? I remember Client playing on a dedicated server never got fps limited Share this post Link to post Share on other sites
HeinBloed 0 Posted February 17, 2010 I had a very interesting situation some days ago. We played a coop mission on Chernarus. Every player had beetween 25 and 45 FPS. I usually have about 40 FPS in this mission. In this mission (only this session) there was something "wrong" with my game. I had from the beginning until the debriefing constantly beetween 80 and 120 FPS. Everything was fine. No visual or acoustical difference. No difference in game play. The AI acted and reacted (also on me) as usual. Everything was as usual. There was only one noticeable different: I just had 100-200% more FPS. It was just about the FPS i have on this region on Chernarus without any AI in the editor (I'm using many addons to increase the FPS). I never had this before or after this one mission. I can not reconstruct this situation. This situation in combination with the fact that the FPS drop which is caused by AI is almost the same if playing a mission on a dedicated server or as host, i come to this hypothesis: Every client is wasting computing power for calculating (not controling) all existing AI like the server does. In the described mission my game has deactivated the AI calculating temporary. It is only a hypothesis, but It fits like a glove. Share this post Link to post Share on other sites
lee_h._oswald 0 Posted February 18, 2010 ...my game has deactivated the AI calculating temporary... We need to find that switch and KILL it! MfG Lee Share this post Link to post Share on other sites