We were abusing these variables to mask a different underlying issue. Hopefully the information below can be helpful for someone else too. Thanks to Bruce for pointing me in the right direction!
It turns out that for one reason or another the OS was prioritizing the wrong clocksource and not using the higher resolution timer / hardware timer despite it being enabled in BIOS. From further reading, I guess this is the same behavior on Windows - you can enable the HPET in BIOS but it won't be active until you also set it in the OS with: bcdedit /set useplatformclock true Afterwards, the behavior was indeed what Bruce described in his e-mail. No more need for sleep_when_meeting_framerate - same low var and much better system performance/utilization. In Linux the available clocksources are at: cat /sys/devices/system/clocksource/clocksource0/available_clocksource and can be set from (Only persistent until reboot. It can be set more permanently through kernel boot parameters): echo [clocksource] > > /sys/devices/system/clocksource/clocksource0/current_clocksource Before: ofcoursenotroot@timetokill-vds2u2 ~ # zcat /proc/config.gz | grep -i timers # Timers subsystem CONFIG_HIGH_RES_TIMERS=y ofcoursenotroot@timetokill-vds2u2 ~ # cat /proc/timer_list | grep -i > resolution | tail -1 .resolution: 3333333 nsecs After: ofcoursenotroot@timetokill-vds2u2 ~ # cat /proc/timer_list | grep -i > resolution | tail -1 .resolution: 1 nsecs On Wed, Jul 16, 2014 at 6:17 PM, Bruce Dawson <[email protected]> wrote: > The sleep_when_meeting_framerate_headroom_ms convar was removed recently > and I wanted to explain why. Previously on Linux we would sleep one > millisecond at a time, and then busy wait for the remainder of the time. > The sleep_when_meeting_framerate_headroom_ms convar let server operators > control the balance between precise frame times and wasting CPU time by > specifying how long to busy wait for. > > > > We changed the behavior so that we now sleep until the exact correct time > of when the frame should start using nanosleep. This makes spinning > unnecessary. There is no tradeoff to make now. We sleep until the frame > time and then wake up on time, without spinning. On our servers this > reduced CPU consumption by a few percent without affecting frame variance. > > > > This change also improves efficiency by not having the server process > waking up every millisecond just to confirm that it is not yet time to do > any work. Reducing CPU usage means you may be able to run more servers on > each machine, or you have just have a slightly lower power bill. > > > > sleep_when_meeting_framerate should always be set to true (non-zero) > because constantly spinning wastes huge amounts of CPU time and electricity > and may actually give worse variance. > > > > We sometimes remove convars that server operators have been using for > years without explaining why because we don’t realize that these convars > are heavily used. We try to only remove convars when they are truly > unnecessary, and I hope this explanation makes sense. If not then let me > know. > > > > _______________________________________________ > Csgo_servers mailing list > [email protected] > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/csgo_servers > -- -Winnie the Pooh TimetoKill.net
_______________________________________________ Csgo_servers mailing list [email protected] https://list.valvesoftware.com/cgi-bin/mailman/listinfo/csgo_servers
