pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeremy Harris <jgh@wizmail.org>
To: pgsql-performance@postgresql.org
Subject: Re: external sort performance
Date: Sun, 20 Nov 2011 16:11:53 +0000
Message-ID: <4EC926C9.1030409@wizmail.org> (raw)
In-Reply-To: <CAKuK5J2Z5d=ADthwGvaxu2OVJUHMwsHQSJvpmPtskRsZAkHKzQ@mail.gmail.com>
References: <CAKuK5J3taH85P6zc1j63mkwiNXH2nfJ5ER6R1+Vk5iG_Cq-cFw@mail.gmail.com>
	<4EC906FE.5040902@wizmail.org>
	<CAKuK5J2Z5d=ADthwGvaxu2OVJUHMwsHQSJvpmPtskRsZAkHKzQ@mail.gmail.com>

On 2011-11-20 15:00, Jon Nelson wrote:
>  Do you happen to recall if disk I/O is
> counted as user or system time?

Neither, traditionally.  Those times are cpu times;
they only account for what the cpu was doing.
The disks could be working in parallel as a result
of cpu actions, and probably were - but the software
found work to do for the cpu.   You'd want to be
looking at iostat during the run to see how busy the
disks were.

As to why it takes 16 hours cpu to do the external
version but only 34 minutes for internal - some of that
will be down to data-shuffling in- and out- of disk files
which is nonetheless accounted to user-mode cpu time,
but some will be the plain inefficiency of the external
version having to effectively do work over many times
because it can't have a complete view of the problem at
hand at any one time.

-- 
Jeremy



view thread (11+ messages)

Message-ID: <4EC926C9.1030409@wizmail.org>
Permalink:  ../4EC926C9.1030409@wizmail.org/
Also on:    postgresql.org/message-id/4EC926C9.1030409@wizmail.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: jgh@wizmail.org
  Subject: Re: external sort performance
  In-Reply-To: <4EC926C9.1030409@wizmail.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox