An easy way to play with it would be to compile a shared library that provides usleep() (which the engine calls) and implements it using nanosleep() or just nulls it out (allowing it to be much more accurate); Stick that library in LD_PRELOAD
By default, the main frame loop sleeps for 1ms each frame. At 0.2ms you can get 4000+ FPS, and will use moderately more CPU on a core with extra power available. However, once the CPU hits 100, no sleep, 1ms, 0.2ms sleep, etc, will all get the same framerate. It really has no effect. Playing with the sleep call also affects net threads, which can result in faster packet processing, but again, for no noticable gain. I'm not sure how a non hi-res kernel would be different from enforcing granular wakeups in a sleep hook, but there might be other overhead at play. - Neph On 01/28/2010 12:54 PM, Kyle Sanderson wrote: > Sorry for the Hijacking, but Neph how would I go about decreasing/increasing > the sleep() interval. (Just to play around with it, I have an idea but I > want to see if I could easily implement it). > > Thanks, > Kyle. > > On Thu, Jan 28, 2010 at 6:53 AM, Kaspars<[email protected]> wrote: > > >> Sorry, I didn't see that I'm on windows mailinglist :) >> >> 2010/1/28 Mike Stiehm<[email protected]> >> >> >>> We run windows 2008 if you linux I can't be of much help :( >>> >>> -----Original Message----- >>> From: [email protected] >>> [mailto:[email protected]] On Behalf Of Kaspars >>> Sent: Thursday, January 28, 2010 3:37 AM >>> To: Half-Life dedicated Win32 server mailing list >>> Subject: Re: [hlds] Changes in Dedicated Server Capacity After Updates >>> >>> Could you please provide your kernel config? I'm getting interested in >>> >> the >> >>> non-hi res timer thing, because I have noticed too an increase of load >>> after >>> every tf2 patch and lately players are complaining about inconstant >>> gameplay... >>> >>> 2010/1/28 Mike Stiehm<[email protected]> >>> >>> >>>> I run 375-400 people on a 2 x Quad Xeon's 2.66. If I turned on his res >>>> timer >>>> I would be in the 200 range I have done a lot of testing on this when I >>>> first setup. On and off you can't tell in game but the CPU hit is >>>> >> insane! >> >>>> -----Original Message----- >>>> From: Nephyrin Zey [mailto:[email protected]] >>>> Sent: Wednesday, January 27, 2010 7:18 PM >>>> To: Half-Life dedicated Win32 server mailing list >>>> Cc: Mike Stiehm >>>> Subject: Re: [hlds] Changes in Dedicated Server Capacity After Updates >>>> >>>> I haven't extensively tested non-hires kernels or stable lower FPS >>>> configurations, but I wouldn't think so; It allows you to set dynamic >>>> tic and very low kernel resolution without getting wildly inaccurate >>>> sleeps. Without hi res timers, sleep can only wakeup as fast as the >>>> kernel resolution, meaning you'd need 1000hz to get the high fps >>>> everyone craves so much. If you hook the sleep() events on the main >>>> >> loop >> >>>> and make the engine sleep more/longer, you dont get much CPU savings >>>> >> for >> >>>> the performance hit. (see: windows boosted vs non-boosted). You're just >>>> generating 1000hz interupts when they're not necessary, rather than >>>> simply sleeping as desired and waking up as desired, generally using >>>> >> tsc >> >>>> or hpet. I'll add it to my experimentation list though >>>> >>>> On 01/27/2010 03:24 PM, Mike Stiehm wrote: >>>> >>>>> We don't use a high res timer no need for it. >>>>> >>>>> Just a waste of CPU power if you ask me. >>>>> >>>>> -----Original Message----- >>>>> From: [email protected] >>>>> [mailto:[email protected]] On Behalf Of Mike >>>>> >>>> O'Laughlen >>>> >>>>> Sent: Wednesday, January 27, 2010 5:05 PM >>>>> To: Half-Life dedicated Win32 server mailing list >>>>> Subject: Re: [hlds] Changes in Dedicated Server Capacity After >>>>> >> Updates >> >>>>> Wouldn't high res timers increase CPU utilization? >>>>> >>>>> On Wed, Jan 27, 2010 at 4:55 PM, Mike Stiehm<[email protected]> >>>>> >>>> wrote: >>>> >>>>> >>>>> >>>>>> No changes that I can see we handle 375+ and seems to be just as it >>>>>> >>>> always >>>> >>>>>> was. >>>>>> >>>>>> -----Original Message----- >>>>>> From: [email protected] >>>>>> [mailto:[email protected]] On Behalf Of Terry >>>>>> >>>> Robinson >>>> >>>>>> Sent: Wednesday, January 27, 2010 12:32 PM >>>>>> To: [email protected] >>>>>> Subject: [hlds] Changes in Dedicated Server Capacity After Updates >>>>>> >>>>>> Through September our dedicated server seemed capable of handling >>>>>> >> 150+ >> >>>>>> people TF2 participants without pegging the processor but after the >>>>>> >>> WAR >>> >>>>>> update, 90 people seems to put the processor at 95+% uage. Have >>>>>> >>> recent >>> >>>>>> updates causes changes in anyone else's server resource consumption? >>>>>> >>> Are >>> >>>>>> there optimizations available that don't exist out of the box to >>>>>> >>>> maintain >>>> >>>>>> server capacity? >>>>>> _______________________________________________ >>>>>> To unsubscribe, edit your list preferences, or view the list >>>>>> >> archives, >> >>>>>> please visit: >>>>>> http://list.valvesoftware.com/mailman/listinfo/hlds >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> To unsubscribe, edit your list preferences, or view the list >>>>>> >> archives, >> >>>>>> please visit: >>>>>> http://list.valvesoftware.com/mailman/listinfo/hlds >>>>>> >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> To unsubscribe, edit your list preferences, or view the list >>>>> >> archives, >> >>>>> please visit: >>>>> http://list.valvesoftware.com/mailman/listinfo/hlds >>>>> >>>>> >>>>> _______________________________________________ >>>>> To unsubscribe, edit your list preferences, or view the list >>>>> >> archives, >> >>>> please visit: >>>> >>>>> http://list.valvesoftware.com/mailman/listinfo/hlds >>>>> >>>>> >>>> >>>> >>>> _______________________________________________ >>>> To unsubscribe, edit your list preferences, or view the list archives, >>>> please visit: >>>> http://list.valvesoftware.com/mailman/listinfo/hlds >>>> >>>> >>> _______________________________________________ >>> To unsubscribe, edit your list preferences, or view the list archives, >>> please visit: >>> http://list.valvesoftware.com/mailman/listinfo/hlds >>> >>> >>> _______________________________________________ >>> To unsubscribe, edit your list preferences, or view the list archives, >>> please visit: >>> http://list.valvesoftware.com/mailman/listinfo/hlds >>> >>> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list archives, >> please visit: >> http://list.valvesoftware.com/mailman/listinfo/hlds >> >> > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > http://list.valvesoftware.com/mailman/listinfo/hlds > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds

