Howdy, Stranger!

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


Ubuntu server RAM usage
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Ubuntu server RAM usage

Hi,

Sorry if this sounds as a "noob" question but I'm not totally familiar how Ubuntu allocates RAM. Been a Windows guy most of my life.

I got an 16GB server from SyS and been running an snapcraft application on it with an total server uptime of 70 days+/- a few.

Now, last I checked the softwares admin panel it's showing me "OS free memory - 6.2GB"

Does that sound alright? Is Ubuntu somehow caching the memory or something?

Comments

  • Without more info, it's hard to say what it is exactly. Most likely it's just caching. https://www.linuxatemyram.com/

  • Ah, never knew about that site, thanks!

    I've tried some console commands that I found on Stack (which are not the best practice as they said themselves) to "free" that RAM and it does go up in the admin panel for a day or two and then all the way back to 5-6GB

  • AlwaysSkintAlwaysSkint Member
    edited January 2019

    Would you rather have your RAM doing nothing, or improve system response? Go Google Linux RAM allocation.. Looks like you have an over-specced server there. :|
    Forget about Windoze - it just gave you a dumbing down experience.

  • Yeah of course it's better if it's used to speed things up.

    Just checked the free -m and it's showing me 14gigs available. Think you're right on the overkill lol. Then again better to be over specced than under specced at some point I guess.

  • Linux memory management is so bad and full of memory leaks, you basically need to open the lid and shove additional ram sticks in the machine as it's working. It's based on the Nintendo cartridges.

    Nah i'm kidding, it's due to filesystem buffers, the kernel caches to ram, it's totally okay.

    Thanked by 1eol
  • eoleol Member

    echo 3 > /proc/sys/vm/drop_caches; sync; sync; sync
    to drop caches.

    Thanked by 2t0m Janevski
  • HostYDHostYD Member, Host Rep

    Check all running processes and find process which using high RAM and check their default consumption. If its not normal you may need some tweaking depending on process.

  • @eol said:
    echo 3 > /proc/sys/vm/drop_caches; sync; sync; sync
    to drop caches.

    Run every minute with a cron task. :tongue:

    Thanked by 2eol Janevski
  • Daniel15Daniel15 Veteran
    edited January 2019

    @eol said:
    echo 3 > /proc/sys/vm/drop_caches; sync; sync; sync
    to drop caches.

    This is a bit silly though. If you've got lots of free RAM, why not use it for caching? RAM is faster than disk (even with SSDs) and you may as well use all the RAM you have. Linux will automatically purge items from the cache if apps actually request the RAM, you don't need to mess with it manually.

  • eoleol Member
    edited January 2019

    @Daniel15 said:

    @eol said:
    echo 3 > /proc/sys/vm/drop_caches; sync; sync; sync
    to drop caches.

    This is a bit silly though. If you've got lots of free RAM, why not use it for caching? RAM is faster than disk (even with SSDs) and you may as well use all the RAM you have. Linux will automatically purge items from the cache if apps actually request the RAM, you don't need to mess with it manually.

    The purpose here is to free RAM.
    Also it is far from silly for that purpose.

    EDIT:
    Removed.

  • @eol said:

    @Daniel15 said:

    @eol said:
    echo 3 > /proc/sys/vm/drop_caches; sync; sync; sync
    to drop caches.

    This is a bit silly though. If you've got lots of free RAM, why not use it for caching? RAM is faster than disk (even with SSDs) and you may as well use all the RAM you have. Linux will automatically purge items from the cache if apps actually request the RAM, you don't need to mess with it manually.

    The purpose here is to free RAM.

    Sure, but my point is that you don't need to free RAM yourself- The kernel will do that for you when the RAM is needed. As long as it appears as "available" in free -m, you're fine. While you don't need it, let it do its thing with caching :smiley:

  • eoleol Member

    @Daniel15 said:
    Sure, but my point is that you don't need to free RAM yourself- The kernel will do that for you when the RAM is needed. As long as it appears as "available" in free -m, you're fine. While you don't need it, let it do its thing with caching :smiley:

    No.

  • deankdeank Member, Troll

    RAMLIVESMATTER.

    FreeRAM. FreeRAMMMM!

    Thanked by 3eol Janevski Letzien
  • deank said: FreeRAM. FreeRAMMMM!

    FreeWSS

    Thanked by 1eol
  • AlwaysSkintAlwaysSkint Member
    edited January 2019

    Just for clarity: the only time that you really need to drop caches, is when resizing/switching/re-prioritising swap, IMHO.
    Some people just don't get "tongue-in-cheek".

Sign In or Register to comment.