Page 1 of 1

[227g39] Server extreme CPU usage with projectiles

Posted: Thu Sep 30, 2010 10:26 pm
by Hyper
I haven't been playing at my server, but I just noticed severe lag when I'm firing weapons with projectiles in the SkaarjTower map.

I'm playing locally over my gigabit LAN. The server CPU usage spikes to 100% on the core on which the Unreal server process it running. The spike stops when I stop firing the gun.
** TIME LEVEL: 10372
Pre: 'Hyper.nl' 192.168.1.64: Hyper.nl
Join request: :5555/Index.unr?name=Hyper.nl?Class=UnrealShare.MaleThree?password=password?Skin=Male3skins.Bane?Team=255
Team 255
Login: Hyper.nl
Password
Incoming Player named Hyper.nl desired MaleThree and got jzMaleThree
Administrator logged in
Logging in to Skaarj Tower
Possessed PlayerPawn: jzMaleThree SkaarjTowerF.jzMaleThree2
All inventory from Hyper.nl is accepted
LOGIN COMPLETE: Hyper.nl -- IP Address: 192.168.1.64
PostLogin(): Score entry added: 2 Hyper.nl
Current Score Table contents:
    0: -=HELLFIRE=-
    1: =MICC=
    2: Hyper.nl
Join succeeded: Hyper.nl
** Player: Hyper.nl -- LocalID: 49956388 -- PlayerUID: -1428685958
Hyper.nl logged in with admin status.
Collecting garbage
Purging garbage
Garbage: objects: 44800->44800; refs: 1848927
The problem also occurs at my other server. It cn be replicated with shooting the Aura.TraceStinger weapon for a few seconds while watching the server's CPU usage.

Re: [227g37] Server extreme CPU usage with projectiles

Posted: Fri Oct 01, 2010 5:50 pm
by Smirftsch
mmh, k, need to try, but dots seems to have an assumption already.

Re: [227g37] Server extreme CPU usage with projectiles

Posted: Fri Oct 01, 2010 7:31 pm
by Smirftsch
at least my test with g39 didn't confirm it, getting a max of 30% usage with my 2.2GHz phenom
mmh...

Re: [227g37] Server extreme CPU usage with projectiles

Posted: Fri Oct 01, 2010 9:04 pm
by Hyper
My server has a 2.4 GHz Dual Core AMD Athlon 64 x2 4800+

http://techreport.com/articles.x/8295

Re: [227g37] Server extreme CPU usage with projectiles

Posted: Sat Oct 02, 2010 2:53 pm
by Smirftsch
seen per core your server is not really slower than mine, not sure, maybe even a slight bit faster. I hope this means 227g_39 isn't affected by it.

Re: [227g37] Server extreme CPU usage with projectiles

Posted: Sun Oct 03, 2010 3:30 pm
by Hyper
I updated to 227g39 and the problem is the same.

I guess it exists since one of the newer updates, maybe the collisionhash fix (not sure tho). Projectiles take significantly more CPU power than before.

It is more noticeable on large maps and of course with custom weapons like Aura which spit out considerable amounts of projectiles.

How to replicate:
Shoot projectile intensive weapons in a large map with a large space. (or)
Open bluff and shoot the updated aurastinger or dispersionpistol under water. (Large body of open water so the projectiles get stuck under water. Yes, this is no normal situation but a more synthetical test)

Here is a simple local benchmark:
I want to Bluff, used the dispersion pistol with 999 ammo and shot the gun empty under water. Then I took a screenshot of the FPS I got:
227F: 49 FPS
227g39: 6 FPS

This is on my much more powerful main computer with a 3 GHz Core II Quad Extreme. My server starts to get performance problems much more early. Not to even mention the older systems on which it used to run fine as well.

For the test I disabled any shadows. For the most relevant testing result, test on a client-server situation to rule out rendering completely.

Re: [227g37] Server extreme CPU usage with projectiles

Posted: Sun Oct 03, 2010 3:34 pm
by Hyper
at least my test with g39 didn't confirm it, getting a max of 30% usage with my 2.2GHz phenom
mmh...
This is also significantly higher than with 227f I think. Do a test to be sure.

