Re: SHM_LOCK under Linux ... do we use this?

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: SHM_LOCK under Linux ... do we use this?
Date: 2005-09-20 20:13:57
Message-ID: 43306D85.9080808@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/18/2005 5:14 AM, Qingqing Zhou wrote:
> ""Marc G. Fournier"" <scrappy(at)postgresql(dot)org> writes
>>
>> I've done a grep through the code, to see if its something that we do use,
> and
>> it doesn't seem to come back with anything ... I believe its considered
>> common knowledge that 'swapping' for a database is evil, so am wondering
>> if there is some way that we can make use of this to help reduce/eliminate
>> that from happening?
>>
>
> There are some similar flags in other OS could help us to keep the memory
> resident in. However, it is not always a net win if we force it. This is
> because other parts of the system (like fork a process) may need memory, so
> the OS will pick up the "coldest" memory to be swapped. If we have already
> use our memory intensively, I don't think we will be swapped. On the
> contrary, if we force OS not to swap some memory, we may get other penalties
> like our processes have to be sarcrificed.

If this happens often to be PostgreSQL's shared buffers, then you have
configured too many of them.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-09-20 21:05:05 Re: DISTINCT vs. GROUP BY
Previous Message Martijn van Oosterhout 2005-09-20 20:10:32 Re: passing parameters to CREATE INDEX