SRCDS Steam group


HL1 & HL2 Booster Library
#31
2 ways to do this:
either write a small shell script starting the server with the LD_PRELOAD set, e.g.:
Code:
#!/bin/bash
LD_PRELOAD=/usr/share/hl-booster/boost.so ./srcds_run -game cstrike +ip <server ip> +port 2701 -secure +map de_dust2 -tickrate 66 +fps_max 0 +maxplayers 26
then start this script inside your screen (screen -A -m -d -S css /path/to/your/script) - don't forget to make the script executable by running chmod +x /path/to/your/script

or you can write the LD_PRELOAD into your screenrc. look at the screen man page how to do that. then you simply start your server inside a screen using that screenrc without the need for any extra LD_PRELOAD.
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
#32
thanks it works
Reply
#33
I got this errors:

Code:
-------------------------------------------------
Loading...
HL-Booster Library by DiSTANT <distant@padgaming.com>
http://www.padgaming.com
irc.gamesurge.net #SourceKernel
Priority: REALTIME
Memory: LOCKED
-------------------------------------------------


Console initialized.
./srcds_run: line 344: 30089 Segmentation fault      $HL_CMD
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
ERROR: ld.so: object '/usr/share/hl-booster/boost.so' from LD_PRELOAD cannot be preloaded: ignored.
Fri Dec 11 18:14:41 EET 2009: Server restart in 10 seconds
ERROR: ld.so: object '/usr/share/hl-booster/boost.so' from LD_PRELOAD cannot be preloaded: ignored.

-------------------------------------------------
Reply
#34
that's not an error, it's supposed to do that.
Reply
#35
Server didint load ... this error just flooding console and no more ..
Reply
#36
? thats not an error. thats the normal comment of the guy "distant" to give other people the information where the lib is comming from.
If you have more than one output of that you should look if the server is online, i think the engine is restarting every 10 seconds, thats why you will get the infiormation more than one time.
Reply
#37
scroll down, there is actually an error message :-)
but i can't help, i don't use that lib.
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
#38
the lib should work.

./srcds_run: line 344: 30089 Segmentation fault $HL_CMD

i think this is a other problem > or runs the server without the lib?
the lib cannot lodet because of the segfault.
Reply
#39
THIS POST AND IT'S ATTACHED FILE ARE ONLY KEPT FOR HISTORICAL PURPOSE. DO NOT USE THE INCLUDED hl-booster.c!

For now please use Monk's usleep function, DiSTANT's hl-booster.c or BehaartesEtwas BEpingboost.c
The attached lib has may design-, performance- and logic-problems and is absolutely _not_ recommended or even acceptable for running servers.
A completely new version with rdtsc timekeeper, better usleep function and some other patches (like SSE2 support) is in development and will be released soon!


--HISTORICAL TEXT--

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)
I recommend to use idle.c, it should smooth the graph further.

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!)

[02/01/10]
~average-calculation now working as expected
~code debugged
~more agressive default values
~ability to disable the "ENV"-feature


Attached Files
.zip   fps-stabilizer_1.0.1.zip (Size: 3.54 KB / Downloads: 454)
Q: What would an omnipotent computer to?
A: Get rid of humanity!
Reply
#40
I wanted to report a bug:
(12-31-2009, 07:31 AM)d4f Wrote:  
  • Stable FPS for hlds & srcds
Furthermore it makes sure that hlds-servers don't go above 1000fps and thus the game time doesn't speed up.

I tried to make this one running with hlds server and had no success.
The Server starts, the lib loads and than the server is stuck.
Code:
VAC secure mode is activated.

FPS control initialized!
./hlds_i686: symbol lookup error: /usr/share/hl-booster-ff/boost.so: undefined symbol: floor
I ran ldd -r /usr/share/hl-booster/boost.so
and got the same error.
Code:
linux-gate.so.1 =>  (0xf77af000)
        librt.so.1 => /lib32/librt.so.1 (0xf779a000)
        libc.so.6 => /lib32/libc.so.6 (0xf7648000)
        libpthread.so.0 => /lib32/libpthread.so.0 (0xf7631000)
        /lib/ld-linux.so.2 (0xf77b0000)
undefined symbol: floor (/usr/share/hl-booster/boost.so)

A search with google gave the answer to compile it with the option "-lm"
-> Now it worked.

