From: | Jack Coates <jack(at)lyris(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | tuning questions |
Date: | 2003-12-04 16:06:23 |
Message-ID: | 1070553983.6498.52.camel@cletus.lyris.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
Hi,
sorry for duplication, I asked this on pgsql-admin first before
realizing it wasn't the appropriate list.
I'm having trouble optimizing PostgreSQL for an admittedly heinous
worst-case scenario load.
testbed:
dual P3 1.3 GHz box with 2GB RAM
two IDE 120G drives on separate channels (DMA on), OS on one, DB on the
other, some swap on each (totalling 2.8G).
RH Linux 8.
I've installed PG 7.3.4 from source (./configure && make && make
install) and from PGDG RPMs and can switch back and forth. I also have
the 7.4 source but haven't done any testing with it yet aside from
starting it and importing some data.
The application is on another server, and does this torture test: it
builds a large table (~6 million rows in one test, ~18 million in
another). Rows are then pulled in chunks of 4 to 6 thousand, acted on,
and inserted back into another table (which will of course eventually
grow to the full size of the first).
The problem is that pulling the 4 to 6 thousand rows puts PostgreSQL
into a tail spin: postmaster hammers on CPU anywhere from 90 seconds to
five minutes before returning the data. During this time vmstat shows
that disk activity is up of course, but it doesn't appear to be with
page swapping (free and top and vmstat).
Another problem is that performance of the 6 million row job is decent
if I stop the job and run a vacuumdb --analyze before letting it
continue; is this something that 7.4 will help with? vacuumb --analyze
doesn't seem to have much effect on the 18 million row job.
I've tweaked shared buffers to 8192, pushed sort memory to 2048, vacuum
memory to 8192, and effective cache size to 10000.
/proc/sys/kernel/shmmax is set to 1600000000 and /proc/sys/fs/file-max
is set to 65536. Ulimit -n 3192.
I've read several sites and postings on tuning PG and have tried a
number of different theories, but I'm still not getting the architecture
of how things work.
thanks,
--
Jack Coates, Lyris Technologies Applications Engineer
510-549-4350 x148, jack(at)lyris(dot)com
"Interoperability is the keyword, uniformity is a dead end."
--Olivier Fourdan
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Wampler | 2003-12-04 16:29:53 | Minor (very) feature request... |
Previous Message | Stephan Szabo | 2003-12-04 15:46:11 | Re: Encoding problem with 7.4 |
From | Date | Subject | |
---|---|---|---|
Next Message | Vivek Khera | 2003-12-04 16:33:59 | Re: autovacuum daemon stops doing work after about an hour |
Previous Message | Stephan Szabo | 2003-12-04 15:19:49 | Re: Index not used. WHY? |