From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers(at)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com>, Thom Brown <thom(at)linux(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com> |
Subject: | Re: Posix Shared Mem patch |
Date: | 2012-06-28 18:06:18 |
Message-ID: | 201206282006.19188.andres@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thursday, June 28, 2012 08:00:06 PM Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > On Thursday, June 28, 2012 07:43:16 PM Tom Lane wrote:
> >> I think it *would* be a good idea to mlock if we could. Setting shmem
> >> large enough that it swaps has always been horrible for performance,
> >> and in sysv-land there's no way to prevent that. But we can't error
> >> out on permissions failure.
> >
> > Its also a very good method to get into hard to diagnose OOM situations
> > though. Unless the machine is setup very careful and only runs postgres I
> > don't think its acceptable to do that.
>
> Well, the permissions angle is actually a good thing here. There is
> pretty much no risk of the mlock succeeding on a box that hasn't been
> specially configured --- and, in most cases, I think you'd need root
> cooperation to raise postgres' RLIMIT_MEMLOCK. So I think we could try
> to mlock without having any effect for 99% of users. The 1% who are
> smart enough to raise the rlimit to something suitable would get better,
> or at least more predictable, performance.
The heightened limit might just as well target at another application and be
setup a bit to widely. I agree that it is useful, but I think it requires its
own setting, defaulting to off. Especially as there are no experiences with
running a larger pg instance that way.
Greetings,
Andres, for once the conservative one, Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-06-28 18:11:18 | Re: Posix Shared Mem patch |
Previous Message | Tom Lane | 2012-06-28 18:00:06 | Re: Posix Shared Mem patch |