pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Shaun Thomas <bonesmoses@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-performance@postgresql.org
Subject: Re: Having some problems with concurrent COPY commands
Date: Tue, 13 Oct 2015 16:23:36 +0200
Message-ID: <20151013142336.GG10323@awork2.anarazel.de> (raw)
In-Reply-To: <CAB78C+D1N3d-WWu3OCY6Ugf=+jKrsxfL=wky5D3crQ-BDy6hDg@mail.gmail.com>
References: <CAB78C+C9uw4hS+_k2_sR1zgjb1DyL5UonqjmW+WNno3osx=_8g@mail.gmail.com>
	<20151012182808.GB10323@awork2.anarazel.de>
	<CAB78C+D=4CyZ-33kLvvZMenQWtkNEsmvkMKRPSV3AG2edchgbA@mail.gmail.com>
	<561CCFB6.6040405@iki.fi>
	<CAB78C+D1N3d-WWu3OCY6Ugf=+jKrsxfL=wky5D3crQ-BDy6hDg@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 2015-10-13 07:14:01 -0700, Shaun Thomas wrote:
> On Tue, Oct 13, 2015 at 2:32 AM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> > 80% of the CPU time is spent in the b-tree comparison function.
> 
> In the logs, my duration per COPY command increases from about 1400ms
> for one process to about 3800ms when I have four running concurrently.
> That's really my only data point, unfortunately. Strace isn't super
> helpful because it just says 70-ish% of the time is wait4, but that's
> not significantly different than the results using one process.

Please run a profile. Compile postgres with CFLAGS='-O2 -fno-omit-frame-pointer'
as an argument to configure. That'll allow us to get a hierarchical profile.

Then first do a plain cpu profile:
perf record -g -a sleep 5
perf report > somefile

Then let's look at lock contention:
perf record -g -a -e syscalls:sys_enter_semop sleep 5
perf report > somefile

and send the results.

Thanks,

Andres


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (9+ messages)  latest in thread

Message-ID: <20151013142336.GG10323@awork2.anarazel.de>
Permalink:  ../20151013142336.GG10323@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20151013142336.GG10323@awork2.anarazel.de

 · 

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: andres@anarazel.de, bonesmoses@gmail.com, hlinnaka@iki.fi
  Subject: Re: Having some problems with concurrent COPY commands
  In-Reply-To: <20151013142336.GG10323@awork2.anarazel.de>

* 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