Limit linux cache - Linux

This is a discussion on Limit linux cache - Linux ; Jurgen Haan wrote: > Hi hi. > > I'm running a DB2 database on a SLES10-64 linux machine with 16GB of memory. > > DB2 is configure to NOT use the filesystem disk cache. > > But for some reason, ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Limit linux cache

  1. Re: Limit linux cache

    Jurgen Haan wrote:
    > Hi hi.
    >
    > I'm running a DB2 database on a SLES10-64 linux machine with 16GB of memory.
    >
    > DB2 is configure to NOT use the filesystem disk cache.
    >
    > But for some reason, I've lost 8GB of memory to the cache:
    >
    > total used free shared buffers cached
    > Mem: 15899 15779 119 0 69 8674
    > -/+ buffers/cache: 7035 8863
    > Swap: 16387 6549 9838
    >
    > Although I hear everywhere that linux manages it's own cache blah and
    > everything, fact is that my system keeps eating up more and more memory
    > and more and more cache. A few weeks back, the database server
    > segfaulted because it could not allocate anymore.
    >

    that's really odd
    since ... when a process allocates memory
    the kernel itself will clear the cache as more memory is needed
    your process shouldn't segfault since when it allocates memory
    (malloc), it's the kernel itself that does all the legwork
    before giving the process the actual memory (iirc) - eg
    this process is transparant to the process

    anyway
    you should take a good look at some sysctl
    variables, i do think there are some out there
    that can be set to do what you ask for.

  2. Limit linux cache

    Hi hi.

    I'm running a DB2 database on a SLES10-64 linux machine with 16GB of memory.

    DB2 is configure to NOT use the filesystem disk cache.

    But for some reason, I've lost 8GB of memory to the cache:

    total used free shared buffers cached
    Mem: 15899 15779 119 0 69 8674
    -/+ buffers/cache: 7035 8863
    Swap: 16387 6549 9838

    Although I hear everywhere that linux manages it's own cache blah and
    everything, fact is that my system keeps eating up more and more memory
    and more and more cache. A few weeks back, the database server
    segfaulted because it could not allocate anymore.

    The memory usage of the database remains stable, but for some reason,
    the cache keeps growing. The OS *should* release some of its
    buffers/cache to applications that need it, but in truth, that does not
    happen.

    Can I limit it somehow, or periodically flush it??

    Thanks for any feedback.

    -R-

+ Reply to Thread