Re: High SYS CPU - need advise

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Vlad <marchenko(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: High SYS CPU - need advise
Date: 2012-11-16 00:07:14
Message-ID: CAMkU=1w3fq_oEDPGd17BEK2bKFvsG3+TuEB7Vb7Gc8ikmK9ipA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 15, 2012 at 2:44 PM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:

>>> select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout)
>>> select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout)
>>> select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout)
>>> select(0, NULL, NULL, NULL, {0, 2000}) = 0 (Timeout)
>>> select(0, NULL, NULL, NULL, {0, 3000}) = 0 (Timeout)
>>> select(0, NULL, NULL, NULL, {0, 4000}) = 0 (Timeout)
>>> select(0, NULL, NULL, NULL, {0, 6000}) = 0 (Timeout)
>>> select(0, NULL, NULL, NULL, {0, 7000}) = 0 (Timeout)
>>> select(0, NULL, NULL, NULL, {0, 8000}) = 0 (Timeout)
>>> select(0, NULL, NULL, NULL, {0, 9000}) = 0 (Timeout)

This is not entirely inconsistent with the spinlock. Note that 1000
is repeated 3 times, and 5000 is missing.

This might just be a misleading random sample we got here. I've seen
similar close spacing in some simulations I've run.

It is not clear to me why we use a resolution of 1 msec here. If the
OS's implementation of select() eventually rounds to the nearest msec,
that is its business. But why do we have to lose intermediate
precision due to its decision?

Cheers,

Jeff

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Harry 2012-11-16 06:34:08 PG_TERMINATE_BACKEND not working.
Previous Message Vlad Marchenko 2012-11-16 00:06:24 Re: High SYS CPU - need advise