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

James A. Sutherland
2001-04-19T17:31:38Z

On Thu, 19 Apr 2001 18:46:00 +0200 (MEST), you wrote:

>> >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
>>
>> Hrm? Can you trim the consumption a bit - try cutting a big chunk out,
>> like 64 Mb, and see if it works then?
>>
>If I ask much less memory it works.. but has no interest.
>
>In fact I a call mlockall() _before_ doing my big malloc, it works even
>when I ask 240 megs, but:
>-Under 2.2.17, quickly the kernel kills my process

Gagh?! What signal? Any oops/core/panic?

>-Under 2.4.2, kswapd again eats the CPU:

Does it eat it continually, or do you get it back after a while? You
SHOULD see it chewing up all the CPU until it has evicted 240 Mb worth
of pages, then going back to sleep...

James.