Re: Windows SHMMAX (was: Default configuration) - Mailing list pgsql-hackers

From Curt Sampson
Subject Re: Windows SHMMAX (was: Default configuration)
Date
Msg-id Pine.NEB.4.51.0302121519480.574@angelic.cynic.net
Whole thread Raw
In response to Windows SHMMAX (was: Default configuration)  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
List pgsql-hackers
On Tue, 11 Feb 2003, Merlin Moncure wrote:

> Another way of looking at it is memory mapped files.  This probably most
> closely resembles unix shared memory and is the de facto standard way
> for interprocess memory block sharing.  Sadly, performance will suffer
> because you have to rely on the virtual memory system (think: writing to
> files) to do a lot of stupid stuff you don't necessarily want or need.

To the contrary, for the majority of the shared memory usage of
postgres, which is cached file data, the virtual memory system is doing
exactly what you want it to: managing the movement of data between
memory and disk, and caching the more frequently accessed data to reduce
the chances you will actually need to access the disk for it.

For shared memory used only for IPC, typically a VM system treats it no
differently from any other non-shared memory, so if it's doing something
you "don't want or need" (a proposition I quite heartily disagree with),
it's going to be doing that very every piece of memory your application
allocates and uses, shared or not.

> The OS has to guarantee that the memory can be swapped out to file at
> any time and therefore mirrors the pagefile to the allocated memory
> blocks.

The OS does not need to write the pagefile. On modern Unix systems that
are not allowing overcommit, the space will be allocated but never
written unless there's a need to free up some physical memory, and the
pages in question are used infrequently enough that the system decides
that they are good candidates to be paged out. I would imagine that
Windows does the same.

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org   Don't you know, in this new Dark Age, we're
alllight.  --XTC
 


pgsql-hackers by date:

Previous
From: ow
Date:
Subject: Re: [pgsql-advocacy] PostgreSQL Benchmarks
Next
From: Kevin Brown
Date:
Subject: Re: location of the configuration files