From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Shaun Thomas <bonesmoses(at)gmail(dot)com> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Having some problems with concurrent COPY commands |
Date: | 2015-10-13 14:23:36 |
Message-ID: | 20151013142336.GG10323@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On 2015-10-13 07:14:01 -0700, Shaun Thomas wrote:
> On Tue, Oct 13, 2015 at 2:32 AM, Heikki Linnakangas <hlinnaka(at)iki(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Shaun Thomas | 2015-10-13 19:33:11 | Re: Having some problems with concurrent COPY commands |
Previous Message | Shaun Thomas | 2015-10-13 14:14:01 | Re: Having some problems with concurrent COPY commands |