Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2012 08:44:31 -0800
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Damien Fleuriot <ml@my.gd>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: PostgreSQL benchmarks (now with Linux numbers)
Message-ID:  <CAGH67wQxg10DBL1M1PVy8A6LX=d%2BE1=KDZOkF3fNiPEU-JvzNg@mail.gmail.com>
In-Reply-To: <4F46500D.3070609@my.gd>
References:  <b1732c99-eec2-4097-ad9c-f58979addf9f@email.android.com> <4F45AB76.5050201@FreeBSD.org> <201202230822.16304.jhb@freebsd.org> <4F46500D.3070609@my.gd>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 23, 2012 at 6:41 AM, Damien Fleuriot <ml@my.gd> wrote:
>
>
> On 2/23/12 2:22 PM, John Baldwin wrote:
>> On Wednesday, February 22, 2012 9:59:02 pm Doug Barton wrote:
>>> On 02/22/2012 01:42, Ivan Voras wrote:
>>>> The Dragonfly team has recently liberated their VM from the giant lock=
 and there are some interesting benchmarks comparing it to FreeBSD 9 and a
>> derivative of RedHat Enterprise Linux:
>>>>
>>>> http://leaf.dragonflybsd.org/mailarchive/kernel/2011-11/msg00008.html
>>>>
>>>> Other developments are described in their release notes: http://www.dr=
agonflybsd.org/release30/
>>>
>>> The 4.5 times improvement by enabling kern.ipc.shm_use_phys is pretty
>>> notable, what prevents us from enabling that by default?
>>
>> It makes all your SYSV SHMs wired. =A0That's fine if you are running a d=
edicated
>> server using SYSV SHMs where you want that process to use all the RAM in=
 the
>> machine (e.g. a pgqsl server). =A0It's not so great for a general purpos=
e load
>> where you would like an otherwise-idle process using SYSV SHMs to have t=
he SHMs
>> paged out to swap if other processes on the machine need memory and the =
box is
>> under memory pressure.
>>
>
> John, any chance we can get that in layman's terms ?
>
> I'm totally no coder, but I'd really like if we could do this at my work
> place to increase our firewalls' performances.

(simplifying things...
    If postgres is the only man in town, then having SYSV SHM (system
5 shared memory) wired down in the kernel would be fine. However, if
postgres's not the only man in town, postgres will starve other
applications (say Firefox) so they can't get the resources they need
to work.
    A good real life example -- similar to the above -- of memory
starvation situations is ZFS v28 on boxes where vfs.zfs.arc_max isn't
tuned and the system RAM is overcommitted, such that ZFS will starve
userland of all available RAM in the right scenarios. Granted, this
scenario uses KVM (kernel virtual memory), not SYSV SHM (this is a
subset of KVM), but the general concept (limited resources -> consumer
doesn't give up resources -> other waiters starve) is very much the
same.
HTH,
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wQxg10DBL1M1PVy8A6LX=d%2BE1=KDZOkF3fNiPEU-JvzNg>