SRCDS Steam group


HL1 & HL2 Booster Library
#46
Ulx: this problem appears with both ...
Reply
#47
ok, thanks ... so both libs seem to be useless at the moment, don't they?
Reply
#48
For me, yes Wink
But it seems that it works for some people.
Maybe they don't bother about the cpu usage, or they have more core than srcds processes Wink

It seems that "clock_nanosleep" is causing trouble. Replacing it by a select() (just like pingboost 2) solve the 100% cpu load problem.
Reply
#49
@d4f: do what ever you like, I won't call a lawyer or so... was just a stupid comment :-)

100% cpu load does not necessarily mean usleep returns without sleeping. in fact it means the linux kernel has seen the process not sleeping everytime it measured the cpu load. beware that linux does this only with the HZ set on kernel compilation. even if that is 1000 this is way too rare to really measure the cpu load. still, it proably indicates some kind of a problem if the server runs at 100% constantly, but it's hard to derive what kind of problem that is... usleep returning immediately is only one possible explanation.
btw: my lib doesn't use clock_nanosleep but nanosleep...
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#50
Crash Server when we change the map for de_inferno on css its very strange (test on 2 servers) :

Error: Material "maps/de_inferno/liquids/infernowater_568_2710_213" : proxy "AnimatedTexture" not found!
Error: Material "maps/de_inferno/liquids/infernowater_568_2710_213" : proxy "TextureScroll" not found!
Error: Material "maps/de_inferno/liquids/infernowater_568_2710_213" : proxy "WaterLOD" not found!
Error: Material "maps/de_inferno/liquids/infernowater_-1610_688_24" : proxy "AnimatedTexture" not found!
Error: Material "maps/de_inferno/liquids/infernowater_-1610_688_24" : proxy "TextureScroll" not found!
Error: Material "maps/de_inferno/liquids/infernowater_-1610_688_24" : proxy "WaterLOD" not found!
Error: Material "dev/dev_waterbeneath2" : proxy "AnimatedTexture" not found!
Error: Material "dev/dev_waterbeneath2" : proxy "TextureScroll" not found!
Error: Material "dev/dev_waterbeneath2" : proxy "WaterLOD" not found!
Error: Material "maps/de_inferno/maps/de_inferno/liquids/infernowater_-1610_688_24_depth_26" : proxy "AnimatedTexture" not found!
Error: Material "maps/de_inferno/maps/de_inferno/liquids/infernowater_-1610_688_24_depth_26" : proxy "TextureScroll" not found!
Error: Material "maps/de_inferno/maps/de_inferno/liquids/infernowater_-1610_688_24_depth_26" : proxy "WaterLOD" not found!
Error: Material "maps/de_inferno/maps/de_inferno/liquids/infernowater_568_2710_213_depth_22" : proxy "AnimatedTexture" not found!
Error: Material "maps/de_inferno/maps/de_inferno/liquids/infernowater_568_2710_213_depth_22" : proxy "TextureScroll" not found!
Error: Material "maps/de_inferno/maps/de_inferno/liquids/infernowater_568_2710_213_depth_22" : proxy "WaterLOD" not found!

For de_nuke too :

Error: Material "maps/de_nuke/de_nuke/nukwater_movingplane_640_-976_-734" : proxy "AnimatedTexture" not found!
Error: Material "maps/de_nuke/de_nuke/nukwater_movingplane_640_-976_-734" : proxy "AnimatedTexture" not found!

de_tuscan :

Error: Material "maps/de_tuscan/nature/water_canals03_64_5688_-312" : proxy "AnimatedTexture" not found!
Error: Material "maps/de_tuscan/nature/water_canals03_64_5688_-312" : proxy "TextureScroll" not found!
Error: Material "maps/de_tuscan/nature/water_canals03_64_5688_-312" : proxy "WaterLOD" not found!
Error: Material "nature/water_canals03_beneath" : proxy "AnimatedTexture" not found!
Error: Material "nature/water_canals03_beneath" : proxy "TextureScroll" not found!
Error: Material "nature/water_canals03_beneath" : proxy "WaterLOD" not found!




When i unload the lib the server change the map perfectly Smile
And with the lib of BehaartesEtwas the map change perfectly too .
Reply
#51
I found the problem with 100% cpu load.

It happens for very big or negative sleep values. Your code must verify that tv_nsec is not bigger than 1000 millions or negative.

In my code a conversion error allowed negative values. On FPsstabilizer or HLbooster I think it's the same.
I had a look a FPSstabilizer and i don't understand something.

