Back to the Vavoom Forum Archives


Forum

[1.32] Dedicated server uses entire CPU core.

Tue, 23 Nov 2010 22:16:07

Blzut3

As the subject says, running a dedicated server eats an entire CPU core (25% in my case due to a quad core system). [img:2pt1vlhb]http://maniacsvault.net/vavoomsrv1.png[/img:2pt1vlhb]
Sun, 09 Jan 2011 07:52:04

Blzut3

Would just like to note that the master server program has the same problem. Though that one was an easy fix, replace the call to usleep(1) with the following:
                       static const struct timespec sleepTime = {0, 28500000};
Sun, 09 Jan 2011 15:56:57

Firebrand

Thanks for the info, I'll try this code and see if something similar is the problem with the dedicated server
Sun, 09 Jan 2011 22:31:40

Firebrand

Blzut3, could I please ask you, that if you can compile the Vavoom source code in your local source copy, if you could add the following patch file to it? Here's the code changes:
Index: source/sys_bsd.cpp
=========================
Mon, 10 Jan 2011 02:18:11

Blzut3

Seems to have no affect on vavoom's CPU usage. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> One thing I noticed though is that sys_lin.cpp isn't used on Linux (it seemed to be compiling sys_bsd.cpp), not sure if
Wed, 12 Jan 2011 13:22:08

Firebrand

Not sure, did you tried changing which files it compiles? As for the performance, the only differences I see between the master server and dedicated server is that master server just expects clients connections, while dedicated server seems to run the ga
Fri, 14 Jan 2011 21:27:01

Blzut3

Well I found out that the sys_lin.cpp file is for when compiling with allegro (the client uses sys_sdl on my system and the dedicated uses sys_bsd). One thing I noticed with a little bit of testing is connecting a client to a vavoom dedicated server caus
Sat, 15 Jan 2011 18:34:51

Firebrand

Are you using the modified code when trying the dedicated server? If you are, how does it runs with the original version of the code? EDIT: Trying vavoom 1.33 dedicated server on windows shows that it only uses 10% CPU, so something is strange with the l
Tue, 18 Jan 2011 21:13:38

Blzut3

[quote="Firebrand":2i44tkgt]Are you using the modified code when trying the dedicated server? If you are, how does it runs with the original version of the code? It runs the same with either sleep method. [quote="Firebrand&
Tue, 08 Feb 2011 14:11:52

mnk

I see the fix went into r4367 - it may even work, the catch is it doesn't build: '#include <sys/time.h>' != '#include <time.h>' (these two are in fact independent). On unrelated note: any progress with <!-- l --><a class="postlink-local" href
Tue, 08 Feb 2011 15:08:38

Firebrand

Could you please provide a diff of the correct include file to use? Thanks! As for the new feature request, please open a proper thread <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->. EDIT: As for progress in th
Tue, 08 Feb 2011 21:54:34

mnk

Well, in this specific case, diff doesn't really need to be involved. I simply added '#include <time.h>' in source/sys_bsd.cpp and source/sys_sdl.cpp near the place where '#include <sys/time.h>' already was (but left the other header in place)
Fri, 11 Feb 2011 00:03:57

Firebrand

Added the include files, please let me know if there are anymore troubles compiling, thanks!

Back to the Vavoom Forum Archives