Re: prevent out of memory

From: Jean-David Beyer (jdbeyer_at_exit109.com)
Date: 07/30/04

  • Next message: drobbins_at_drobins.net: "migrating users from one machine to another"
    Date: Fri, 30 Jul 2004 09:30:51 -0400
    
    

    carloschoenberg@yahoo.com wrote:
    > Is there any way to configure a system so that a single user can not
    > run the system out of virtual memory? I want there to always be some
    > memory for root so that I can always ssh into the box or log in on the
    > console and kill the offending processes.
    >
    > Please note that a per process limit less than available memory+swap
    > is not sufficient, because two processes can still run the system out
    > of memory.

    If the problem is a small one, just have sufficient swap space. I have 4
    GBytes RAM and four 2 GByte swap partitions (that seldom get used much;
    5564K bytes used at the moment). I am not sure just how much swap space
    you can have, though (at least at one time) there was a 2 GByte limit to
    the size of any one swap partition. At an even earlier time, the limit on
    swap partition size was about 1 GByte.

    If you have users who run you out of swap space, you may need some other
    limitations on them (as suggested by other posters), but they may well
    need additional education as well.

    In the old days in UNIX, the problem was to have at least one slot left in
    the process table so root could get in to do things. That had not been
    thought of at first and it was necessary to reboot when things got out of
    control. I am not sure how Linux handles this, but the proc table may no
    longer be of fixed size.

    -- 
       .~.  Jean-David Beyer           Registered Linux User 85642.
       /V\                             Registered Machine   241939.
      /( )\ Shrewsbury, New Jersey     http://counter.li.org
      ^^-^^ 09:19:59 up 3 days, 18:21, 3 users, load average: 4.19, 4.13, 4.10
    

  • Next message: drobbins_at_drobins.net: "migrating users from one machine to another"

    Relevant Pages

    • Re: prevent out of memory
      ... > Is there any way to configure a system so that a single user can not ... > memory for root so that I can always ssh into the box or log in on the ... If the problem is a small one, just have sufficient swap space. ... GBytes RAM and four 2 GByte swap partitions (that seldom get used much; ...
      (comp.os.linux.misc)
    • Re: Allocating variables without using swap space
      ... possible WITHOUT using swap space, since using swap space slows things down immensely. ... Matlab allocates memory where-ever it feels like it, ... If you have administrative control over the Linux machine, you can turn off disk swap ... you are -very- careful on exactly how you use the array, never accessing a sub-section of it ...
      (comp.soft-sys.matlab)
    • Re: New Patch Fixes 43 Flaws In OS X, Many Serious
      ... so I demand you disprove them". ... You cannot handle all errors from fork(); ... swap space, forkwill not signal an error, but instead your Unix ... will start terminating processes to free memory. ...
      (comp.sys.mac.advocacy)
    • /etc/system and oracle
      ... UltraSPARC-II 450MHz) running Solaris 7 and Oracle ... system full, swap space limit exceeded ... Physical memory was exceeded and entire processes were ... This machine currently has 2 gigs or real memory ...
      (SunManagers)
    • Re: What size for the swap with a kernel 2.4x and 8GB RAM
      ... I have Red Hat Enterprise Linux 3 ES with 8 GB of memory as well. ... of swap space, the machine has been running since March 15 and has not paged ... Does the rule Swap Size= 2 X RAM still applies with big RAM like 8GB? ...
      (comp.os.linux.misc)