Repeatedly allocating ram (eg with the mem_load utility
from contest) makes cc allocate more ram than is
available. Swap levels out at 70% usage for a while
then shoots up to 100% and the kernel oopses.
From what I could see, this isn't only a problem of CC. It
comes from the memory overcommit feature by which the OS
allows application to allocate more memory than physically
available. The system might actually crash (saw it several
times) because of the combination overcommit+CC.
Unfortunately, I couldn't see any easy solution, but
something that might help (it did for me) is limiting the
applications address space.
I did set a kernel hardcoded, system wide, limit to the
"virtual memory" (as reported by ulimit). So that no
indivudual application can allocate more than certain amount
of memory, in my case this limit is close to 200MiB.
This did fix the system crashes because of misbehaving
applications.
Although is not impossible to crash the system, it's way
more difficult now. (As with the vanilla kernel, which
could, as well, crash if a set of applications start
allocating memory in a certain pattern)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=267914
From what I could see, this isn't only a problem of CC. It
comes from the memory overcommit feature by which the OS
allows application to allocate more memory than physically
available. The system might actually crash (saw it several
times) because of the combination overcommit+CC.
Unfortunately, I couldn't see any easy solution, but
something that might help (it did for me) is limiting the
applications address space.
I did set a kernel hardcoded, system wide, limit to the
"virtual memory" (as reported by ulimit). So that no
indivudual application can allocate more than certain amount
of memory, in my case this limit is close to 200MiB.
This did fix the system crashes because of misbehaving
applications.
Although is not impossible to crash the system, it's way
more difficult now. (As with the vanilla kernel, which
could, as well, crash if a set of applications start
allocating memory in a certain pattern)