Search Postgresql Archives

Re: high %system time

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

 



Bill Moran wrote:
On Tue, 06 Jun 2006 09:19:10 -0400
Jacob Coby <jcoby@xxxxxxxxxxxxxxx> wrote:

We recently upgraded from php 4.3.10 to 5.1.2, and the %system time has skyrocketed:

Cpu(s): 42.8% us, 43.6% sy,  0.0% ni, 11.3% id,  2.2% wa,  0.2% hi,  0.0% si
Mem:   8312844k total,  7566168k used,   746676k free,    22356k buffers
Swap:  2040244k total,      520k used,  2039724k free,  6920384k cached

it used to be around 5% to 10%. The server is a quad-xeon dell pe 6650 running CentOS 4.2 with 8G of RAM running pg 8.1.1.

How can I determine what is causing such high system load? it seems to have immediately jumped with the php upgrade.

This sounds more like a PHP question than a PostgreSQL question.

I know. I'm looking for advice on what would affect system time. Its actually not related so much to the php upgrade as a major code change we did. What baffles me is that the db abstraction layer didn't change.


However, we had a similar problem recently, and I ran ktrace (on FreeBSD)
to track down the system calls.  2 things jumped out:
1) pg_connect() creates a LOT of system time compared to pg_pconnect()

We use pg_pconnect(). We also reuse connections to avoid the overhead of RESET ALL (php issues a RESET ALL on persistent connections, which can take up to 0.1s)

2) require_once() and include_once() are truly evil.

Can you elaborate a bit on this? Privately if you want since it's off topic for this list.

Thanks.
--
Jacob Coby



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux