How to improve responsiveness during VACUUM on Linux

From: "jleelim online" <jleelim(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to improve responsiveness during VACUUM on Linux
Date: 2002-08-28 04:11:02
Message-ID: F92Znj0TrJIPT6nhdBf00021ae6@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Unfortunately I couldn't reply directly to an earlier posting entitled
"problems with new vacuum (??)" in muc.lists.postgres.questions concerning
slow performance during vacuuming on a Linux system running Postgresql 7.2
database.

The general recommended solution to increase interactivity or responsiveness
is of course to enable DMA, 32 bit mode, unmask using hdparm.

A better solution comes from reducing the latency in the elevator algorithm
used in Linux to schedule I/O activities.
Linux 2.4 kernels have a broken elevator (perhaps by design) and does not
schedule request fairly. The solution is to use elvtune to reduce the
latency for queued requests, although doing so may reduce the throughput of
disk I/O.

I suggest setting elvtune -r 0 -w 0 /dev/hdX during vacuum only and
resetting it to the default value when done. You may also try setting to the
recomended value of elvtune -r 500 -w 1000 /dev/hdX as suggested by Andrea
Arcangeli (Author or elvtune). Elvtune is safe to set during runtime.

See http://old.lwn.net/2000/1123/kernel.php3 for more info.

Stephen Lim

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

Browse pgsql-general by date

  From Date Subject
Next Message Kenneth Been 2002-08-28 04:57:52 bytea, jdbc, i/o ...
Previous Message Tom Lane 2002-08-28 04:01:43 Re: Free space mapping (was Re: Multi-Versions and Vacuum)