From: | Marti Raudsepp <marti(at)juffo(dot)org> |
---|---|
To: | Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: pg9.0.3 explain analyze running very slow compared to a different box with much less configuration |
Date: | 2011-03-24 11:39:19 |
Message-ID: | AANLkTikecU7M4S-4fmzZqGzs3bgy_yPHj+asKH9vTGEG@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Thu, Mar 24, 2011 at 11:11, Achilleas Mantzios
<achill(at)matrix(dot)gatewaynet(dot)com> wrote:
> My problem had to do with the speed of gettimeofday. You might want to do some special setting regarding
> your box's way of reading time for the hw clock.
Just for extra info, on x86, TSC is usually the "fast" timeofday
implementation. On recent CPUs in single-socket configurations, TSC
should always be available, regardless of any power management. I
don't know about multi-socket. If you want to know whether your kernel
is using tsc, run:
cat /sys/devices/system/clocksource/clocksource0/current_clocksource
On older CPUs, you often had to disable some sort of power management
in order to get a stable TSC -- the "ondemand" scaling governor is the
top suspect. Disabling this is distro-specific. You have to reboot to
get the kernel to re-test TSC. Unfortunately disabling power
management later at boot doesn't help you, you have to prevent it from
activating at all.
For debugging, grepping dmesg for tsc or clocksource is often helpful.
On machines with unstable TSC you'll see output like this:
[ 0.000000] Fast TSC calibration using PIT
[ 0.164068] checking TSC synchronization [CPU#0 -> CPU#1]: passed.
[ 0.196730] Switching to clocksource tsc
[ 0.261347] Marking TSC unstable due to TSC halts in idle
[ 0.261536] Switching to clocksource acpi_pm
If you just want to get repeatable timings, you can force both
machines to use the hpet clocksource:
echo hpet > /sys/devices/system/clocksource/clocksource0/current_clocksource
Marti
From | Date | Subject | |
---|---|---|---|
Next Message | Achilleas Mantzios | 2011-03-24 12:07:29 | Re: pg9.0.3 explain analyze running very slow compared to a different box with much less configuration |
Previous Message | Uwe Bartels | 2011-03-24 09:19:04 | Re: buffercache/bgwriter |