Re: Low CPU Usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



brauagustin-susc@xxxxxxxxxxxx wrote:
> Recently I have installed a brand new server with a Pentium IV 3.2 GHz, SATA Disk, 2GB of Ram in Debian 4.0r1 with PostgreSQL 8.2.4 (previously a 8.1.9).
> I have other similar server with an IDE disk, Red Hat EL 4 and PostgreSQL 8.2.3
> 
> I have almost the same postgresql.conf in both servers, but in the new one (I have more work_mem than the other one) things go really slow.  I began to monitor i/o disk and it's really ok, I have test disk with hdparm and it's 5 times faster than the IDE one.
> Running the same queries in both servers in the new one it envolves almost 4 minutes instead of 18 seconds in the old one.
> Both databases are the same, I have vacuum them and I don't know how to manage this issue.

Have you ANALYZEd all tables?

Try running EXPLAIN ANALYZE on the query on both servers, and see if
they're using the same plan.

> The only weird thing is than in the older server running the query it uses 30% of CPU instead of 3 o 5 % of the new one!!!

That implies that it's doing much more I/O on the new server, so the CPU
just sits and waits for data to arrive from the disk.

That does iostat say about disk utilization on both servers?

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux