Archive

Archive for January, 2009

PubHelper – Source/1.6

January 29th, 2009

Tired of high CPU usage on source servers in pubs? (24+ slots) Tired of choke/loss/bad reg on large servers?

I present a module that was written to combat excessive CPU usage.

Features:

- Rewrites the game’s functions to use a CPU instruction to get time
- Rewrites some of the core functions that are processed each frame to use a more relaxed sleeping (5 to 10ms sleeps, which is 500fps for 5ms or 100fps for 10)
- Rewrites specific glibc functions for speed, no accuracy
- Forces the use of SSE2 instructions for memcpy’s/memzero
- Other fixes

Before’s and Afters:

A 32slot source server with 31 bots running random patterns generates approx. 80% mean and 99% peak cpu usage. This module reduces the CPU usage to 45% mean and 60% max (data is coming)

Cost: $99 (one time fee)
OS’s supported: FreeBSD, Linux x86/x64

Status: Almost done
Want it? Contact me here or message me on gamesurge.

Game Stuff, uboost

More Source Internals

January 26th, 2009

I’ve been spending time documenting the internals for source, ie: what the engine expects from userland and vice versa. I have it mostly jotted down in many files, but.

Source/1.6 are more optimized for Windows platforms than Linux. Bummer. Why? Linux binaries use a very old gcc version (2.95 or something), so when VALVe generates dynmic shared objects (DSOs), it has to use -fpic/-fPIC to generate them. When you do this, %ebx is used as the pic register, and not much of the code can be optimized (because of -fPIC/fpic)

Will post more later tonight when I get off work from cPanel (yes, i work for them too)

Main

Apparently ..

January 5th, 2009

A big named GSP is going to release 4000fps server.

Of course, if we wanted to compete with all the other run-of-the-mill companies doing this, i’d offer 10K+fps.

I was first doing high FPS. I was first doing a lot of things, so it’s flattering to see everyone try and keep ahead of all the other people.

Main

SourceTV + Low server performance

January 5th, 2009

A topic on VAVLes mailing list:

 
To: "Half-Life dedicated Linux server mailing list"
        <hlds_linux@list.valvesoftware.com>
Subject: Re: [hlds_linux] sourcetv causing server side fps issues 
 
 
Linux srcds has used a ton of CPU forever. The main frame loop is
optimized for a windows 66hz timer environment. Hence, linux servers
are 'perma-boosted' and chug inordinate amounts of CPU for minor FPS
increases, and they give us no variables to tweak the various sleep
times/calculations that impact this. SSE2 is still broken in linux
srcds. it also uses gettimeofday heavily, which was bad enough that
the l4d team specifically redid that part of the engine. The engine
uses 2-3% of the CPU entirely idle on kernels with a high response
rate (HPET/1000hz/other common things), which caused the l4d team to
put in a hibernation mode.
 
 
The x86 binaries still use -fPIC
On other arches (amd64) it don't have any performance advantage due to
the necessary calls being there, but on x86 PIC clobbers a register
and causes call heavy binaries like srcds to use upwards of 6% of
their CPU time on thunks. Nvidia's linux OpenGL library, mpeg
decoders, etc, all use non-fPIC shared objects on x86.
 
 
And yeah, SourceTV murders my server in CPU usage. I also noticed FPS
dips to the point where I had to fuck with the sleep timer to make
things go smoothly. I made a few threads about this but valve isn't
really all that interested.
 
 
- Neph

My response is

 
64bit binaries would help. I've just finished porting vsyscalls back 
to 2.6.24 series (x86), and I see a minor drop under load. However, 
it doesn't fix the fact
that the engine spends about 1500 cycles an idle loop with source tv 
on. I've also hacked in CLOCK_MONOTONIC support instead of 
gettimeofday.. why does a gameserver
need nanosecond timestamps if everything is more or less estimated?
 
 
I didn't think clobbering 1 additional register would make that much 
of a difference. Maybe on older gcc versions, but newer ones are better at it..
however, -fPIC will turn off optimizations that otherwise have to be 
enabled..  I think valve is using 2.9.5 on 1.6/source.
 
 
The best long term solution is to use AMD64 binaries again, and then 
they could probably use fPIC without worry about clobbering %ebx..

Windows has better binaries. Linux has a more customizable userland/kernel. Clobbering %ebx may give lower performance under load; HOWEVER. I think the best bet is to adopt 1.6′s behavior and host the sourcetv separately. Too much context switching when it’s enabled.

Pick your poison.

Game Stuff

Business vs Helping People

January 2nd, 2009

A.. topic.. came up (which was started by me). Would you help another company? No. Why? I’m a mercenary. I do work for hire. Life isn’t free. Life requires money. I am a very honest person to coworkers. I am very professional when it comes to my clients.

So anyways, some idiot said I had a big ego and all that crap. Personally, I’ve FORGOTTEN more than he could ever know. Bank on that.

