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

Re: Hardware/OS recommendations for large databases (

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Alan Stange <stange(at)rentec(dot)com>
Cc: Luke Lonergan <llonergan(at)greenplum(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Dave Cramer <pg(at)fastcrypt(dot)com>, Joshua Marsh <icub3d(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Hardware/OS recommendations for large databases (
Date: 2005-11-20 14:22:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Alan Stange <stange(at)rentec(dot)com> writes:

> > Iowait is time spent waiting on blocking io calls.  As another poster
> > pointed out, you have a two CPU system, and during your scan, as predicted,
> > one CPU went 100% busy on the seq scan.  During iowait periods, the CPU can
> > be context switched to other users, but as I pointed out earlier, that's not
> > useful for getting response on decision support queries.

I don't think that's true. If the syscall was preemptable then it wouldn't
show up under "iowait", but rather "idle". The time spent in iowait is time in
uninterruptable sleeps where no other process can be scheduled.

> iowait time is idle time. Period.   This point has been debated endlessly for
> Solaris and other OS's as well.
> Here's the man page:
>               %iowait
>                      Show  the  percentage  of  time that the CPU or CPUs were
>                      idle during which the system had an outstanding disk  I/O
>                      request.
> If the system had some other cpu bound work to perform you wouldn't ever see
> any iowait time.  Anyone claiming the cpu was 100% busy on the sequential scan
> using the one set of numbers I posted is misunderstanding the actual metrics.

That's easy to test. rerun the test with another process running a simple C
program like "main() {while(1);}" (or two invocations of that on your system
because of the extra processor). I bet you'll see about half the percentage of
iowait because postres will get half as much opportunity to schedule i/o. If
what you are saying were true then you should get 0% iowait.


In response to


pgsql-performance by date

Next:From: Steinar H. GundersonDate: 2005-11-20 14:29:35
Subject: Re: Hardware/OS recommendations for large databases (
Previous:From: Alan StangeDate: 2005-11-20 13:42:09
Subject: Re: Hardware/OS recommendations for large databases (

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