On Mon, 2 Jun 2008, Sean Chittenden wrote:

rozetta~/devel/c%>sysctl hw.model
hw.model: Intel(R) Xeon(R) CPU           E5345  @ 2.33GHz

rozetta~/devel/c%>./bench_time 9079882 | sort -rnk1
Timing micro-benchmark.  9079882 syscall iterations.
Avg. us/call    Elapsed         Name
1.405469        12.761494       clock_gettime(2/CLOCK_REALTIME)
...

These seem about right for a normal untuned ~2GHz system:

This begs the question, tuning for time calls. Do you have a best practice that you use for reducing the cost of time calls? -sc

At least try all possible time counters, and choose the one that works best.
Best == fastest and accurate enough.  Best != highest quality according to
kernel hard-coded quality numbers.  ntp will tell you if it isn't accurate
enough if this isn't obvious.

This normally means the TSC on UP systems without power management and
ACPI-fast otherwise.  The kernel quality parameter gives too much
preference to ACPI-fast.

Switching between all possible timecounters at runtime is easier in
not very old versions of FreeBSD.  Old versions didn't even list all
timecounters considered at boot time.  Some timecounters, e.g., HPET
and of course ACPI* on non-ACPI systems are not available even if the
hardware supports them unless they are configured at compile time or
boot time.  It's hard to test the HPET counter on new FreeBSD cluster
machines because it is not confiugured and it would require privilege
to use if it were configured but not selected.

Bruce
_______________________________________________
freebsd-performance@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to