16:50 (Monk) too many idiots running gsps though. you can't expect all em of to have a clue
16:50 (Monk) most of them lack a clue
16:50 (Monk) few have a clue
16:51 <MorganK> that's why i'm also going to try and form this into more of an informational community... instead of all the
      belittling, i'm going to aim towards everyone helping one another
16:52 (Monk) mmm
16:52 <PCS|Bobby> Gsp's should help eachother
16:52 <PCS|Bobby> IMO
16:52 (Monk) no way
16:52 <PCS|Bobby> I am tired of the belittling too Morgan.
16:53 <PCS|Bobby> Monk: If I ask you a question about a server issue, and you help me by giving me the right answer, would that
      effect summit servers earnings?
16:53 (Monk) i wouldn't help you.
16:53 <PCS|Bobby> Then your a jerk
16:53 (Monk) honda doesn't help ford, and chevy doesn't ask bmw
16:53 <PCS|Bobby> Actually they doo
16:53 <PCS|Bobby> haha
16:53 (Monk) i am not a jerk. business is business
16:54 <PCS|Bobby> Their RD departments do communicate
16:54 (Monk) do you know that for sure? 
16:54 <PCS|Bobby> I do
16:54 (Monk) i'm sure you do
16:54 <PCS|Bobby> my uncle is GM rd
16:54 <PCS|Bobby> lol
16:54 (Monk) i feel sorry for him
16:54 <PCS|Bobby> ok Monk good talking to you
16:54 <PCS|Bobby> Yea I feel bad too
16:54 <Velocity|Brian> it would never work
16:54 <BZ-MikeH> I've gotta agree with monk on this one :\
16:54 <PCS|Bobby> he is at risk of loosing his retirement
16:54 <Velocity|Brian> those companies are run by people with ivy league educations and business degrees and understand how
      economics work
16:55 <PCS|Bobby> w/e I'll help anyone who needs it!
16:55 <Velocity|Brian> you could never convince enough GSPs to work together to make a change 
16:55 <Velocity|Brian> because all it would take is 1-2 asshats to undercut it and we're back where we started
16:55 <BZ-MikeH> it would never happen
16:55 <PCS|Bobby> True, but gsp's needs to make that next step
16:55 (Monk) look. i've been around a long time. people will use that help to fuck you
16:55 <Velocity|Brian> agreed
16:56 <PCS|Bobby> You agree with Monk that they will F*** you?
16:56 <MorganK> i wasn't really aiming towards "helping"... i just want to stay clear from the petty insulting... even though they have no credibility, they really have the right to start their own business, and shouldn't be pushed around all the time
16:56 <Velocity|Brian> yes I do
16:56 <PCS|Bobby> ^ TRUTH
16:57 <PCS|Bobby> My business profits each quarter will not be effected by my helping of another business.
16:57 <PCS|Bobby> My servers power many online businesses and helping them grow is my job.
16:57 <PCS|Bobby> Colocrossing is the same.
16:57 <PCS|Bobby> This may be only me with this "Vision" but someday I think it will become reality.
16:57 <Velocity|Brian> how is colocrossing the same
16:58 <DSC-Tony> He means you help people
16:58 ::: [iloveu]bits1-veracious [~bits@bitsiepoo.user.gamesurge] has joined #gsplounge
16:58 ::: [mode/#gsplounge(+v [iloveu]bits1-veracious)] by ChanServ
16:58 <PCS|Bobby> Colocrossing helps others powerup businesses
16:58 <DSC-Tony> Like Gandhi
16:58 <MorganK> food strike
16:58 ð [iloveu]bits1-veracious/#gsplounge slaps DSC-Tony around a bit with a large trout
16:58 <Velocity|Brian> and if I could I'd tell you how many of those people we extended favors to took what we gave them, got on
      their feet
16:58 <Velocity|Brian> and told us to fuck off
16:58 <Velocity|Brian> which is exactly why I feel the way I do
16:59 <PCS|Bobby> I can't speak for those insulting few.
16:59 (Monk) exactly, brian
16:59 <Velocity|Brian> I can, which is where my experience in this industry comes into play
16:59 <PCS|Bobby> But I can speak for the respectful few, that appriciate the services we provide.
16:59 ::: veracious\sK[turtles] [~irawriraw@essKaaay.user.gamesurge] has joined #gsplounge
16:59 ::: [mode/#gsplounge(+v veracious\sK[turtles])] by ChanServ
16:59 ::: [mode/#gsplounge(+l 57)] by ChanServ
16:59 (Monk) i am here to make money. not friends
16:59 (Monk) if you want help, it's going to cost you
17:00 <PCS|Bobby> lol
17:00 (Monk) that's the way the world works
17:00 <PCS|Bobby> I'd rather GOOGLE than ask you Monk
17:00 (Monk) good for you
17:00 <[DS]-NoOneLives|AFK> lol
17:00 (Monk) i would ignore your message anyway
17:00 <BZ-MikeH> burn
17:00 <PCS|Bobby> Monk = Your ego needs a pin to deflate it!
17:01 <[GGS]Adam> heh, definately agree with gary

Drama