SRCDS Steam group


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
High FPS HLDS on Ubuntu
#1
Hi,
This is my first post here, so be nice Wink

Here are some specs:
CPU: Athlon 64 X2 s.939 2.2ghz Stock Overclocked to 11x218 = 2398Mhz
RAM: 3Gigs
Net: 60Mbps/30Mbps
C'n'Q disabled

OS:
Ubuntu Server 10.04.3 LTS
2.6.32-33-generic-pae i686 GNU/Linux

It will run 2 public HLDS servers (one per core) CS1.6 20 slots per server.

start command for testing:
Code:
taskset -c 0 screen -A -m -d -S hldsclassic ./hlds_run -game cstrike +ip 192.168.x.x +port 27015 +sv_lan 0 +maxplayers 22 +map de_dust2 +exec server.cfg +tickrate 1000 +fps_max 1000

I'm testing with one server only - one core and with no players FPS is like 900-960, with 20/20 full server it's 200~600 but at times the fps drops bellow 100 with cpu usage around 70-90% max (status and htop). The feedback from the players is very good - low pings and very accurate hits, but I'm a little concerned about this 86fps or so.

I've tried with pingboost2 but the fps is the same and some players reported that they feel like not hitting so much.

I read the wiki about 100 times Smile

The first question is should I install x64 ubuntu or stay on the 32... what will be better for the HLDS and does it make any diff.

I have some general questions on what is probably the best way to go.... I'm a little confused with this RT is no good for HLDS and go 4 100Hz RT kernel... but It will be better with ZEN patch, and I'm going crazy.

So what will be the best for me, the goal is 2 servers good quality ~500fps or maybe 250 if it's better with the stock kernel, 1000fps is always a bonus, but I don't want crappy time dilations Smile

And last but not least... I'm a Linux newbie Smile

Thanks Cool
Reply
#2
Progress so far:

After a lot of reading and trying to translate some german sites, I "learned" that the best way to go is ZEN patch kernel 100Hz dyn.tics and preemtion (server), but I couldn't find the 2.6.33.5-zen3 on the download site or on the zen git, so I compiled 2.6.32-zen0 from the git sources.

I run the server with +sys_ticrate 1010 and +fps_max 0 -pingboost 2 ... the CPU usage is around 60% (it was nearly 90 with stock kernel) but the fps is not very constant, I just don;t get it there is more CPU power, so why it drops - very rare bellow 200 but still, according to fps meter the Quality index is now around 50. Idler is doing some job, but I don't think it's good to have a CPU at 100% 24/7

