Re: No swap partition ?

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

  • Next message: hi.joshi_at_gmail.com: "Query Regarding bash script"
    Date: Mon, 17 Jan 2005 23:22:50 GMT
    
    

    Kasper Dupont <kasperd@daimi.au.dk> wrote:
    > to wait until the server comes back up. And if the mount is
    > done with nointr, which is the default on Linux, then the
    > key combinations you suggest are not going to work. At
    > least with intr the user gets to decide how long to wait.

    A good argument for intr.

    > Kill processes. I was stupid enough to try.

    I expect that was the OOM killer at large.

    > If the primary purpose of the machine is to be an NFS
    > server, you definitely should build it with swap space.
    > Making it without swap just means, that valuable RAM will
    > be used to store rarely used data. Such rarely used data
    > should be kept on disk, such that the RAM can be used for
    > caching more important data.

    True if you assume the amount or RAM recovered is worth
    the complexity of swapping.

    > But why remove cached pages you are going to need again
    > soon? There will be process data that is never going to be
    > used, why do you want to keep that data in RAM?

    Many cached pages are never needed again, or need to be
    written comparatively early.

    > In most cases that would slow down the system, but since
    > the NFS server is implemented in the kernel, that is not
    > going to be too much of a problem.

    Codepage reloads are no slower than swap, and considerably
    less complex.

    > they really are small, it just means a small swap partition
    > will suffice. If your system ever reports "SwapFree: 0kB"
    > you will know the swap space was too small.

    Yes. But I'd just as soon avoid the complexity of swap.

    >> Or if big, the nfsd will have to recognize memory pressure & react.
    > React how?

    A monolithic NFSD would hold memory and have to start writing
    out and/or clearing cache. Some people think they can do a
    better job of running cache than the kernel. I doubt it.

    > Do I have a choice? You are the one who will not let
    > the kernel do its job, but will rather force it to keep
    > particular data in RAM all the time.

    That's one way of looking at it. I prefer to make the
    poor overtaxed kernel's job easier.

    > Can you really strip it down to just 2MB?

    Somewhere around there. I remember my first Linux Slackware 3.3
    on i486 with 4 MB didn't need swap (but it helped).

    > On my system even init have more than 1MB of anonymous

    Sure. That doesn't mean it gets used.

    > mappings. You can easilly find out, because you can just
    > create a 3MB swap file/partition and see if it gets filled.

    Or you can boot with a restrictive bootparm like mem=6M

    > IMHO the minimum for an NFS server would be: init, syglogd,
    > klogd, ntpd, sshd, gpm, mingetty

    Sounds like a reasonable list. I don't know of any util that
    will show the minimum CoW usage of these.

    -- Robert


  • Next message: hi.joshi_at_gmail.com: "Query Regarding bash script"

    Relevant Pages

    • Re: HELP! Installation Questions
      ... That gives enough space for the swap and leaves room for growth should more RAM be added at a later date. ... If this is server is for production use, I would use the 32-bit i386 version as it has been the longest and is the most deployed version. ... How can I get required Space when doing partition during installation? ...
      (freebsd-questions)
    • oom-killer: gfp_mask=0xd1 with 2.6.12 on EM64T
      ... On a dual EM64T Xeon with 4GB of RAM, ... all swap space still available). ... oom-killer kills one or two of those processes, with the kernel messages ...
      (Linux-Kernel)
    • Re: Simple script that locks up my box with recent kernels
      ... >> and just run the resulting kernel version for a day or two. ... then I'll restart bisection and give each ... The box has 2GB of RAM and 768MB swap. ...
      (Linux-Kernel)
    • Re: OOM killer "Out of Memory: Killed process" SOLUTIONS / SUMMARY
      ... We are having this problem on a RHEL5 server with 8gb of ram since ... I understand that the hugemem kernel is no longer available in RHEL5, ...
      (RedHat)
    • Re: Caching control
      ... Since it is keeping the pages in RAM after being written, ... Ironically, the probless is less severe, the less swap there is. ... Multitutes of 2.6 kernel versions. ... | set size (just counting direct memory usage, ...
      (comp.os.linux.development.system)