Startoption:
Code:
FPS=1000 LD_PRELOAD=/usr/share/hl-booster/boost.so ./hlds_run -game cstrike -ip x.x.x.x -port x -pingboost 2 +sys_ticrate 2500 +maxplayers 12 +map cs_assault
The ldd output is now:
Code:
linux-gate.so.1 =>  (0xf7781000)
        librt.so.1 => /lib32/librt.so.1 (0xf776b000)
        libm.so.6 => /lib32/libm.so.6 (0xf7747000)
        libc.so.6 => /lib32/libc.so.6 (0xf75f5000)
        libpthread.so.0 => /lib32/libpthread.so.0 (0xf75de000)
        /lib/ld-linux.so.2 (0xf7782000)

Another thing: When the SRCDS server is started and empty the lib works fine and i get a nice graph. The CPU usage is low as it is without the lib. When People Join the Server the graph etc is still fine, also host profile, but the cpu usage shown in top or htop suddenly is 100%. Even when the people leave and the server is empty the usage is still 100%. If i look into the server with host_profile 1 it is still stable, no drops.
Anyone has an idea why this happens?

Anp hopefully the last: If yiu want to boost your servers with 300, or 500 fps, you have to start them with fps_max 0 too. The upper fpslimit is now regulated by the FPS= command of the lib.
Reply
#41
(12-31-2009, 07:31 AM)d4f Wrote:  Credits go to: (in no particular Order) Monk, BehaartesEtwas, DiSTANT

my code was released under the GPL license. so if you use it you have to release your code under GPL as well... see http://www.gnu.org/licenses/gpl-3.0.html for details. thanks!


EDIT:
some comment to the lib itself: "regulating" the FPS the match it's nominal value doesn't increase the server quality, also rising it above 1000 fps doesn't help. maybe you should put a note somewhere to make that clear. a "booster" library suggests some improvement...
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
#42
@BehaartesEtwas:
Unlike with DiSTANT's hl-booster.c, I haven't actually taken any relevant lines of code from BEpingboost.c but the loading of the environment variable "FPS". (I've actually never used C/++ before and it's kinda hard to learn without examples ^^ ) I'll rewrite that part if it bothers you Wink
Since most of the file is identic or derivated from DiSTANT's work, I had to keep it under the MIT/Berkley License.
The other idea (and this time idea only Toungue ) I took from BEpingboost is to wait xxxx frames before actually launching the stabilizer.

Dang. I was 100% sure I wrote that note. Must be hallucinating Big Grin Here we go:
As BehaartesEtwas already pointed out several times, the ping-difference between 100fps and 500fps is noticable, however everything above is only a pipe dream. The lib might help to keep a certain fps value, but raising the fps _definitively_ does not give you more headshots. If you suck at 100 fps you will still suck at 100000000000fps.

I'm sick and tired of gamehosting companys selling a 10'000fps server as being 10x better than 1'000fps.
The only thing 10'000fps is better at -and they darn well know it- is making money. So _please_ be honest to your customers and provide quality, not illusion! The fps only change your ping, what _really_ matters is the tickrate. And that one is fixed at 100 top for srcds.

I'll open up the website 1000fps-myth.de sometime in the future which will demonstrate with graphs and examples how little and unimportant the difference is.


@Terrorkarotte:
Thanks for pointing out the usage info =) I'll include a short howto in my post.

I didn't notice that 100% behaviour when testing it, but I'll look into it. 100% cpu usually means that the usleep() is returning without actually sleeping - but that should give you fps-values around 100'000 and not a stable line =)
Is your gameserver hlds or srcds? You write about srcds but the included startline is hlds Smile

It seems the gcc in Debian 5 has the math functions included by default, while other distros haven't.
The current version is now "1.0.0. b" with math included in the headers. Thanks for finding the bug Smile
Q: What would an omnipotent computer to?
A: Get rid of humanity!
Reply
#43
I have the same problem of 100% CPU load (even more sometimes) but with the original HLbooster Library.

With or without people ... load is going 100% after a map change.
It's on multiple SrcDS DoD:S servers. The host is a CoreI7 with Debian Lenny & RT Linux kernel.
Reply
#44
I played around on testservers on stable Debian and Ubuntu 9.04. I tested srcds on both distros and got the 100% issue on both running srcds. I stoped testing the lib with hlds since FPS= >1000 still speed up the server. Starting with FPS=1000 showed no difference from the data. But I have to admit that I did not made a playtest running that value.
Reply
#45
@Terrorkarotte: does this issue occur when using the modified lib by Distant as well, or with the original one only?

Also, whats about BE's lib? Is it having the same 100% CPU load issue, too?
Reply


Forum Jump:


Users browsing this thread: 9 Guest(s)