Any suggestions ?!
Reply
#3
in my experience there is no "best way" for everyone, as every situation is different (that's why I present different options in the wiki, not just one!). zen is a good starting point for sure, tough. you can also try -pingboost 3 if you keep the sys_ticrate at 1010 or so. did you try changing the scheduling like described in the wiki?

please ignore the quality index of the fps-meter, it is broken and I removed it from the normal graphs for a reason (and just forgot it in other places).

also ignore the cpu usage, that is by no means any good quantity. read the faq in my wiki for more details...
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
#4
(11-08-2011, 07:04 PM)BehaartesEtwas Wrote:  ...did you try changing the scheduling like described in the wiki?

also ignore the cpu usage, that is by no means any good quantity. read the faq in my wiki for more details...

I'm not sure what are you talking about... I'm using the cron for priority -99 for the hlds it has huge impact and is a must, I've tried and the idler a little more stable fps rates.

If you are talking about the IO scheduling...
I think that I select BFQ in the menuconfig, but I'm not quite sure

Here is the IO and CPU part of the .config
Code:
#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_IOSCHED_BFQ=y
# CONFIG_CGROUP_BFQIO is not set
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_BFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_FREEZER=y

#
# Processor type and features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_SMP=y
CONFIG_SPARSE_IRQ=y
CONFIG_X86_MPPARSE=y
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_EXTENDED_PLATFORM is not set
CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
# CONFIG_PARAVIRT_GUEST is not set
# CONFIG_MEMTEST is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
CONFIG_MK8=y
# CONFIG_MK10 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_MATOM is not set
# CONFIG_GENERIC_CPU is not set
CONFIG_X86_GENERIC=y
CONFIG_X86_CPU=y
CONFIG_X86_L1_CACHE_BYTES=64
CONFIG_X86_INTERNODE_CACHE_BYTES=64
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_XADD=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_X86_CMPXCHG64=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=5
CONFIG_X86_DEBUGCTLMSR=y
# CONFIG_PROCESSOR_SELECT is not set
CONFIG_CPU_SUP_INTEL=y
CONFIG_CPU_SUP_CYRIX_32=y
CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_CENTAUR=y
CONFIG_CPU_SUP_TRANSMETA_32=y
CONFIG_CPU_SUP_UMC_32=y
# CONFIG_X86_DS is not set
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
CONFIG_DMI=y
# CONFIG_IOMMU_HELPER is not set
# CONFIG_IOMMU_API is not set
CONFIG_NR_CPUS=8
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_INTEL=y
CONFIG_X86_MCE_AMD=y
# CONFIG_X86_ANCIENT_MCE is not set
CONFIG_X86_MCE_THRESHOLD=y
CONFIG_X86_MCE_INJECT=m
CONFIG_X86_THERMAL_VECTOR=y
CONFIG_VM86=y
# CONFIG_TOSHIBA is not set
CONFIG_I8K=m
CONFIG_X86_REBOOTFIXUPS=y
CONFIG_MICROCODE=m
CONFIG_MICROCODE_INTEL=y
CONFIG_MICROCODE_AMD=y
CONFIG_MICROCODE_OLD_INTERFACE=y
CONFIG_X86_MSR=m
CONFIG_X86_CPUID=m
# CONFIG_X86_CPU_DEBUG is not set
# CONFIG_NOHIGHMEM is not set
# CONFIG_HIGHMEM4G is not set
CONFIG_HIGHMEM64G=y
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_HIGHMEM=y
CONFIG_X86_PAE=y
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_HAVE_MLOCK=y
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
CONFIG_KSM=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
CONFIG_MEMORY_FAILURE=y
CONFIG_HIGHPTE=y
CONFIG_X86_CHECK_BIOS_CORRUPTION=y
CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
CONFIG_X86_RESERVE_LOW_64K=y
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
CONFIG_X86_PAT=y
CONFIG_ARCH_USES_PG_UNCACHED=y
CONFIG_EFI=y
CONFIG_SECCOMP=y
# CONFIG_CC_STACKPROTECTOR is not set
CONFIG_HZ_100=y
# CONFIG_HZ_108 is not set
# CONFIG_HZ_144 is not set
# CONFIG_HZ_216 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
# CONFIG_HZ_432 is not set
# CONFIG_HZ_864 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=100
CONFIG_SCHED_HRTICK=y
CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_PHYSICAL_START=0x100000
CONFIG_RELOCATABLE=y
CONFIG_X86_NEED_RELOCS=y
CONFIG_PHYSICAL_ALIGN=0x100000
CONFIG_HOTPLUG_CPU=y
# CONFIG_COMPAT_VDSO is not set
# CONFIG_CMDLINE_BOOL is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y

# CONFIG_DEFAULT_BFQ is not set

Can I select it without the need to recompile the kernel.

About the cpu usage I'm watching it through htop, not from the internal stats command.

bingboost 3 is the only way to see 1000fps in the stats command but it loads the cpu at 100%

Maybe I should try a different version of the kernel.. just couln't find where to download it from.
Reply
#5
(11-09-2011, 01:41 AM)2GOOD Wrote:  I'm not sure what are you talking about... I'm using the cron for priority -99 for the hlds it has huge impact and is a must, I've tried and the idler a little more stable fps rates.
I was exactly referring to that!

Quote:If you are talking about the IO scheduling...
I think that I select BFQ in the menuconfig, but I'm not quite sure
I don't think IO scheduling has a big impact, but you can try anyways.

Quote:Here is the IO and CPU part of the .config
looks good, as far as I can tell

Quote:# CONFIG_DEFAULT_BFQ is not set

Can I select it without the need to recompile the kernel.
yes, you can :-)
Code:
cat /sys/block/sda/queue/scheduler
gives you the available schedulers and the currently selected for the device /dev/sda (which is usually the harddrive). you can set another one like this:
Code:
echo bfq > /sys/block/sda/queue/scheduler
and then check if it worked with the first command.

