Menu

#87 Over allocates ram it doesnt have

open
None
5
2002-11-22
2002-11-22
Con Kolivas
No

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.

Discussion

  • Rodrigo De Castro

    • assigned_to: nobody --> rcastro
     
  • Ero Carrera

    Ero Carrera - 2003-08-16

    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)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.