Skip site navigation (1) Skip section navigation (2)

Re: Low CPU Usage

From: brauagustin-susc(at)yahoo(dot)com(dot)ar
To: Bill Moran <wmoran(at)collaborativefusion(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Low CPU Usage
Date: 2007-09-21 19:33:46
Message-ID: 322942.8256.qm@web30004.mail.mud.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-performance
> > >> > That's not what it looks like based on the EXPLAIN ANALYZE output.
> > >> > It looks like run time dropped from two seconds to half a second.
> > >>  
> > >> > It seems as though you either have a network delay delivering the results,
> > >> > or your application is slow to read them.
> > >> 
> > >> > Exactly how are you arriving at those timings you're reporting to us?
> > >>  
> > >> I have noticed this in a daly process I run which involves normally 45 minutes and with the new server takes 1:40.
> > >> 
> > >> Some days ago I began to do some tests with no success, then I opened PgAdmin with this simply query to read 2 big tables and then compare disk access.
> > >> SELECT *
> > >> FROM fact_ven_renta fvr, dim_producto_std_producto dpp
> > >> WHERE
> > >>   fvr.producto_std_producto_sk = dpp.producto_sk
> > >>  
> > >> fact_ven_renta has 136316 rows
> > >> dim_producto_std_producto has 3669 rows
 >> 
> > >Run the tests from psql on the same server.  As Kevin pointed out, the _server_ is faster, but it appears as if the connection between PGadmin and this new server is slower somehow.
> > 
> > It runs quickly!!! But I don't know how to compare because looks like it retrieve fields by demand, when I put ctrl+end (go to the last record) it use a lot of CPU and disk, run quickly anyway.

> That's pretty odd.  If you use \timing in psql, you can get execution
> time for each query, if it helps you track things down.

Yes, in the new server running with \timing it consumes 5.6 seconds and in the old server it consumes 25 seconds.

> > Correct me if am I wrong but, executing PgAdmin in the same server there aren't networks delays!

> Not network, no.  But the results of your explains seem to show that the
> query is executing much faster on the new system than the old, so the
> problem still becomes, "what is happening after the query completes that
> is so slow?"  It's just that networking is ruled out.

Is connected to full 100Mb, it transfers many things quick to clients. Is running Apache adn JBoss, transfer rate is good, I did scp to copy many archives and is as quick as the old server.

I have no idea how to continue researching this problem. Now I'm going to do some networks tests.


-- 
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran(at)collaborativefusion(dot)com
Phone: 412-422-3463x4023







      Las últimas noticias sobre el Mundial de Rugby 2007 están en Yahoo! Deportes. ¡Conocelas!
http://ar.sports.yahoo.com/mundialderugby

Responses

pgsql-performance by date

Next:From: Alvaro HerreraDate: 2007-09-21 19:56:44
Subject: Re: Query planner unaware of possibly best plan
Previous:From: Denes DanielDate: 2007-09-21 19:29:55
Subject: Re: Query planner unaware of possibly best plan

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group