SarahC
Builder
-Worried about the mod community-
Posts: 36
|
Post by SarahC on Feb 19, 2015 6:12:11 GMT
The "200 blocks or more slowdown" is believed by many to be a performance issue caused by so many blocks being simulated in the physics engine all running on a single core, and therefore the framerate drops badly. But on closer inspection - this isn't the case at all. Reasons for thinking this is a bug:1: The drop to 2 frames a second "just happens", there's no steady decrease in performance as the block total increases. I don't know the exact number, but around ~150 blocks, you're good to go....... 151 blocks. 2 FPS. 2: Breaking down CPU usage by core, and checking GPU by usage to ensure it's not a GFX issue: we see the key detail.... Something is BLOCKING execution! If the physics engine was running on a single core (I believe it runs on many), and there were too many blocks to deal with, there would be a single core in the chart below, tapped out at 100%. There is no core tapped out at 100%! In fact, the CPU usage is LESS with all these blocks than when the model is smaller! 3: Clicking away from the game in Window mode suddenly gives a burst of 3 or 4 fast frames. 4: Once this bug is triggered, for instance on a level with hundreds of soldiers - it continues to affect other levels after it. But if the game is closed, and then reopened, and a large model is loaded on the levels after the soldier one.... the slowdown doesn't occur.
|
|
|
Post by zodium on Feb 19, 2015 9:16:49 GMT
I've never noticed any slowdown until I get several hundred blocks in, there is no difference between 1-300 blocks for me. When I remove the Chaos Tank's non-essential components (~700 comps of ~2400), performance obviously increases as a linear function of blocks removed.
|
|
|
Post by spaar on Feb 19, 2015 11:11:30 GMT
If the physics engine was running on a single core (I believe it runs on many) I'm pretty sure it runs on only one since Unity (the engine the game uses) only supports one at the moment. Take a look here: Multi core / multi thread physicsThat said, you could very well be right on the other things, especially the point with it affecting other levels after it seems like a bug.
|
|
|
Post by rawkee on Feb 19, 2015 15:21:34 GMT
Good find, it seems to vary on every individual system.. like each block you add is filling a buffer or taking up some memory or processing ability. Then once that certain limit is exceeded for a person's system, everything goes to hell. Maybe the physics modeling for each block reserves a chunk of video memory or RAM or other system resources in a way that can be further optimized, and it would seem that because it does not clear out when the map is changed that there is a leak that needs to be addressed as well. Having great results with machines that run within my performance envelope though! Linking to other thread here: besiege.freeforums.net/thread/917/queens-fodder-lots-soldiers-slowdown?page=1&scrollTo=5481"Same issue here, getting about 3fps with a 131 block machine on an AMD A6-5200 (quad core 2GHz) APU. CPU utilization never goes above 25%, tried dropping from 1080p to 720p. Curious where the limitation is here as the code is clearly not taking advantage of the hardware. I look forward to further optimizations " -- It should be noted that I completely forgot to look at memory usage. This HTPC has 4GB installed, I think that leaves 3.5GB after the APU eats a chunk.
|
|
SarahC
Builder
-Worried about the mod community-
Posts: 36
|
Post by SarahC on Feb 19, 2015 18:20:24 GMT
-- It should be noted that I completely forgot to look at memory usage. This HTPC has 4GB installed, I think that leaves 3.5GB after the APU eats a chunk. : nods : My workstation's rocking 16GB ECC RAM.
|
|
|
Post by spaar on Feb 19, 2015 18:34:43 GMT
AMD A6-5200 (quad core 2GHz) APU. CPU utilization never goes above 25%, tried dropping from 1080p to 720p. Curious where the limitation is here as the code is clearly not taking advantage of the hardware. You have to be careful there though. The Windows 8 Task Manager for one only shows you total CPU usage, so 25% of a quad core CPU is actually a full core. So the limitation there is, once again, missing multi-core support. And I guess, a higher CPU frequency would also improve things. Luckily with Unity 5 we'll be getting multi-core support
|
|
SarahC
Builder
-Worried about the mod community-
Posts: 36
|
Post by SarahC on Feb 21, 2015 15:32:31 GMT
>You have to be careful there though. The Windows 8 Task Manager for one only shows you total CPU usage, so 25% of a quad core CPU is actually a full core.
True that. Although I found it wasn't even using one core much.
I've done a bit of programming in the past - hell, it still puts food on my plate, and to me this glitch seems like a scheduling/spinlock issue. Like as though the requested physics speed can't be met (the users time slider), and so it tries for the next time slice, doesn't meet it, and so waits for the next slice...
My mates got 32 cores (Xenon server with a 970)... I wonder what a multicore simulation will be like? =D
|
|
|
Post by spaar on Feb 21, 2015 17:03:31 GMT
Wow, multicore physics on a 32 core server sounds pretty awesome
|
|
|
Post by grimbriar on Feb 21, 2015 17:58:13 GMT
Wow, multicore physics on a 32 core server sounds pretty awesome I can't use speaking words to describe how awesome that sounds.
|
|