Hello,
I have an ubuntu14.04 installed pc with 32GB ram.
When I check free memory it shows:
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:
Quote:
A healthy Linux system with more than enough memory will, after running for a while, show the following expected and harmless behavior:
free memory is close to 0
used memory is close to total
available memory (or "free + buffers/cache") has enough room (let's say, 20%+ of total)
swap used does not change
Warning signs of a genuine low memory situation that you may want to look into:
available memory (or "free + buffers/cache") is close to zero
swap used increases or fluctuates
dmesg | grep oom-killer shows the OutOfMemory-killer at work
So, in my case, it's okay. No need to worry about that.
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
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.
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.
These 2 Users Gave Thanks to Don Cragun For This Post:
Hello,
I have been running under ubuntu 14.04 trusty and 18.04 bionic.
What I wonder is about:
* how to stop all process in case hdd capacity is almost full and create space for system files
* if possible, to prevent filesystem to write anything into hdd when there is such a risk
* if... (4 Replies)
grpdsku program allows user to check their group disk space in a server environment. The data in the dialog box queries a text file. Each text file is labeled with a current timestamp. Results output to a msgbox. Also, results output to a csv file. The csv file is sent to the user via email
... (13 Replies)
Hi,
I will be creating a process myself and I want to know the average CPU and RAM used by the process over the lifetime of the process. I see that there are various tools available(pidstat) for doing , I was wondering if it possible to do it in a single command while creation.
Thanks in... (3 Replies)
Hey there! I'm a new user here who registered because I couldn't get these kind of questions answered in the place I directly com from. :o
I've found a discrepancy in total RAM used and I can't figure out why it is. My only guess is there are some RAM used by some stuff impossible to identify,... (2 Replies)
Hi team
I have three physical servers running on Red Hat Enterprise Linux Server release 6.2 with the following memory conditions:
# cat /proc/meminfo | grep -i mem
MemTotal: 8062888 kB
MemFree: 184540 kB
Shmem: 516 kB
and the following swap conditions:
... (6 Replies)
Hi RAM of my system is 24 GB however when i checked the processes pids and counted the memory usage by pmap i found out that the total memory usage is 36 GB
It s obvious that my system might be using some of virtual memory or swap space . How can i check which memory it is using and how ..
... (9 Replies)
Hi
one of our applications that runs on our Linux server leaks memory resulting in Ram that was used by the program not being released back to the operating system once a file has been processed. the result is over a very short period virtual all the memory has been used. an example currently
... (8 Replies)
Hi i just wanted to know what is the code to display amount of RAM and also the percentage used? I know i can possibly use the vmstat code but what part indicates the RAM? Any help would be much appreciated. Thanks (1 Reply)
Hi All,
I am trying to find the physical memory usage by each process/users.
Can you please let me know how to get the memory usage?.
Thanks,
bsraj. (12 Replies)