Find the answer to your Linux question:
Results 1 to 3 of 3
I don't much about system memory usage in general so hopefully someone can explain. I notice that if i leave my computer on overnight the RAM usage goes from about ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2005
    Posts
    80

    LARGE spikes in memory usage


    I don't much about system memory usage in general so hopefully someone can explain.

    I notice that if i leave my computer on overnight the RAM usage goes from about 57 MB to about 250 MB in the morning. WTF?

    If you don't believe me I tee'd up a "$ free -ms 10 | tee output.txt" and wrote a four-liner perl script to record the number of instances of each amount of RAM usage in 'output.txt'. Here's the results:

    ___-/+ buffers/cache: (used)___

    57 MB: 1807 instance(s)
    58 MB: 838 instance(s)
    60 MB: 300 instance(s)
    66 MB: 1 instance(s)
    72 MB: 1 instance(s)
    89 MB: 1 instance(s)
    112 MB: 1 instance(s)
    139 MB: 1 instance(s)
    150 MB: 1 instance(s)
    160 MB: 1 instance(s)
    175 MB: 1 instance(s)
    203 MB: 1 instance(s)
    238 MB: 1 instance(s)
    251 MB: 282 instance(s)
    252 MB: 56 instance(s)
    274 MB: 1 instance(s)

    As you can see there is a clear spike in the middle. It goes up ~20 MB/10 s! That BLOWS MY FREAKIN' MIND!!!

    Please explain if you can. I use fluxbox (hence 57 MB to start), xscreensaver starts running in the 57MB region. I should have included a list of all my running processes but I can assure you its not 252 megs worth. I'm aware that apps leave memory in the cache even when they exit, but that does not explain the 180 MB jump in about 100 seconds. After typing that last sentence I wonder if the spike occurs at 12:00 AM the next morning....Nope. The numbers don't add up.

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692

  3. #3
    Just Joined!
    Join Date
    Nov 2005
    Posts
    80
    I dont know if what I posted was clear. If this is the output of free -m:

    total used free shared buffers cached
    Mem: 503 451 52 0 14 293
    -/+ buffers/cache: 143 360
    Swap: 1027 0 1027


    I am only concerned about the used -/+ buffers/cache (143 in this case). It is the same number as what is reported by the gnome-system-monitor ( if youre running gnome). You can also get it by and summing up the RSS for all running processes. According to the provided wiki article (which I have read before) i only care "how much memory is used ... from the perspective of the applications".

    This site offers a dead simple description of how I want to interpret memory usage using `free`:

    http://rimuhosting.com/howto/memory.jsp


    I still don't see why in about 1.5 min my memory usage (from the perspective of the running applications) steadily increases by 180 MB. Someone might have to spell it out for me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •