From: Matthew Lunnon <mlunnon@rwa-net.co.uk>
To: Sven Geisler <sgeisler@aeccom.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Limited performance on multi core server
Date: Wed, 12 Dec 2007 11:06:19 +0000
Message-ID: <475FC0AB.1080403@rwa-net.co.uk> (raw)
In-Reply-To: <475FBC7F.6040707@aeccom.com>
References: <475FB50B.8060701@rwa-net.co.uk>
<475FBC7F.6040707@aeccom.com>
Limiting the queries was our initial thought but we then hit a problem
with connection pooling which didn't implement a fifo algorithm. Looks
like I'll have to look deeper into the connection pooling.
So you think the problem might be context switching on the server, I'll
take a closer look at the this
Thanks
Matthew
Sven Geisler wrote:
> Hi Matthew,
>
> I know exactly what you experience.
> We had a 4-way DC Opteron and Pg 7.4 too.
> You should monitor context switches.
>
>
> First suggest upgrade to 8.2.5 because the scale up is much better with 8.2.
>
> You need to limit the number of concurrent queries to less than 8 (8
> cores) if you need to stay with Pg 7.4.
>
> The memory setting is looking good to me. I would increase sort_mem and
> effective_cache_size, but this would solve your problem.
>
> Best regards
> Sven.
>
>
>
> Matthew Lunnon schrieb:
>
>> Hi,
>>
>> I have a 4 * dual core 64bit AMD OPTERON server with 16G of RAM, running
>> postgres 7.4.3. This has been recompiled on the server for 64 stored
>> procedure parameters, (I assume this makes postgres 64 bit but are not
>> sure). When the server gets under load from database connections
>> executing reads, lets say 20 - 40 concurrent reads, the CPU's seem to
>> limit at about 30-35% usage with no iowait reported. If I run a simple
>> select at this time it takes 5 seconds, the same query runs in 300
>> millis when the server is not under load so it seems that the database
>> is not performing well even though there is plenty of spare CPU. There
>> does not appear to be large amounts of disk IO and my database is about
>> 5.5G so this should fit comfortably in RAM.
>>
>> changes to postgresql.sql:
>>
>> max_connections = 500
>> shared_buffers = 96000
>> sort_mem = 10240
>> effective_cache_size = 1000000
>>
>> Does anyone have any ideas what my bottle neck might be and what I can
>> do about it?
>>
>> Thanks for any help.
>>
>> Matthew.
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 6: explain analyze is your friend
>>
>
>
--
Matthew Lunnon
Technical Consultant
RWA Ltd.
mlunnon@rwa-net.co.uk
Tel: +44 (0)29 2081 5056
www.rwa-net.co.uk
--
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: mlunnon@rwa-net.co.uk, sgeisler@aeccom.com
Subject: Re: Limited performance on multi core server
In-Reply-To: <475FC0AB.1080403@rwa-net.co.uk>
* 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