Great explanation, Bruce. I hope you will continue to write us about important networking changes in this manner.
2014-07-17 3:17 GMT+02:00 Bruce Dawson <[email protected]>: > 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 >
_______________________________________________ Csgo_servers mailing list [email protected] https://list.valvesoftware.com/cgi-bin/mailman/listinfo/csgo_servers
