Seriously 25% CPU usage on an i5-4670k running nothing else on a Ubuntu Server is a lot. And that’s with no one connected. You should definetly check if you really have to call your while loop that often. Also in direct comparison with a Gmod server my ping in the server browser fluctuates between 50-80ms when I spam refresh while Gmod always stays at aroun 50ms. Couldn’t test how my CPU behaves with load due to not owning the game but still I’m looking forward to future improvements (maybe remove SDL from your server as it’s unused).
What’s your hardware?
I get 8-9% on my server box ( i5-3570k ), It’s possible your OS is being a bit overzealous in it’s processor scheduling.
25% CPU doesn’t necessarily mean your processor is doing a lot of work, it most likely means that it’s not doing much of anything else. Thus the dedicated server gets most of the scheduling time-slice to reduce context switching.
We try to make the dedicated server as lean as possible, most of the CPU time is spent ticking all of the objects in the lobby, which it needs to do, even when the game is idle.
EDIT:
Also I think it goes without saying that Unreal Engine 4 and the Source engine are hardly comparable. Trying to base performance metrics off of the latter is not very useful.
Dunno if it’s the os or something else. I have an i5-4670k, 8gbs of ram, hdd at 8% usage and running Ubuntu 14.04 64bit as the os is all you need to know. I’m using the default cpu governor “ondemand” and the “deadline” io scheduler if that’s any relevant. I think overall it’s an overpowered machine for its purpose.
Looking forward to your improvements :). I’m only concerned about power consumption as the process takes up quite a lot of cpu time:
If you have a quad core on Ubuntu, the 25% is out of 400% on TOP, not 100%
I’m running a server of my main Ubuntu box, and it uses 25% on TOP, but when viewing it with Conky (which displays in reference of 100% not 400%) I get 6.87% or around there, which is consistent with what @Zak says his uses.
You’re right. Forgot about that. Seems like the server doesn’t need that much performance after all. The best thing about the server seemed the low upload bandwith it’s using. You did a really great job with that guys!
Also just want to make sure that this get’s some attention: