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.
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.
? 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.
12-31-2009, 07:31 AM (This post was last modified: 01-06-2010, 07:51 AM by d4f.)
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.
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
When using it in a commercial environment, please don't forget the extended usage conditions. Thx
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
Q: What would an omnipotent computer to?
A: Get rid of humanity!
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.
01-01-2010, 10:33 PM (This post was last modified: 01-01-2010, 10:35 PM by BehaartesEtwas.)
(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...
01-02-2010, 12:56 AM (This post was last modified: 01-02-2010, 01:04 AM by d4f.)
@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
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 ) 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 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
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
Q: What would an omnipotent computer to?
A: Get rid of humanity!
01-02-2010, 04:30 AM (This post was last modified: 01-02-2010, 05:27 AM by Rom1.)
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.
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.