Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Advertise on LowEndTalk.com
Free up memory on centos 6?
New on LowEndTalk? Please Register and read our Community Rules.

Free up memory on centos 6?

There was a command for centos that someone gave me on here, and I have searched through all my posts and couldn't find it. How do I free up memory on centos?

Comments

  • conlustroconlustro Member
    edited September 2014

    On one of my servers I get this:

    # free -m
                 total       used       free     shared    buffers     cached
    Mem:         64457      57268       7189          0      15259        699
    -/+ buffers/cache:      41309      23147
    Swap:        30717        409      30308
    

    and on another I have this:

    # free -m
                 total       used       free     shared    buffers     cached
    Mem:         64458      55552       8905          0         11         16
    -/+ buffers/cache:      55524       8933
    Swap:        19997        453      19544
    

    There is something wrong with the last one right? It isn't caching or buffering. They both have 64gb of ram. Is there any way to force or start caching and buffering?

  • @conlustro

    Run this

    sync; echo 3 > /proc/sys/vm/drop_caches && echo 0 > /proc/sys/vm/drop_caches

    and then try free -m again. See if it helps.

    Chances are some of this is cached memory. You can also run top or htop to see what processes are consuming the majority of your memory.

  • AlbaHostAlbaHost Member, Provider
    edited September 2014

    sync && echo 3 > /proc/sys/vm/drop_caches

    wWw.AlbaHost.Net .AL domains, Dedicated Servers, VPS/VDS and Hosting Services. Located in Albania and Kosovo.

  • Thanks a lot for that, I guess that is the only way.

  • JanevskiJanevski Member
    edited September 2014

    image

    http://www.linuxatemyram.com/

    It's quite a nice site explaining Linux RAM usage.

    You are dreaming. | And it's a nightmare. | THE SECRET THREAD | THE TRUTH | HAVES YOU SEEN THIS YURA?
    „Homo homini rattus.“ | It's not nightmare, it's reality, but it's still nightmare.

  • @Janevski said:
    image

    http://www.linuxatemyram.com/

    It's quite a nice site explaining Linux RAM usage.

    @linuxthefish

    Thanked by 1linuxthefish
  • Hi saw that one Janevski thanks. I have two servers setup exactly the same way but the ram is behaving differently I checked the make and speed of both servers and they seem to match up, but one servers seems to buffer much better than the other, I don't know what's going on.

  • Are you referring to freeing up ram on the host node or a VM ?

    Virtualizor - VPS Control Panel for OpenVZ, XenServer, Xen, KVM

    Our other products : Softaculous Auto Installer, Webuzo and AMPPS

  • @virtualizor said:
    Are you referring to freeing up ram on the host node or a VM ?

    Looking at the free output one would assume a node.. 64 GB RAM although it could just be a dedicated server with no virtualization

  • And the prize goes to ATHK! It's a host node. I ran the above command and it seems like i't doing pretty good now. Would a soft raid1 affect the CPU or RAM usage?

  • @conlustro said:
    And the prize goes to ATHK! It's a host node. I ran the above command and it seems like i't doing pretty good now. Would a soft raid1 affect the CPU or RAM usage?

    Yay!!!! I would like to thank everybody thank you thank you..

  • There are three options available to flush cache of linux memeory. Use one of below as per your requirements.

    1. To free pagecache, dentries and inodes in cache memory

    sync; echo 3 > /proc/sys/vm/drop_caches

    1. To free dentries and inodes use following command

    sync; echo 2 > /proc/sys/vm/drop_caches

    1. To free pagecache only use following command

    sync; echo 1 > /proc/sys/vm/drop_caches

    http://waxspace.com/cheap-reseller-hosting
    USA, UK, RU, CA, AUS #1 web hosting company

Sign In or Register to comment.