Ubuntu 14.04 - how to less ram usage

Hello,
I have an ubuntu14.04 installed pc with 32GB ram.

Operating System: Ubuntu 14.04.5 LTS
Kernel: Linux 4.9.148-xxxx-std-ipv6-64
Architecture: x86_64

When I check free memory it shows:

            total       used       free     shared    buffers    cached
Mem:         31882      31597        285       2136        135      28321
-/+ buffers/cache:       3141      28741
Swap:         4093          0       4093

I suppose there is no adequate free memory to run new applications.
If yes, how may I run more process with less ram usage.
Active processes are php, ffmpeg and mysql.
There are many sleeping process also.

PS: While searching for the answer, I've found this:

So, in my case, it's okay. No need to worry about that.

Thanks in advance
Boris

Linux uses memory very efficiently, so if you have 32GB of RAM, you are in great shape for most applications. Linux will allocate to active processes and deallocate memory to idle processes as required.

To use "less RAM" as you ask, you need to manage the running processes.

Best is to look at the memory allocated "per process" and not only the "free memory" stats you posted.

Hope this helps.

1 Like

Note that some systems actively try to use otherwise unused memory to speed up running processes. For example, if a process starts reading from a large file, the system might read the next few blocks (or megabytes) of that file into a system buffer so the data will be in memory without having to wait for the disk to rotate if that process reads the next block.

If other processes start up need the memory that was used for read-ahead buffers they can be reallocated to the next process without affecting how fast the new process can be loaded.

Different versions of BSD, Linux, and UNIX systems use different algorithms to try to make efficient use of memory. And, different releases of each of those systems may change the algorithms as the vendors think they have learned something from past experiences.

In other words, there can be lots of "free" memory may be used to hold data that may soon be useful to someone even though it can be re-allocated immediately if someone asks for it to be put to a specific use.

2 Likes