Quote:About the cpu usage I'm watching it through htop, not from the internal stats command.
yes, but also htop cannot reliably measure the cpu usage of processes switching faster between sleeping and running state then the measurement interval...

Quote:bingboost 3 is the only way to see 1000fps in the stats command but it loads the cpu at 100%
hm... did you try if the server is playable anyways? maybe the 100% is fake. pb3 in combination with a sys_ticrate of slightly higher then 1000 should not eat all cpu.


now I am seeing you are still running at 32 bit. that is clearly not ideal, I would recommend a switch to a 64 bit version of ubuntu.
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
#6
I took your advice and now the machine is with Debian x64 with 2.6.33.5-zen3-ub-100hz_amd64 kernel from http://www.ulrich-block.de/gameserverkernel/

There are precompiled kernels and it's much easier to install and test..

the result is slightly better even though I sow this:
CPU In Out Uptime Users FPS Players
82.00 80.85 118.03 95 495 49.94 17

Some common fps:
Code:
stats
CPU   In    Out   Uptime  Users   FPS    Players
77.25 98.88 148.19      97   508  241.55      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
77.40 102.41 154.39      97   508  177.34      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
77.40 102.97 152.23      97   508  192.79      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
77.40 103.56 152.96      97   508  187.62      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
77.00 104.21 154.49      97   508  415.11      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
77.00 104.67 156.33      97   508  201.57      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
76.00 105.15 158.29      97   508  194.59      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
76.00 105.64 160.97      97   508  225.43      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
76.00 105.81 162.69      97   508  205.00      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
76.33 105.29 160.67      97   508  260.62      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
76.33 105.70 162.22      97   508  218.77      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
76.33 104.72 162.33      97   508  672.04      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
76.50 98.83 149.40      97   508  274.20      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
76.50 98.31 148.65      97   508  222.67      20

but 50 fps is way too low for 17 players, maybe I'll review all the plugins installed...

I'll try and PB3 and report the result Wink

so far:
CPU In Out Uptime Users FPS Players
76.00 57.24 95.57 0 11 1000.00 11

Code:
stats
CPU   In    Out   Uptime  Users   FPS    Players
83.00 86.73 151.78       3    25 1000.00      16
stats
CPU   In    Out   Uptime  Users   FPS    Players
82.50 84.81 152.14       3    25  348.19      16
stats
CPU   In    Out   Uptime  Users   FPS    Players
82.50 90.60 166.95       3    25 1000.00      16
stats
CPU   In    Out   Uptime  Users   FPS    Players
82.50 91.73 173.07       3    25 1000.00      16
stats
CPU   In    Out   Uptime  Users   FPS    Players
82.50 91.12 171.99       3    25  718.39      16
stats
CPU   In    Out   Uptime  Users   FPS    Players
82.40 88.87 166.91       3    25 1000.00      16
stats
CPU   In    Out   Uptime  Users   FPS    Players
82.40 88.18 166.49       3    25  694.93      16
stats
CPU   In    Out   Uptime  Users   FPS    Players
82.40 87.70 165.01       3    25  884.17      16
stats
CPU   In    Out   Uptime  Users   FPS    Players
82.40 86.87 163.28       3    25 1000.00      16
stats
CPU   In    Out   Uptime  Users   FPS    Players
83.00 85.29 160.75       3    25  993.05      16
stats
CPU   In    Out   Uptime  Users   FPS    Players
83.00 85.82 161.98       3    25 1000.00      16
stats
CPU   In    Out   Uptime  Users   FPS    Players
81.00 85.13 160.72       3    25 1000.00      16
stats
CPU   In    Out   Uptime  Users   FPS    Players
81.00 84.32 157.66       3    25  532.48      16
Reply
#7
I think you will have to experiment around a bit to get further improvement. I could imagine, a newer kernel could help. 2.6.33 is some time old now, try a recent 3.1. you can finde more recent versions of the zen kernel here: http://git.zen-kernel.org/zen-stable/
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
#8
what to download zen-stable-3.0.6 that's the kernel patch right.. and what is: 3.1-upstream-updates

