Re: pg9.0.3 explain analyze running very slow compared to a different box with much less configuration

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: pg9.0.3 explain analyze running very slow compared to a different box with much less configuration
Дата
Msg-id AANLkTikecU7M4S-4fmzZqGzs3bgy_yPHj+asKH9vTGEG@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg9.0.3 explain analyze running very slow compared to a different box with much less configuration  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
Ответы Re: pg9.0.3 explain analyze running very slow compared to a different box with much less configuration  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
Список pgsql-performance
On Thu, Mar 24, 2011 at 11:11, Achilleas Mantzios
<achill@matrix.gatewaynet.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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Uwe Bartels
Дата:
Сообщение: Re: buffercache/bgwriter
Следующее
От: Achilleas Mantzios
Дата:
Сообщение: Re: pg9.0.3 explain analyze running very slow compared to a different box with much less configuration