[arch-general] resource limits, unable to run apps

Guillaume Brunerie guillaume.brunerie at gmail.com
Fri Aug 26 17:50:59 EDT 2011


2011/8/26 Marek Otahal <markotahal at gmail.com>

> Hi guys,
>
> in last days i'm severely bugged by some resource limits on my machine..my
> applications fail to run
> etc.
>
> I'm running on a netbook that is slow by default, but i've been on it for a
> few years and it was ok.
> I'm running normal KDE, IM client, kmail, firefox (with a lot, cca 30) tabs
> open, a konsole and
> netbeans ide.
>
> The thing is I remember I once played with some limits to avoid forkbombs
> etc..so my question is if
> you could point me to some files to check for configs?
>
> This is my top output:
> $ top
> top - 22:19:59 up 1 day,  7:19,  3 users,  load average: 1.06, 1.56, 1.34
> Tasks: 199 total,   1 running, 196 sleeping,   0 stopped,   2 zombie
> Cpu(s):  1.8%us,  2.5%sy,  0.0%ni, 95.7%id,  0.0%wa,  0.0%hi,  0.0%si,
>  0.0%st
> Mem:   2055224k total,  1748036k used,   307188k free,    13632k buffers
> Swap:  2561304k total,   938420k used,  1622884k free,  1119728k cached
>
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 20689 marek     20   0  223m  60m  17m S    4  3.0   2:08.92 skype
>  1322 root      20   0  113m  21m 4552 S    1  1.1  65:50.10 X
>  3385 marek     20   0  6124  840  604 S    1  0.0  15:13.67 scdaemon
>  6421 marek     20   0  936m 137m  16m S    1  6.9   0:59.12 java
>  6832 marek     20   0  2576 1032  756 R    1  0.1   0:01.37 top
>  3216 marek     20   0  115m  12m 7156 S    1  0.6  31:17.96 konsole
> 22696 marek     20   0  177m 8828 5240 S    1  0.4   6:52.92 kget
>  2707 marek     20   0  5576  344  212 S    0  0.0   2:52.82 gpg-agent
>  3275 marek     20   0  119m 5124 3136 S    0  0.2   2:36.09 kleopatra
>  3449 marek     20   0  101m 4280 2720 S    0  0.2   0:57.63 klipper
>  6451 root      20   0     0    0    0 S    0  0.0   0:23.52 kworker/0:2
>    1 root      20   0  1880   24    0 S    0  0.0   0:19.49 init
>    2 root      20   0     0    0    0 S    0  0.0   0:00.06 kthreadd
>    3 root      20   0     0    0    0 S    0  0.0   0:03.84 ksoftirqd/0
>    6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0
>   13 root       0 -20     0    0    0 S    0  0.0   0:00.00 cpuset
>   14 root       0 -20     0    0    0 S    0  0.0   0:00.00 khelper
>   15 root       0 -20     0    0    0 S    0  0.0   0:00.00 netns
>   16 root      20   0     0    0    0 S    0  0.0   0:00.25 sync_supers
>   17 root      20   0     0    0    0 S    0  0.0   0:00.00 bdi-default
>   18 root       0 -20     0    0    0 S    0  0.0   0:00.00 kblockd
>   20 root      20   0     0    0    0 S    0  0.0   0:00.14 khungtaskd
>
> Ulimit says
> $ ulimit -a
> core file size          (blocks, -c) 0
> data seg size           (kbytes, -d) unlimited
> scheduling priority             (-e) 30
> file size               (blocks, -f) unlimited
> pending signals                 (-i) 16028
> max locked memory       (kbytes, -l) 80000
> 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) 75
> stack size              (kbytes, -s) 8192
> cpu time               (seconds, -t) unlimited
> max user processes              (-u) 250
> virtual memory          (kbytes, -v) unlimited
> file locks                      (-x) unlimited
>
>
> and I use pm-utils, should that matter?
>
> I used to run the system under similar load and it was ok, now eg. my
> compiles in netbeans fail,
> says OutOfMemoryException or sometimes cannot create a new native thread.
> (openjdk), also
> command line tools fail with things like
> $ man scdaemon
> man: fork failed: Resource temporarily unavailable
> I wonder is it the memory consumed by netbeans or some number of
> process/open files limit or
> something?
>
> I'm glad for any suggestions, as now if i want to develop in java, i have
> to shut down browser, chat
> and even though...
>
> Thank you, Mark
>
> PS: i know..but now i'd not like to hear suggestions like using a lighter
> DE or buying better hw ;)
>
> --
>
> Marek Otahal :o)



You have 200 tasks running and ulimits reports that the number of processes
is limited to 250, this is probably the reason of your problems (and it has
something to do with trying to prevent forkbombs). You can check it by
running top during a failing netbeans compile. The number of tasks should
reach 250 without being able to get bigger.

How are you starting KDE? Are you using kdm?
You should check your bash config files: /etc/profile, ~/.profile,
~/.bash_profile, ~/.bash_login, ~/.bashrc


More information about the arch-general mailing list