From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | 德哥 <digoal(at)126(dot)com>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14159: PostgreSQL 9.6 parallel scan consume very high mutex lock |
Date: | 2016-05-27 06:10:47 |
Message-ID: | 20160527061047.ovbdmnnk65u3wc3n@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 2016-05-27 11:27:59 +0530, Amit Kapila wrote:
> On Fri, May 27, 2016 at 5:51 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> >
> > On 2016-05-27 05:43:00 +0530, Amit Kapila wrote:
> > > On Thu, May 26, 2016 at 11:03 AM, 德哥 <digoal(at)126(dot)com> wrote:
> > >
> > > > This is worker process's stack, when i test the hign parallel degree.
> > > >
> > > > [<ffffffffa00b8ff0>] ext4_llseek+0x60/0x110 [ext4]
> > > > [<ffffffff81186eda>] vfs_llseek+0x3a/0x40
> > > > [<ffffffff81188b96>] sys_lseek+0x66/0x80
> > > > [<ffffffff8100c072>] system_call_fastpath+0x16/0x1b
> > > > [<ffffffffffffffff>] 0xffffffffffffffff
> > > >
> > > >
> > >
> > > Above call stack indicates that the file seek cost has increased on
> > > employing high number of workers. I think the reason is that employing
> > > more number of workers to perform parallel scan of same file doesn't
> work
> > > very well read-ahead mechanism of OS.
> >
> > I don't think that's the correct conclusion. That report and profiles
> > rather seems to suggest we're hitting lock contention, rather than IO
> > related cost.
> >
> > The kernel used here is quite old (heavily patched 2.6.32 IIRC). The
> > kernel guys have since made lseek not take locks in the common case. I
> > suspect that upgrading to a newer kernel will change the profile
> > significantly.
> >
>
> Worth trying, however I don't think we can discount the fact that using
> such large number of workers can saturate I/O channel.
Sure, that can be an issue. But if it were the bottleneck we wouldn't
see contention in a kernel spinlock, below lseek() (which in a postgres
workload pretty much never has to do IO).
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | kou | 2016-05-27 07:04:33 | BUG #14160: DROP ACCESS METHOD IF EXISTS isn't implemented |
Previous Message | Amit Kapila | 2016-05-27 05:57:59 | Re: BUG #14159: PostgreSQL 9.6 parallel scan consume very high mutex lock |