On Sunday 06 Jul 2003 5:54 am, Martin Foster wrote:
> The only time that I have ever seen load averages of 30 or more under
> OpenBSD is when one of my scripts goes wild. However, I can say that
> I am also seeing these load averages under PostgreSQL 7.3.2 after a
> migration to it from MySQL.
[snip]
> However, the system
> handled 250 concurrent users without a singular problem, while under
> Postgres with new scripts using functions, referential integrity,
> transactions and lighter code, the system starts to buckle at even less
> then 70 users.
[snip]
> PIII 1Ghz, 1GB
> SDRAM, 2 IDE 20GB drives.
>
> I have changed settings to take advantage of the memory. So the
> following settings are of interest:
> shared_buffers = 16384
> wal_buffers = 256
> sort_mem = 16384
> vacuum_mem = 32768
You do know that sort_mem is in kB per sort (not per connection, but per sort
being done by a connection). That's 16MB per sort you've allowed in main
memory, or for 70 concurrent sorts up to 1.1GB of memory allocated to
sorting. You're not going into swap by any chance?
Might want to try halving shared_buffers too and see what happens.
I don't know the *BSDs myself, but do you have the equivalent of iostat/vmstat
output you could get for us? Also a snapshot of "top" output? People are
going to want to see:
- overall memory usage (free/buffers/cache/swap)
- memory usage per process
- disk activity (blocks in/out)
From that lot, someone will be able to point towards the issue, I'm sure.
--
Richard Huxton