Re: Want to allocate almost all the memory with no swap

Simon Derr
2001-04-19T15:58:38Z

On Thu, 19 Apr 2001, James A. Sutherland wrote:

> On Thu, 19 Apr 2001 17:39:23 +0200 (MEST), you wrote:
>
> >Hi,
> >
> >I'm currently trying to run a high-performance bench on a cluster of PCs
> >under Linux. This bench is the Linpack test, and needs a lot of memory to
> >store a matrix of numbers. Linpack needs to allocate as much as 240 Megs
> >on a machine that has 256 Megs of RAM, but I have to be sure that the
> >memory used by linpack will never be swapped on the disk.
>
> Call mlockall() to lock all your memory into physical RAM - there's a
> flag to set which ensures all your future allocations are locked as
> well. You should be left with 16 Mb of physical RAM free, plus swap,
> so you should be able to do this as long as the machine isn't too
> heavily loaded at the time - no running Netscape during benchmarks :-)

Well, I have removed as many processes deamons as I could, and there are
not many left.
But under both 2.4.2 and 2.2.17 (with swap on)I get, when I run my
program:

mlockall: Cannot allocate memory

Simon.