RHEL Memory issue


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat RHEL Memory issue
# 1  
Old 07-10-2016
RHEL Memory issue

Friends,

I have 8CPU/24gb RAM in my Linux servers around 30+. All the servers are running with Java based application with NFS mounted.

The problem what I have is, When I reboot servers the server memory looks decent. But after some time the "cached" memory increasing and "free" memory getting reduced and reaching some mega bytes. I searched in various forums that it is behavior for RHEL and there wont be any performance issue. But I see better performance when there is more memory available in "free". The same performance goes down when the "free" memory reach 300mb.

Code:
$ free -g
             total       used       free     shared    buffers     cached
Mem:            23         23          0          0          0          9
-/+ buffers/cache:         13         10
Swap:            1          0          1
$ free -m
             total       used       free     shared    buffers     cached
Mem:         24248      23756        492          0        233       9684
-/+ buffers/cache:      13838      10409
Swap:         2047        214       1833
$

I need your expert advice why the cached memory is increasing.. and how I set threshold so that I will always have 1-2gb free.?

Thank you
Bala
# 2  
Old 07-10-2016
This is indeed normal behavior with the Linux OS, which uses unused memory for caching and buffering. The moment that memory is need for something else, it will be freed immediately.

The important line to look at is the +/- buffers cache line, which shows that around 14GB is in use and 10.5 GB is free..

There normally shouldn't be performance issues, with or without the memory used for caching. How are you measuring this?

When you reach 300 MB, how much caching is in use then?

Last edited by Scrutinizer; 07-10-2016 at 02:45 PM..
# 3  
Old 07-11-2016
Thank you for your response.

I completely agree with your statement. But i can clearly notice performance issue when the "free" memory on first line goes down.

Is there a way i can reserve free memory to at least to 2g?

Thanks
Bala
# 4  
Old 07-11-2016
Quote:
Originally Posted by baluchen
But i can clearly notice performance issue when the "free" memory on first line goes down.
I don't believe that the performance degradation has anything to do with the "free" (which in fact is: unused) memory going down. The reason for it going down is simply because at start time the system has no idea what to put into the cache. Over time it "learns", by loading disk content to memory, which contents are used more often and therefore puts them into cache. This does not slow down operations but in fact speeds them up!

Your problem may come from several reasons: most likely is a "memory sink", which is a pure application problem. The application requests memory dynamically from the system and the system fulfills this request. But the application (being written poorly) doesn't keep track of this memory, so, instead of reusing it or giving it back it requests another chunk of memory from the system - and so on, ad infinitum. Because the systems memory is limited this can't go on forever and over time the systems resources are exhausted. A prominent instance for this happening was/is Firefox. If you run it for several weeks you will notice that it has allocated several GB of memory even if you have only one (empty) window open.

The only rememdy for this (if you can't fire the programmer for sloppy work and then get another one to change the application, which would be the best course of action) is to restart the application (not the system!) at certain intervals. Which these intervals are depends on the application and how rapidly it gobbles up the memory.

I hope this helps.

bakunin
# 5  
Old 07-11-2016
But a "memory sink" would not be "system buffers/cache". It is part of the 13 GB memory in the sample in post#1.
Linux really suffers from the following work-load:
one process keeps I/O writing (until the free memory is shrunk to nearly 0), while another process writes to not yet initialized memory (that has been malloc()ed before).
# 6  
Old 07-12-2016
Quote:
Originally Posted by MadeInGermany
But a "memory sink" would not be "system buffers/cache". It is part of the 13 GB memory in the sample in post#1.
This is true, but the "memory sink" might over time deplete available memory so much that cache and free mem is reduced to (near) zero thus slowing down operations.

Quote:
Originally Posted by MadeInGermany
Linux really suffers from the following work-load:
one process keeps I/O writing (until the free memory is shrunk to nearly 0), while another process writes to not yet initialized memory (that has been malloc()ed before).
Very interesting, i haven't known that! But even then, retaining any arbitrary amount of memory (as thread-o/p's suggest 2GB) as free will not help anything. It will just ensure that the point at where this problem hits will be reached sooner.

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