I think I'm going back to Ubuntu - I had a second crash.. maybe it's the kernel

Edit:
there is no tag in the git and I can only get the 3.0.8 ... how can i reach the 3.1

the 3.0.8 I cannot compile Sad
Code:
ERROR: "__devcgroup_inode_permission" [fs/aufs/aufs.ko] undefined!
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-zen'
make: *** [debian/stamp/build/kernel] Error 2

I've removed aufs and it's ok now.
Starting the tests, will edit the post later with results.
Reply
#9
I think the master branch is 3.1, but be careful when checking out the head version, as that will be the current development state, which might not compile... and sometimes you have to fix it by disabling some unneeded modules ;-)
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
#10
just imported that git without any tags (there aren't any) and it's 3.0.8... give me some hint how to try 3.1

anyway... 3.0.8 is up and runnin' so far so good it's way better than 2.6.x here is some stats, that's sys_ticrate 1010 and no PB
Code:
stats
CPU   In    Out   Uptime  Users   FPS    Players
59.50 96.50 142.43      20   192  416.49      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
59.50 95.89 142.13      20   192  500.00      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
59.50 96.96 144.17      20   192  262.26      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
59.20 98.27 146.42      20   192  370.51      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
59.20 100.37 150.95      20   192  397.93      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
59.20 101.41 152.62      20   192  528.26      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
59.20 100.78 152.13      20   192  231.43      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
59.00 100.49 152.71      20   192  411.52      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
59.00 100.50 151.56      20   192  353.73      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
59.00 99.71 149.90      20   192  396.67      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
59.00 98.06 146.13      20   192  308.26      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
59.00 97.24 144.91      20   192  407.66      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
58.50 98.57 148.03      20   192  461.89      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
58.50 97.89 149.14      20   192  232.94      20
stats
CPU   In    Out   Uptime  Users   FPS    Players
58.50 96.47 145.33      20   192  720.46      20

not a single one bellow 200 (happy), I'm only worried how stable is the kernel, let's hope for no more kernel panic

on inferno it's worse sometimes ~100
Reply
#11
Do you have doubts in linux kernel? how dare you! Smile
Best Regards,
Stinkyfax
Reply
#12
3xPanics so far... Sad
compiled 3.1 zen
will report later
Reply
#13
as I said, you are running a development version now. maybe you should stick to a more stable and a bit older version.
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
#14
Actually, it was so hard for me because there were 3 problems.
1. Bad ram - yes one of the sticks gave me an error on the second pass of memtest - only one address but still.
2. dev kernel..
3. Too Much overclock - apparently it was working with this clock for couple of years without any problems and a lot of stress, but now I had to reduce the FSB to 215Mhz
4. Bonus - Not so sure about it but I;ve disabled it87 sensor as it is not officially supported

I just hope that there are no more problems.

Thanks u for all ur help and support Wink

Will report back after a few days of testing.
Reply
#15
not sure why people insist on doing this with hlds. on 007 nightfire (which runs on the HL engine as well), increasing sys_ticrate past 100 not only causes all the AI bots and any rotating object to slow to a snail's pace, but it also causes animations such as flags to animate at an unusual pace. but that's not the worst part, yes it reduces the latency shown in the scoreboard by 7-12ms but, it immediately causes everyone in the server to lag to the point where you receive a WARNING: cl_flushentitypacket message, which causes all entities to disappear for a split second, attempting to jump will cause it to jerk very erratically due to prediction errors (shown with cl_showerror 1 in console and developer 1), causes an instant spike in choke shown in the net graph (unless sv_maxrate is set to insane values of over 150000), and ultimately results in an Outgoing message overflow error and a time out from the server
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)