Table of Contents
The BigWorld server relies heavily on having an accurate clock for timers and load calculation. Unstable clocks (clocks that may move backward) can cause undesired behaviour and even crashes. Therefore properly configuring how BigWorld reads the time is essential for a stable, efficient server.
BigWorld provides three timing methods to select between. This can
be configured by editing the file
/etc/bwmachined.conf
. For example, to use the
gettime timing method, include a section like this:
[TimingMethod] gettime
-
rdtsc reads the time stamp counter register on the CPU.
It is known to become unstable in multi-core machines where a process moves between cores or if frequency scaling is used. In many single core systems it is completely stable and could be used without any issues.
-
gettime uses the kernel's clock driver to access the current time.
This method is far slower than rdtsc but has the ability to draw on multiple time sources to ensure a good compromise between speed, accuracy and stability is reachable. For additional system level configuration see Linux Clock Source.
-
gettimeofday is a deprecated timing method.
This method of timing is similar to gettime but has a lower theoretical maximum resolution and may be disrupted by NTP.
Linux should automatically select an appropriate clock driver for its internal timekeeping, however at times the system administrator may need to select a different driver. If gettime is used as the timing method this will have a direct impact on how BigWorld behaves.
A user may check which clocksource they are using with the following command run as root:
# cat /sys/devices/system/clocksource/clocksource0/current_clocksource
You may check which options available with:
# cat /sys/devices/system/clocksource/clocksource0/available_clocksource
Both the tsc and jiffies options are known to be unstable. There have also been reports that acpi_pm is unstable with some motherboard chipsets. We suggest that the hpet option is used if it is available, or acpi_pm if it is not.