Re: [227g39] Server extreme CPU usage with projectiles

Posted: Sun Oct 03, 2010 6:05 pm
by []KAOS[]Casey
confirmed. randlazerstinger maxes 1 CPU core easily @ 800x600 or above, 60%~ at 1x1, and on 227f it's 5% @ 1x1

Re: [227g39] Server extreme CPU usage with projectiles

Posted: Sun Oct 03, 2010 7:13 pm
by Smirftsch
i guess after 227g I'll kill the first one who mentions again the word "bug" to me ^^
On it...


Re: [227g39] Server extreme CPU usage with projectiles

Posted: Tue Oct 05, 2010 6:08 pm
by Smirftsch
after some optimization it still seems that the cpu usage goes to max...

The problem is from the new hashing system, but its not even that its performance is that bad. In many situations it even keeps the FPS more stable. Obviously not with projectiles.

Indeed it looks like that the old system probably at some point just ignored certain things, while the new system is more accurate, precise and knows no end- with the negative side effect that such things like the aura weapons are pushing the CPU until its squeaking...
Needs more investigation.

Re: [227g39] Server extreme CPU usage with projectiles

Posted: Wed Oct 06, 2010 5:24 pm
by Smirftsch
well, after a lot of optimization work and torturing dots math abilities we were able to decrease the usage for servers to about 10% of g39 (for projectiles).
As a nice side effect the optimization safes about another 20%  usage for a couple of other collision functions too.

Re: [227g39] Server extreme CPU usage with projectiles

Posted: Fri Oct 08, 2010 6:01 am
by []KAOS[]Casey
confirmed. randlazerstinger maxes 1 CPU core easily @ 800x600 or above, 60%~ at 1x1, and on 227f it's 5% @ 1x1
On g40..

1600x900 = 55~% on cpu one cpu core
1x1 = 8%~ on one cpu core

Looks like this update gets the Kaos seal of approval

Re: [227g39] Server extreme CPU usage with projectiles

Posted: Fri Oct 08, 2010 7:10 am
by Smirftsch
While this still initializes render.dll
I noticed that each single CPU cycle we saved in Engine.dll goes into Render if playing- since servers don't use render.dll at all, I hope to see even more performance compared to 227f in pure server usage.

Re: [227g39] Server extreme CPU usage with projectiles

Posted: Sat Oct 09, 2010 1:20 pm
by Hyper
227g40 has solved the performance issue. Now I get only 8% CPU usage at the server and my ping stays nicely at around 65.

(Tested in one of the largest maps I run, SkaarjTower and with several Aura weapons to spawn projectiles.)

Great work, once again.

Re: [227g39] Server extreme CPU usage with projectiles

Posted: Tue Oct 12, 2010 6:00 am
by Smirftsch
do you happen to know how much cpu usage 227f caused in this situation? A "real life" comparison would be certainly interesting.

Re: [227g39] Server extreme CPU usage with projectiles

Posted: Tue Oct 12, 2010 6:58 am
by Hyper
No measurements here. But from experience I know that the CPU usage has always been very low. Remember that Unreal was built for Pentium II processors. So, for heavy servers like mine, a 1 GHz Pentium III was overkill.

My 2.2 GHz AMD Athlon 64 x2 used to get estimately 0 to 5% CPU usage with 227f.

Re: [227g39] Server extreme CPU usage with projectiles

Posted: Tue Oct 12, 2010 7:42 am
by Smirftsch
Ok, thx. It's not really important, just for curiosity.
You are of course right, my first 16 player server was a P2-266 with humongous 256MB ram too.
But Aura pushes that to the extent you know, that's why I was asking. :)

Re: [227g39] Server extreme CPU usage with projectiles

Posted: Tue Oct 12, 2010 1:11 pm
by Hyper
Joss used to say that her server P3 600 / 700 ran a 7 player coop server fine. This was with a full player load on the largest map (The Sunspire).

Projectiles did not cause most of the CPU usage but the AI monsters did.