----- Original Message ----- From: "Stefan `Sec` Zehl" <[email protected]>

On Thu, Mar 20, 2014 at 10:39 +0000, Jonathan Price wrote:
Sorry if this message duplicates in the list, but I just realised I didn't reply to this conversation thread.

I sadly don't have an old enough copy of the server lying around, but I did run a ktrace on the new server, and the dump can be found here: https://gravitygunonly.com/ktrace.out

Does anybody know of a comparable kernel tracing tool for linux, so I can do a rough comparison?

I got the server running in an Ubuntu VirtualBox on FreeBSD, and it
appears to run fine in there. I ran it under strace -ff (one file per
forked process) and put those up at http://tf2.42.org/strace/

When testing these things avoid VM's as thats will almost certainly
cause issues, VM's are bad for running games.

I notice from those traces it seems they may have switched from using
gettimeofday to clock_gettime with CLOCK_MONOTONIC and CLOCK_REALTIME
this could be the cause of increased delay on older versions of FreeBSD
when compared to Linux as the later exports said syscalls to userspace
so avoiding the kernel call overhead.

This was added in later versions of FreeBSD.

This can also be HW dependent so worth grabbing bench_clock_realtime and
testing.

Results I get here are:
== FreeBSD 8.3 ==
./bench_clock_realtime 1000000 | sort -rnk1
clock realtime micro-benchmark.  1000000 syscall iterations.
Avg. us/call    Elapsed         Name
1.295952        1.295952        clock_gettime(2/CLOCK_REALTIME)
1.288814        1.288814        gettimeofday(2)
1.268418        1.268418        clock_gettime(2/CLOCK_MONOTONIC)
0.227554        0.227554        time(3)
0.188536        0.188536        clock_gettime(2/CLOCK_MONOTONIC_FAST)
0.186711        0.186711        clock_gettime(2/CLOCK_REALTIME_FAST)
0.183949        0.183949        clock_gettime(2/CLOCK_SECOND)
Value from time(3): 1395397354
Last value from gettimeofday(2): 1395397353.841231      Equal: 0
Last value from clock_gettime(2/CLOCK_SECOND): 1395397355.000000000     Equal: 
999999
Last value from clock_gettime(2/CLOCK_REALTIME_FAST): 1395397355.551175479      
Equal: 999812
Last value from clock_gettime(2/CLOCK_REALTIME): 1395397355.364957273   Equal: 0
Last value from clock_gettime(2/CLOCK_MONOTONIC_FAST): 238087.092726098 Equal: 
999810
Last value from clock_gettime(2/CLOCK_MONOTONIC): 238086.904221625      Equal: 0

== FreeBSD HEAD (11) ==
./bench_clock_realtime 1000000 | sort -rnk1
clock realtime micro-benchmark.  1000000 syscall iterations.
Avg. us/call    Elapsed         Name
0.072954        0.072954        time(3)
0.071690        0.071690        clock_gettime(2/CLOCK_REALTIME)
0.071656        0.071656        clock_gettime(2/CLOCK_REALTIME_FAST)
0.071273        0.071273        clock_gettime(2/CLOCK_SECOND)
0.070846        0.070846        clock_gettime(2/CLOCK_MONOTONIC)
0.070843        0.070843        clock_gettime(2/CLOCK_MONOTONIC_FAST)
0.070008        0.070008        gettimeofday(2)
Value from time(3): 1395397524
Last value from gettimeofday(2): 1395397524.787761      Equal: 930157
Last value from clock_gettime(2/CLOCK_SECOND): 1395397525.000000000     Equal: 
999999
Last value from clock_gettime(2/CLOCK_REALTIME_FAST): 1395397525.004133405      
Equal: 0
Last value from clock_gettime(2/CLOCK_REALTIME): 1395397524.932475314   Equal: 0
Last value from clock_gettime(2/CLOCK_MONOTONIC_FAST): 273152.517350067 Equal: 0
Last value from clock_gettime(2/CLOCK_MONOTONIC): 273152.446504821      Equal: 0

Also check to see what your timecounter settings are:
sysctl kern.timecounter

   Regards
   Steve

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlds_linux

Reply via email to