To check if you have to recalculate average you do:
Code:
if ( tick_count >= FPSS_RECALCULATE_EVERY ) { //tick2check

and after this loop you do:
Code:
tick_count = tick_count + usec;

But ... most of the time usec value is bigger than 1000 and FPSS_RECALCULATE_EVERY is 500.
So, it would calculate an average on every frame: just like adaptative usleep from Monk.

Did I miss something ?
Reply
#52
(12-31-2009, 07:31 AM)d4f Wrote:  I've modified the hl-booster.c so that, in addition to the pre-existing functions it now provides:
  • Possibility to surpass 1000fps
  • Stable FPS for hlds & srcds

"Stable FPS" means that it actively and gradually corrects the usleep-timings to match the desired FPS-values. No more trial & error!
Furthermore it makes sure that hlds-servers don't go above 1000fps and thus the game time doesn't speed up.

FPS-values above 1000 do not make the game run better, it even can make it actually run worse. So please only use this for educational or testing purpose. I'm sick and tired of companys selling their "10k FPS" Servers as being 10x better than 1000fps.


Usage:
Replace DiSTANT's hl-booster.c with the attached one and then run "make clean && make && make install" to update the Lib it with the current one.
Changes to the source code should _not_ be necessary.

Run the gameserver with:
Code:
FPS=4000 LD_PRELOAD=/usr/share/hl-booster/boost.so ./srcds_run <PARAMETER> +fps_max 0
Please note that fps_max should _always_ be set to "0" when using this lib, as the actual fps-limiation is now done directly by the usleep() function. (Even if FPS is to be set below 1000)

Please report any issues or success Wink

When using it in a commercial environment, please don't forget the extended usage conditions. Thx Wink
Credits go to: (in no particular Order) Monk, BehaartesEtwas, DiSTANT

[31/12/09]
~Bug fixed which crashes the game when no FPS-value is defined.

[01/01/10]
~math.h now included in the headers.
~Informations about fps included in the comments (please read!)

Very nice! This is what I have been trying to get the community to do for quite some time now. These changes, and others, can be found in libraries that i rent out to commercial interests.

A next improvement you should look into is adding an rdtsc timekeeper. This should remove about ~90% of the system calls and will lower cpu usage by about 10% (or so I have seen with trial code on my servers).

I am willing to help out with this (as I have already written the code), however my code is a little buggy (random crashing). Anyways, head into #sourcekernel and lets work together.

Cheers!
DiSTANT
[Image: banner.php?t=2&amp;bg=002244&amp...p;id=82023]

[Image: banner.php?t=2&amp;bg=002244&amp...p;id=82024]
Reply
#53
http://www.fpsmeter.org/p,view;38946.html

It seems that the lib doesn't stabelize the fps at all. Increasing the fps works fine. But anyways, thanks for all your work!
Cheers,

Ronny
nice-servers.com
Reply
#54
These drops can have different reasons. Mapchanges for example are shown as drops too. Other prozesses interfering with the srcds server and so on...
Reply
#55
@Ronny & Rom1:
You both are correct ^^
I've somehow managed to mix up milliseconds (10e-3) with microseconds (10e-6), so it creates an average on 1 frame Smile

However I believe that my notion of "stabilizing" is different than yours Rommy Smile
By stabilizing I mean that the actual fps do not derive from the theoretical value over time, not that it corrects drops.
I'm working (for the fun) on a version that will generate a clean graph, however the drop itself (which is usually only 1-2 fps long) cannot be corrected.
Usually, as Terrorkarotte already pointed out, drops are due to a mapchange or new round - thus not affecting ingame behaviour.


I've uploaded Version 1.0.1 which will repair the bugs discovered so far.
It's default values are now a lot more agressive as the cpu-load difference is very low.

@Distant:
See you in IRC Smile
Q: What would an omnipotent computer to?
A: Get rid of humanity!
Reply
#56
(01-03-2010, 10:05 AM)d4f Wrote:  Usually, as Terrorkarotte already pointed out, drops are due to a mapchange or new round - thus not affecting ingame behaviour.

I've uploaded Version 1.0.1 which will repair the bugs discovered so far.
It's default values are now a lot more agressive as the cpu-load difference is very low.

If you want a clean graph without drops just set the timelimit longer than your measurement Wink

How much more usage are we talking about?
Reply
#57
@ronny: for actually stabelizing the fps all those libs follow the wrong approach... as everyone knows the actual height of the fps is not that important, so these libs are pretty useless :-) that's what several "warnings" say in different locations... this all is for fun and maybe for getting srcds knowing better, but not for making it better (not yet at least).
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#58
Sad Help :

gcc -fPIC -g -O2 -shared -o boost.so hl-booster.c -m32 -lrt
hl-booster.c:51: error: expected ')' before 'usec'
In function 'construct':
warning: incompatible implicit declaration of built-in function 'floor'
make: *** [boost.so] Erreur 1
Reply
#59
I have the 100% iussue still with the new version running srcds. Running it with FPS=500 the fps seams not to be affected by the lib anymore.
Any clue why?
Reply
#60
(01-04-2010, 07:42 PM)Terrorkarotte Wrote:  I have the 100% iussue still with the new version running srcds. Running it with FPS=500 the fps seams not to be affected by the lib anymore.
Any clue why?

Set fps_max 0
[Image: banner.php?t=2&amp;bg=002244&amp...p;id=82023]

[Image: banner.php?t=2&amp;bg=002244&amp...p;id=82024]
Reply


Forum Jump:


Users browsing this thread: 9 Guest(s)