Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-04-25 Thread Andres Freund
On 2014-04-24 23:28:14 +0200, Andres Freund wrote: > On 2014-04-24 12:43:13 -0400, Tom Lane wrote: > > Andres Freund writes: > > > On 2014-04-24 11:02:44 -0400, Tom Lane wrote: > > >> FWIW, I like the LWLockAssignBatch idea a lot better than the currently > > >> proposed patch. LWLockAssign is a

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-04-24 Thread Andres Freund
On 2014-04-24 12:43:13 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2014-04-24 11:02:44 -0400, Tom Lane wrote: > >> FWIW, I like the LWLockAssignBatch idea a lot better than the currently > >> proposed patch. LWLockAssign is a low-level function that has no business > >> making risky ass

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-04-24 Thread Tom Lane
Andres Freund writes: > On 2014-04-24 11:02:44 -0400, Tom Lane wrote: >> FWIW, I like the LWLockAssignBatch idea a lot better than the currently >> proposed patch. LWLockAssign is a low-level function that has no business >> making risky assumptions about the context it's invoked in. > I don't t

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-04-24 Thread Heikki Linnakangas
On 04/24/2014 07:24 PM, Andres Freund wrote: On 2014-04-24 11:02:44 -0400, Tom Lane wrote: Andres Freund writes: On 2014-04-24 15:56:45 +0300, Heikki Linnakangas wrote: Another idea is to add an LWLockAssignBatch(int) function that assigns a range of locks in one call. That would be very simp

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-04-24 Thread Andres Freund
On 2014-04-24 11:02:44 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2014-04-24 15:56:45 +0300, Heikki Linnakangas wrote: > >> Another idea is to add an LWLockAssignBatch(int) function that assigns a > >> range of locks in one call. That would be very simple, and I think it would > >> be l

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-04-24 Thread Tom Lane
Andres Freund writes: > On 2014-04-24 15:56:45 +0300, Heikki Linnakangas wrote: >> Another idea is to add an LWLockAssignBatch(int) function that assigns a >> range of locks in one call. That would be very simple, and I think it would >> be less likely to break things than a new global flag. I wou

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-04-24 Thread Andres Freund
On 2014-04-24 15:56:45 +0300, Heikki Linnakangas wrote: > On 04/17/2014 12:06 PM, Andres Freund wrote: > >On 2014-04-16 19:33:52 -0400, Bruce Momjian wrote: > >>On Tue, Feb 4, 2014 at 12:58:49AM +0100, Andres Freund wrote: > >>>On 2014-02-03 11:22:45 -0500, Tom Lane wrote: > Andres Freund wri

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-04-24 Thread Heikki Linnakangas
On 04/17/2014 12:06 PM, Andres Freund wrote: On 2014-04-16 19:33:52 -0400, Bruce Momjian wrote: On Tue, Feb 4, 2014 at 12:58:49AM +0100, Andres Freund wrote: On 2014-02-03 11:22:45 -0500, Tom Lane wrote: Andres Freund writes: On larger, multi-socket, machines, startup takes a fair bit of ti

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-04-17 Thread Andres Freund
On 2014-04-16 19:33:52 -0400, Bruce Momjian wrote: > On Tue, Feb 4, 2014 at 12:58:49AM +0100, Andres Freund wrote: > > On 2014-02-03 11:22:45 -0500, Tom Lane wrote: > > > Andres Freund writes: > > > > On larger, multi-socket, machines, startup takes a fair bit of time. As > > > > I was profiling

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-04-16 Thread Bruce Momjian
On Tue, Feb 4, 2014 at 12:58:49AM +0100, Andres Freund wrote: > On 2014-02-03 11:22:45 -0500, Tom Lane wrote: > > Andres Freund writes: > > > On larger, multi-socket, machines, startup takes a fair bit of time. As > > > I was profiling anyway I looked into it and noticed that just about all > > >

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-02-03 Thread Andres Freund
On 2014-02-03 11:22:45 -0500, Tom Lane wrote: > Andres Freund writes: > > On larger, multi-socket, machines, startup takes a fair bit of time. As > > I was profiling anyway I looked into it and noticed that just about all > > of it is spent in LWLockAssign() called by InitBufferPool(). Starting >

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-02-03 Thread Andres Freund
On 2014-02-03 11:22:45 -0500, Tom Lane wrote: > Andres Freund writes: > > On larger, multi-socket, machines, startup takes a fair bit of time. As > > I was profiling anyway I looked into it and noticed that just about all > > of it is spent in LWLockAssign() called by InitBufferPool(). Starting >

Re: [HACKERS] slow startup due to LWLockAssign() spinlock

2014-02-03 Thread Tom Lane
Andres Freund writes: > On larger, multi-socket, machines, startup takes a fair bit of time. As > I was profiling anyway I looked into it and noticed that just about all > of it is spent in LWLockAssign() called by InitBufferPool(). Starting > with shared_buffers=48GB on the server Nate Boley prov

[HACKERS] slow startup due to LWLockAssign() spinlock

2014-02-02 Thread Andres Freund
Hi, On larger, multi-socket, machines, startup takes a fair bit of time. As I was profiling anyway I looked into it and noticed that just about all of it is spent in LWLockAssign() called by InitBufferPool(). Starting with shared_buffers=48GB on the server Nate Boley provided, takes about 12 secon