From: Martin Foster <martin@ethereal-realms.org>
To: Richard Huxton <dev@archonet.com>
Cc: PostgreSQL Novice <pgsql-novice@postgresql.org>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: [PERFORM] Extreme high load averages
Date: Sun, 06 Jul 2003 04:31:52 -0600
Message-ID: <3F07FA98.70009@ethereal-realms.org> (raw)
In-Reply-To: <200307060849.00544.dev@archonet.com>
References: <3F07ABA1.2070100@ethereal-realms.org>
<200307060849.00544.dev@archonet.com>
Richard Huxton wrote:
> 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.
Actually, no I did not. Which is probably why it was as high as it is.
When looking at the PostgreSQL Hardware Performance Tuning page, it
seems to imply that you should calculate based on RAM to give it an
appropriate value.
http://www.postgresql.org/docs/aw_pgsql_book/hw_performance/node8.html
I dropped that value, and will see if that helps. The thing is, the
system always indicated plenty of memory available. Even when at a 30
load level the free memory was still roughly 170MB.
Tomorrow will be a good gage to see if the changes will actually help
matters. And if they do not, I will include vmstat, iostat, and top
as requested.
Thanks!
Martin Foster
Creator/Designer Ethereal Realms
martin@ethereal-realms.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: martin@ethereal-realms.org, dev@archonet.com, pgsql-novice@postgresql.org
Subject: Re: [PERFORM] Extreme high load averages
In-Reply-To: <3F07FA98.70009@ethereal-realms.org>
References: <3F07ABA1.2070100@ethereal-realms.org> <200307060849.00544.dev@archonet.com> <3F07FA98.70009@ethereal-realms.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox