Subject: Re: How to Disable Page Swapping to Disk in NetBSD?
To: None <>
From: Thor Lancelot Simon <>
List: tech-kern
Date: 12/19/2004 00:22:08
On Sun, Dec 19, 2004 at 12:12:04AM -0500, Thor Lancelot Simon wrote:
> Just don't configure any swap space when the system starts up.  If you
> really want all application pages -- even executable code, not just
> data -- to stay resident in RAM and never be read from secondary storage --
> one thing you could do would be to modify the C library (or the main()
> function of all executables you provide) to call mlockall(MCL_FUTURE).
> For this to work, you will also need to modify the default memorylocked 
> limit so that it is as high as the memoryuse limit.

You will also, I think, want to ensure that the environment always has
the variable LD_BIND_NOW set when starting any executable.  That should
also serve to reduce latency while running, at the expense of a significant
increase in program startup time.

 Thor Lancelot Simon	                            

"The inconsistency is startling, though admittedly, if consistency is to be
 abandoned or transcended, there is no problem."		- Noam Chomsky