RAM usage while idle doubled after an update!

Discussion in 'Newbie Questions' started by mybadmc, Oct 18, 2015.

  1. mybadmc

    mybadmc Thread Starter
    Expand Collapse
    Member

    Joined:
    Sep 16, 2015
    Messages:
    6
    Likes Received:
    0
    So one of the things I like about Linux system in general is their lightweight nature. I set up my conky to monitor my system resources and that alone gives me joy. Couple of days ago I was just sitting there looking at my RAM usage 450MB while idle with couple of indicators and drop-down terminal. And it was nice. Really nice if you ask me. Then after an update I suddenly start getting 900-1GB idle usage. So I immediately thought it was something I did because I like to tinker with my favorite distro, so I reinstalled the system from the ground up sure that RAM usage will go down. And right after I installed and updated the new installation it went right back to 1GB. The only other distro that took this much ram was Mint Cinnamon and that was the reason I abandoned that desktop. Does anyone know why this happened?
     
  2. paradise

    paradise
    Expand Collapse
    Elementary Supporter

    Joined:
    Dec 3, 2014
    Messages:
    128
    Likes Received:
    34
    Linux does use RAM other than Windows. You must make a difference between "real use RAM, now allocated" and "all other cached RAM". Linux is trying to use as much RAM as possible, because not used ram is bad (it takes too long to fill in into ram again).

    Let me explan it here, it's a standard elementary after boot:

    elementary_ram_usage_example.jpg
    -/+ buffers/cache: 440 MB = this is the real allocated RAM, which real is in use right now. it can be up to 2000 MB in this screenshot
    used 1057 MB = this is real allocated ram PLUS (!) the cached things, like file paths/file content which was open in the past, but not anymore (re-open will be superfast, because it's still cached). <<< this is what you see in "top" maybe, but you must know thats NOT the real used memory! the real used allocated RAM from the kernel + actively opened programs is 440 MB!
    free 933 MB = the free ram which is not already cached. it can be close to 0, thats in linux normal on a system where you work some hours with it.
    -/+ buffers/cache free 1551 MB= the real free RAM

    So, the most important value is -/+ buffers/cache: 440 , as long as this will be less than 2000MB (in this example, this notebook owns 2 GB memory) your system does have enough RAM and will not SWAP. It makes sense to have some MB/GB free for caching, for example your browser is already cached and when you reopen it, reopen will be faster than the first start - cause the browser is in the cache, but not allocated until you reopen the browser.

    About Swapping: The Kernel will remove some not used things in "cached" > into > "swap" automatically on linux. Without swappiness tuning, thats normal. With vm.swappiness = 60 (elementaryOS / Ubuntu Standard) it will try to swap non-used cache after RAM is more than 60% in use.

    My guess is, that your elementary only raise the "cached" things, not the real used allocated rams. that would mean your elementary is fine :)

    any questions :)?
     
    #2 paradise, Oct 19, 2015
    Last edited: Oct 19, 2015
  3. mybadmc

    mybadmc Thread Starter
    Expand Collapse
    Member

    Joined:
    Sep 16, 2015
    Messages:
    6
    Likes Received:
    0
    Oh thanks for a extensive answer. Why would -/+ buffer value double in one day? I didn't install anything that would get cashed. My question is how can I bring it down? Here is my screen : W5I9AIg.jpg
     
  4. paradise

    paradise
    Expand Collapse
    Elementary Supporter

    Joined:
    Dec 3, 2014
    Messages:
    128
    Likes Received:
    34
    yes, that's a real good question. I personally never have had the need to know what I am currently run in the allocated memory. I will also look for a script which we can use to check that
     
  5. paradise

    paradise
    Expand Collapse
    Elementary Supporter

    Joined:
    Dec 3, 2014
    Messages:
    128
    Likes Received:
    34
    I've tried this python script to check the ram usage, it looks nice:

    ps_mem_pythonscript-example_arrow2.jpg

    ps_mem_pythonscript-example_arrow3.png

    As you see, in my case google chrome is eating my now allocated RAM :)
    You can run this script in terminal with installed python this way:

    Code (Text):
    sudo apt-get install python
    wget https://raw.githubusercontent.com/pixelb/ps_mem/master/ps_mem.py
    sudo python ps_mem.py | less
    ### scroll through while hitting your space bar ###
     
    (found on http://stackoverflow.com/questions/...ual-memory-usage-of-an-application-or-process)
    Let us know what the output will be on your system ! ;)
     
    #5 paradise, Oct 21, 2015
    Last edited: Oct 21, 2015
  6. mybadmc

    mybadmc Thread Starter
    Expand Collapse
    Member

    Joined:
    Sep 16, 2015
    Messages:
    6
    Likes Received:
    0
    kFaLjRn.jpg Well I solved my problem. Seems that MySQL 5.6 was the one eating 400+ MB of ram. I found it with the script above so thank you for that. I just reverted to Mysql 5.5 and everything was great. da6ulHo.jpg
     

Share This Page

Loading...