Free memory on Linux-based VPS

Free memory on Linux-based VPS

Free memory on Linux-based VPS

Category: Cloud Servers &nbsp

Let’s have a closer look at the output of ‘top’ command. Usually it looks like this:

Mem:   1155072k total,   981032k used,   174040k free,    40396k buffers

Most people think that in this case we have 981032k used memory, and only 174040k free . But that’s not correct, this is global misunderstanding of memory stats and ways that Linux systems work with memory (RAM).

In every Linux-based environment some application runs and uses some memory until application finishes its job. However, some data left by this application is still present in memory just in case another application will need it, so it will work way faster.

This memory block is marked as ‘can be reused’. Using ‘top’ command you will see it as ‘used’, so the correct way to check ‘real’ amount of free RAM is to execute ‘free -m’ command. It’ll give something like:

root@host [~]# free -m
total      used      free    shared    buffers    cached
Mem:          1128        956        171          0        38        720
-/+ buffers/cache:        197        930
Swap:        1023          0      1023

The line you need to look at is “-/+ buffers/cache”, it shows actually used and free memory blocks. The above example shows 930Mb of free RAM.

    • Related Articles

    • Manage DNS within the VPS.NET Dashboard

      Manage DNS within the VPS.NET Dashboard Category: DNS Information, Getting Started &nbsp VPS.NET comes with free geographically redundant DNS using Anycast which can easily be managed using the Dashboard, there are many advantages over using the DNS ...
    • Clone Server Feature in VPS.net Control Panel

      Clone and deploy feature allows to create an entirely new server from an existing one, moreover, using it you can create a completely customized image based on different options, and rapidly deploy the image to a new server. This feature is only ...
    • How to enable Backups for a Linux server

      How to enable Backups for a Linux server Category: Getting Started &nbsp Give your server a new lease of life with a quick and easy update… There comes a time in every server’s life when it needs a slightly newer version of its software. Thankfully, ...
    • Creating a VPS

      To create your first Cloud Server (VPS), you will have to follow these steps: On a Dashboard under “Cloud Servers” section, choose and click on “Create new Cloud Server”: The same actions can be done from “Quick Links” section using “Create new Cloud ...
    • VPS.net VAT Information

      This article will help you understand the Value Added Taxes (VAT). What Is VAT? In order to comply with current laws and codes, VPS.net is required to charge VAT (Value Added Taxes) to all non-business clients living in the European Union (EU). All ...