Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > Oddly slow quer...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 15 Topic 3993 of 4424
Post > Topic >>

Oddly slow queries

by spreng@[EMAIL PROTECTED] (Thomas Spreng) Apr 15, 2008 at 09:01 PM

Hi everyone,

I have some serious performance problems on a database where some  
queries take up to 100 (or even more) times longer occasionally. The  
database itself consists of one bigger table (around 3.5GB in size and  
around 2 mio rows, 4-5 additional indexes) and some really small tables.

The queries in question (select's) occasionally take up to 5 mins even  
if they take ~2-3 sec under "normal" conditions, there are no  
sequencial scans done in those queries. There are not many users  
connected (around 3, maybe) to this database usually since it's still  
in a testing phase. I tried to hunt down the problem by playing around  
with resource usage cfg options but it didn't really made a difference.

The processes of such queries show up in 'uninterruptible sleep' state  
more or less for the whole time afaict. When I strace(1) such a  
process I see tons of _llseek()'s and and quite some read()'s.  
iostat(1) shows an utilization of close to 100% with iowait of 25-50%  
(4 CPU's).

I assume that the server underequipped in terms of RAM. But even if  
the the queries need to read data from the disk it seems odd to me  
that the variance of the time spend is so enormously big. Is this  
normal or am I correct with my assumtion that there's something wrong?

Has anyone an idea what else I could do to find out what's the cause  
of my problem?

The server:
Linux 2.6.15.6
PostgreSQL 8.1.8
4x Xeon CPU's
1.5 GB Ram
3x SCSI HD's (probably on a RAID-5 config, not quite sure though)

Regards,

Tom

-- 
Sent via pgsql-performance mailing list (pgsql-performance@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
 




 15 Posts in Topic:
Oddly slow queries
spreng@[EMAIL PROTECTED]   2008-04-15 21:01:49 
Re: Oddly slow queries
lists@[EMAIL PROTECTED]   2008-04-16 01:24:01 
Re: Oddly slow queries
spreng@[EMAIL PROTECTED]   2008-04-16 06:07:04 
Re: Oddly slow queries
lists@[EMAIL PROTECTED]   2008-04-16 10:21:38 
Re: Oddly slow queries
Chris Browne <cbbrowne  2008-04-16 11:42:03 
Re: Oddly slow queries
spreng@[EMAIL PROTECTED]   2008-04-16 23:48:21 
Re: Oddly slow queries
ajs@[EMAIL PROTECTED] (A  2008-04-16 23:19:47 
Re: Oddly slow queries
Christopher Browne <cb  2008-04-19 13:11:05 
Re: Oddly slow queries
spreng@[EMAIL PROTECTED]   2008-04-22 15:42:25 
Re: Oddly slow queries
scott.marlowe@[EMAIL PROT  2008-04-19 11:04:06 
Re: Oddly slow queries
spreng@[EMAIL PROTECTED]   2008-04-22 11:48:01 
Re: Oddly slow queries
lists@[EMAIL PROTECTED]   2008-04-22 12:29:29 
Re: Oddly slow queries
scott.marlowe@[EMAIL PROT  2008-04-22 09:25:42 
Re: Oddly slow queries
spreng@[EMAIL PROTECTED]   2008-04-26 16:12:39 
Re: Oddly slow queries
Maha <savanna3000@[EMA  2008-04-22 11:43:49 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 7:42:01 CST 2008.