Re: PostgreSQL performance tuning

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Vincent Chen <vctw(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: PostgreSQL performance tuning
Date: 2006-03-01 19:25:32
Message-ID: 20060301192532.GM82012@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sat, Feb 25, 2006 at 09:22:31PM +0800, Vincent Chen wrote:
>
> Hi, all
>
> I have a postgresql 7.4 running on mandriva linux 10.1 with 512M RAM & AMD
> 2000+ CPU. I increased system share memory to 128M, buffer to 64M, sort memory
> to 32M. A single query do finish much faster. Now I need to analyze some weekly
> data involving hundred queries with 'group by order by' operation. Total data
> less than 250M, but did take some time to complete. How can I tune my system to
> handle a lot of concurrent quries at the same time and do it faster?
>
> BTW, upgrade hardware is not an option at this time. ;>

The challenge is making sure you don't make the OS start swapping, which
will destroy performance. If there's some queries where substantially
more sort memory would help and you can control how many of those run at
once, you might be able to increase sort_memory more for just those
queries. (Easiest to put the queries in a transaction and do a SET
LOCAL).

Also, you should absolutely upgrade to 8.1 if at all possible. Some
folks have seen performance more than double, depending on the workload.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kris Deugau 2006-03-01 22:14:27 Need reference doc on precedence/ordering for pg_hba.conf
Previous Message Jim C. Nasby 2006-03-01 19:21:33 Re: REINDEX during a transaction