Re: 8.3.9 - latency spikes with Linux (and tuning for consistently low latency)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 8.3.9 - latency spikes with Linux (and tuning for consistently low latency)
Дата
Msg-id 4674.1271353080@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 8.3.9 - latency spikes with Linux (and tuning for consistently low latency)  (Marinos Yannikos <mjy@geizhals.at>)
Ответы Re: 8.3.9 - latency spikes with Linux (and tuning for consistently low latency)  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-performance
Marinos Yannikos <mjy@geizhals.at> writes:
> we are seeing latency spikes in the 2-3 second range (sometimes 8-10s) for
> queries that usually take 3-4ms on our systems and I am running out of things to
> try to get rid of them.

Have you checked whether the spikes correlate with checkpoints?  Turn
on log_checkpoints and watch for awhile.  If so, fooling with the
checkpoint parameters might give some relief.  However, 8.3 already has
the spread-checkpoint code so I'm not sure how much more win can be had
there.

More generally, you should watch vmstat/iostat output and see if you
can correlate the spikes with I/O activity, CPU peaks, etc.

A different line of thought is that maybe the delays have to do with lock
contention --- log_lock_waits might help you identify that.

> fsync=off

That's pretty scary.

> work_mem=500MB

Yipes.  I don't think you have enough RAM for that to be safe.

> commit_delay=100000 (*)

This is probably not a good idea.

> autovacuum=off (*)

Nor this.

            regards, tom lane

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

Предыдущее
От: Marinos Yannikos
Дата:
Сообщение: 8.3.9 - latency spikes with Linux (and tuning for consistently low latency)
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: 8.3.9 - latency spikes with Linux (and tuning for consistently low latency)