Re: No swap partition ?

From: Robert Redelmeier (redelm_at_ev1.net.invalid)
Date: 01/18/05


Date: Tue, 18 Jan 2005 15:59:24 GMT

Kasper Dupont <kasperd@daimi.au.dk> wrote:
>> Some people think they can do a
>> better job of running cache than the kernel.
>
> You seem to be one of those people.

Ho, I am not. I do believe that some people might make
the argument that NFS accesses have something special
that general-purpose cahcing doesn't handle optimally.
I very much doubt that people can do better, especially
with the buffering imposed by the kernel.

> Unless you actually remove all of that code from
> the kernel, that argument doesn't hold.

If the code don't run, it only eats memory and doesn't
cause trouble. Apparently, the VM system has held 2.4
NFS back. Trond posted to the LKML:

} Probably. The VM decides when to push out data in 2.6.x. In 2.4.x
} we had artificial hard limits on the number of dirty pages that
} were allowed to exist, now all that is controlled by the VM.

> But is that really what you use on your NFS servers?

Certainly not! But it does have about the same process
load and daemon list you gave.

> What do you mean by gets used? Only if the pages were
> allocated and never written they will be CoW of the zero
> page. If they have been written and then never gets used
> again, I don't want them to be in RAM. And there surely
> are pages that you can write to swap and forget.

Perhaps, but how many of there are there? Memory is only
written to in order to be later read. A lot of memory
used is on the stack, which gets automatically reused.

> That wouldn't answer the question. The kernel needs memory
> for other stuff as well. And you need some amount of memory
> for caching memory mappings in order for the start scripts
> to actually execute.

Of course. But it does give you an idea of how much your
daemon load is, and how how much you might recover to swap.

-- Robert



Relevant Pages

  • kernel panic - not syncing: out of memory and no killable processes
    ... Kernel panic - not syncing: Out of memory and no killable processes... ... Re-tune the scheduler latency defaults to decrease worst-case latencies ... # Device Drivers ...
    (Linux-Kernel)
  • [UNIX] Linux Kernel do_brk() Vulnerablility (Explained)
    ... Get your security news from a reliable source. ... A critical security bug has been found in the Linux kernel 2.4.22 (and ... earlier) memory management subsystem. ... for the code working at the lowest privilege level. ...
    (Securiteam)
  • Re: Cached memory never gets released
    ... Stock linux 2.4.26 kernel. ... Due to flash bug 3M of memory gets lost due to font memory getting lost ... The output of "free" cache number steadily grows. ... longer to exhaust all of system memory with the cache. ...
    (Linux-Kernel)
  • Re: memory not released after using cdrecord/cdrdao (was: audio cd writing causes massive swap and c
    ... The kernel is most definitely not releasing the memory ... I further would have to say that the kernel isn't being ... >after cdrdao or cdrecord have used it, ... the Linux Kernel maintainers have not been very helpful with Linux ...
    (Linux-Kernel)
  • Re: Allocating kernel memory
    ... am doing has to be in kernel space - no other option. ... I never complained about the real memory that was used but pointed out ... the features of the architecture in the best possible way. ... Oh but wait, paging is there to ...
    (comp.os.linux.development.system)