[clug] Ubuntu 10.04 windows close for no apparent reason

Carlo Hamalainen carlo.hamalainen at gmail.com
Sat May 15 21:05:47 MDT 2010


On Sat, May 15, 2010 at 4:04 PM, Matt Joiner <anacrolix at gmail.com> wrote:
> How do you get this killing behaviour? Everytime I get EOOM my system
> gradually crawls to a halt and locks up.

If you have trouble with a particular program you can use ulimit. To
see what limits are in place use ulimit -a:

carlo at eeepc:~$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 20
file size               (blocks, -f) unlimited
pending signals                 (-i) 16382
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

To set a roughly 200Mb limit on processes started up from that shell, use:

carlo at eeepc:~$ ulimit -m 200000
carlo at eeepc:~$ ulimit -v 200000

The effect of this command appears in the memory and virtual lines:

carlo at eeepc:~$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 20
file size               (blocks, -f) unlimited
pending signals                 (-i) 16382
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) 200000
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) 200000
file locks                      (-x) unlimited


-- 
Carlo Hamalainen
http://carlo-hamalainen.net


More information about the linux mailing list