pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: Saurabh Dave <saurabhdave@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Queries very slow and memory consumption too high
Date: Mon, 22 Jun 2009 14:41:15 +0800
Message-ID: <1245652875.14499.7.camel@tillium.localnet> (raw)
In-Reply-To: <fdd0c0f90906212202s68a9e393u654420245e84df31@mail.gmail.com>
References: <fdd0c0f90906212202s68a9e393u654420245e84df31@mail.gmail.com>

On Mon, 2009-06-22 at 10:32 +0530, Saurabh Dave wrote:
> Hi,
> 
> I am using Postgres 8.2.10 + Hibernate + c3p0 connection pooling. 
> For our application we support MySQL + Oracle + MSSQL + Postgres.
> 
> With all the other databases our application is working quite fine,
> but with Postgres after a day queries are becoming extremely slow and
> it seems to be taking up all the available memory.
> 
> Please let me know what could be the issue. I am new to Postgres, so
> any help would be greatly appreciated.

You might want to provide some basic information, like:

- What platform / OS / version your PostgreSQL server runs on. Eg
"Ubuntu 9.04" or "Windows 2003 server".

- The hardware specs of your server, including CPU, memory, and most
importantly disks. "2Ghz" isn't good enough; a good description would be
something like "SomeOem 2200GX - two 2.4GHz Xeon E4420s, 16GB RAM, 3Ware
9550/16 SATA disk controller with battery backup, write cache enabled,
attached to 8 250GB 10,000rpm SATA HDDs in RAID 5 and 4 1TB HDDs in RAID
10."

- Where on the server's disks your PostgreSQL data is. For example, you
might say "WAL on 4x1TB RAID 10, main DB on 8x250GB RAID 5, pg_temp and
sort tempfiles on single 8GB SATA RAM drive". If all your postgresql
data is in one place, just mention how it's stored - the file system
type, the RAID level, etc.

- How much memory does your server have free when it slows down? On
UNIX/Linux use "top" and "vmstat" to find this out. On Windows, this
depends on OS version, but the process manager / task manager /
performance monitor should tell you.

- Is your server doing lots of disk I/O when it's slow? (unix/linux:
seem vmstat. Windows Vista, see performance monitor. Others: nfi)

- Is your server paging to disk when it's busy? (unix/linux: see vmstat.
Windows: see task manager/process manager/performance monitor)

-- 
Craig Ringer




view thread (13+ messages)  latest in thread

Message-ID: <1245652875.14499.7.camel@tillium.localnet>
Permalink:  ../1245652875.14499.7.camel@tillium.localnet/
Also on:    postgresql.org/message-id/1245652875.14499.7.camel@tillium.localnet

 · 

reply

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-jdbc@postgresql.org
  Cc: craig@postnewspapers.com.au, saurabhdave@gmail.com
  Subject: Re: Queries very slow and memory consumption too high
  In-Reply-To: <1245652875.14499.7.camel@tillium.localnet>
  References: <fdd0c0f90906212202s68a9e393u654420245e84df31@mail.gmail.com> <1245652875.14499.7.camel@tillium.localnet>

* 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