# clocks, timecouters, frequencies for optimum performance



## rambetter (Aug 23, 2009)

I'm running some real-time apps (Video game servers to be exact) that benefit from really quick response to the need for CPU cycles.

I just upgraded from 7.0 to 7.1 and I am noticing some differences such as the ULE scheduler.

Would you recommend any [safe] changes to sysctl settings or anything else to improve the responsiveness of my game servers, which only consume about 20 percent CPU each?  (The load average stays at about  1.0 on a dual core CPU, so it's only halfway maxed out.)

The responsiveness is fine now, just wondering if there's any tweaks I can make for improved performance of the game servers.

Here are some settings on my server currently:


```
nlandys@daffy# sysctl kern | grep time
kern.boottime: { sec = 1250982720, usec = 881663 } Sat Aug 22 16:12:00 2009
kern.cam.da.default_timeout: 60
kern.init_shutdown_timeout: 120
kern.cp_times: 47273 4232 10753 56 814516 115127 3246 12608 984 744864 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
kern.cp_time: 162400 7478 23361 1040 1559380
kern.timecounter.tick: 1
kern.timecounter.choice: TSC(-100) ACPI-fast(1000) i8254(0) dummy(-1000000)
kern.timecounter.hardware: ACPI-fast
kern.timecounter.nsetclock: 3
kern.timecounter.ngetmicrotime: 2697
kern.timecounter.ngetnanotime: 6756
kern.timecounter.ngetbintime: 0
kern.timecounter.ngetmicrouptime: 2212745
kern.timecounter.ngetnanouptime: 5801
kern.timecounter.ngetbinuptime: 156310
kern.timecounter.nmicrotime: 13761939
kern.timecounter.nnanotime: 42589
kern.timecounter.nbintime: 13805238
kern.timecounter.nmicrouptime: 25693
kern.timecounter.nnanouptime: 15756
kern.timecounter.nbinuptime: 16623411
kern.timecounter.stepwarnings: 0
kern.timecounter.tc.i8254.mask: 65535
kern.timecounter.tc.i8254.counter: 56251
kern.timecounter.tc.i8254.frequency: 1193182
kern.timecounter.tc.i8254.quality: 0
kern.timecounter.tc.ACPI-fast.mask: 16777215
kern.timecounter.tc.ACPI-fast.counter: 1302845
kern.timecounter.tc.ACPI-fast.frequency: 3579545
kern.timecounter.tc.ACPI-fast.quality: 1000
kern.timecounter.tc.TSC.mask: 4294967295
kern.timecounter.tc.TSC.counter: 2638356214
kern.timecounter.tc.TSC.frequency: 2394016020
kern.timecounter.tc.TSC.quality: -100
kern.timecounter.smp_tsc: 0
kern.rpc.timeouts: 0
nlandys@daffy#
```


----------



## Aprogas (Aug 23, 2009)

I'd recommend tweaking your networking first, any kernel scheduling delays are dwarved by network delays. tuning(7)() seems like a good place to start.


----------

