Re: POSIX question - Mailing list pgsql-hackers

From Radosław Smogura
Subject Re: POSIX question
Date
Msg-id 201106201639.02157.rsmogura@softperience.eu
Whole thread Raw
In response to Re: POSIX question  (Florian Pflug <fgp@phlo.org>)
Responses Re: POSIX question
List pgsql-hackers
Florian Pflug <fgp@phlo.org> Monday 20 of June 2011 16:16:58
> On Jun20, 2011, at 15:27 , Radosław Smogura wrote:
> > 1. mmap some large amount of anonymous virtual memory (this will be
> > maximum size of shared memory). ...
> > Point 1. will no eat memory, as memory allocation is delayed and in 64bit
> > platforms you may reserve quite huge chunk of this, and in future it may
> > be possible using mmap / munmap to concat chunks / defrag it etc.
>
> I think this breaks with strict overcommit settings (i.e.
> vm.overcommit_memory = 2 on linux). To fix that, you'd need a way to tell
> the kernel (or glibc) to simply reserve a chunk of virtual address space
> for further user. Not sure if there's a API for that...
>
> best regards,
> Florian Pflug

This may be achived by many other things, like mmap /dev/null.

Regards,
Radek


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Range Types and extensions
Next
From: Cédric Villemain
Date:
Subject: Re: Re: patch review : Add ability to constrain backend temporary file space