RHEL 5.11 - gid issue

Hello folks, I am facing a weird issue on one of the red hat linux 5 box. There is an oracle id which i want to change the primary group. Currently the primary group id is 16600, I did changed it to 16601 using below command: usermod -g 16601 oracle But it did not changed. I have tried... (3 Replies)
Discussion started by: snchaudhari2
3 Replies

2. Shell Programming and Scripting

AIX to RHEL migration - awk treating 0e[0-9]+ as 0 instead of string issue

Greetings Experts, We are migrating from AIX to RHEL Linux. I have created a script to verify and report the NULLs and SPACEs in the key columns and duplicates on key combination of "|" delimited set of big files. Following is the code that was successfully running in AIX. awk -F "|" 'BEGIN {... (5 Replies)
Discussion started by: chill3chee
5 Replies

3. Linux

Installation issue RHEL 6.5 on SAN

HI All I am facing issue in installation of Red Hat 6.5 on SAN.. i am having a partion of 2 TB in my SAN and i am installing the operating system after completed the installation it not booting and giving the error. (2 Replies)
Discussion started by: deviltech
2 Replies

4. Red Hat

Memory Issue

I could not find what is consuming the memory, generated DSET reports and NO hardware wise memory issue. 64 GB RAM on a server yet all I could see is a very limited memory available. I am not sure if I am reading this correct or not. I have used free -t -m and cat /proc/meminfo (results below)... (3 Replies)
Discussion started by: rsheikh01
3 Replies

5. Red Hat

Logrotate issue in RHEL

Hi, I have a requirement to compress logs that generate daily. Below is the logrotate configuration for this But for some kind of reason the logs are not getting compressed daily. When tried to execute the logrotate manually with -d it says "log does not need rotating." The path... (0 Replies)
Discussion started by: EmbedUX
0 Replies

6. Red Hat

Best way to monitor use of memory resources for an RHEL instance

I wanted to know what is the best way to monitor use of memory on an RHEL server. We have 16 GB of memory for the RHEL instance but the usage at any time is more than 99%. I use /proc/meminfo on the server to check memory. I hope, my question is clear that what is the best way to monitor use of... (2 Replies)
Discussion started by: RHCE
2 Replies

7. Red Hat

iSCSI issue on RHEL 5

Hello Friends, I am facing issue with the iSCSI configuration on some of our RHEL 5 servers, When I restart the iSCSI service, it triggers the RHEL server reboot. Could you please help me with this issue. Below are the system details : uname -a : Linux za-rac-prd-01.abc.local... (2 Replies)
Discussion started by: Jeevanm
2 Replies

8. Red Hat

Time Sync issue on RHEL 5.3

Hi, My Linux VMs are running on citrix XEN.Somehow the time drift is too high (going very fast). Even if the correct time configured using date -s command, for every 1 hr it is differing almost 5 - 10 mins. Tried configuring ntpd (local NTP server) and still it is not synchronized. Machine... (2 Replies)
Discussion started by: uday123
2 Replies

9. Red Hat

RHEL Installation issue.

Hi Gurus I am trying to install RHEL linux enterprise Edition v5 on a Dell Optiplex 320 desktop. After the Grub menu,i get the error,Kernel could not be loaded. I am a newbie in linux and would appreciate any help in moving forward. Thanks HG (1 Reply)
Discussion started by: Hari_Ganesh
1 Replies

10. Windows & DOS: Issues & Discussions

Memory Issue

Hi There, I have upgraded the DELL poweredge 2600 server memory from 2GB to 4GB. However, the memory only showed at 2GB of utilization. How to make sure that the server is full utilize of 4GB of memory. Is there the Virtual memory need to be reconfigure as this server is run on windows 2000 and... (2 Replies)
Discussion started by: vestro
2 Replies
Login or Register to Ask a Question