Query on RAM Memory

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Query on RAM Memory
# 1  
Old 09-27-2011
Java Query on RAM Memory

Hi Experts,

I have a linux system , which triggers a alarm if RAM memory goes above 70%... When i see top command i cant find any process utilizing much of memory .. Can anyone tell me what could be the reason for high memory utilization.. Bellow is the free command o/p:

Code:
 free                                                             
             total       used       free     shared    buffers     cached                    
Mem:       3626072    2981104     644968          0     581724    1846152                    
-/+ buffers/cache:     553228    3072844                                                     
Swap:      4194296          0    4194296

Bellow is output of cat /proc/meminfo

Code:
 
MemTotal:      3626072 kB                                                                    
MemFree:        647368 kB                                                                    
Buffers:        581708 kB                                                                    
Cached:        1846080 kB                                                                    
SwapCached:          0 kB                                                                    
Active:        2683580 kB                                                                    
Inactive:       204592 kB                                                                    
HighTotal:     2746676 kB                                                                    
HighFree:       430268 kB                                                                    
LowTotal:       879396 kB                                                                    
LowFree:        217100 kB                                                                    
SwapTotal:     4194296 kB                                                                    
SwapFree:      4194296 kB                                                                    
Dirty:             272 kB                                                                    
Writeback:           0 kB                                                                    
AnonPages:      460300 kB                                                                    
Mapped:          20140 kB                                                                    
Slab:            76044 kB                                                                    
PageTables:       2156 kB                                                                    
NFS_Unstable:        0 kB                                                                    
Bounce:              0 kB                                                                    
CommitLimit:   6007332 kB                                                                    
Committed_AS:   649188 kB                                                                    
VmallocTotal:   114680 kB                                                                    
VmallocUsed:      5736 kB                                                                    
VmallocChunk:   108352 kB                                                                    
HugePages_Total:     0                                                                       
HugePages_Free:      0                                                                       
HugePages_Rsvd:      0                                                                       
Hugepagesize:     4096 kB

Can anyone please explain
Thanks in advance
# 2  
Old 09-27-2011
The used number in free is the sum of memory used by applications, buffers, and caches, and not only that of the applications. Linux will always try to use as much memory as possible to cache files to reduce disk access (which is a good thing).
# 3  
Old 09-27-2011
Thanks for your response...My query is who is eating up the memory... I need to get memory down in regard to not see critical alarms...Which is triggered now as memory is 80% used...
# 4  
Old 09-27-2011
Quote:
MemTotal: 3626072 kB
MemFree: 647368 kB
Buffers: 581708 kB
Cached: 1846080 kB
You can see in this, you have over 1GB cached memory.

You dont need to get your memory usage down, you should alter your checking script so its when memory is used up and its not being used by cache.

Last edited by Tommyk; 09-27-2011 at 05:15 AM.. Reason: quote layout
# 5  
Old 09-27-2011
Yes, 80% of your memory are used (but not reserved). But really only about 13% are reserved by applications, with the other 67% being used as cache and buffer to avoid time-consuming disk reads. That is, those 67% are used to keep libraries and files in a fast access location (RAM is much much faster than any disk, even SSDs), and that space is automatically re-assigned should any application require it.

So in order to get the amount of memory reserved by applications ("used"), you'll have to substract the buffers and cache numbers from the used number.
# 6  
Old 09-27-2011
Thanks @pludi @Tommyk

I do understand about the cache and buffers as you said... But thats how its designed here... Smilie.. Will cleaning up of files solve my problem temporarily, say my root has 52% disk usage... So removing unwanted files is it a solution?
# 7  
Old 09-27-2011
No, as Pludi described it so eloquently where i failed, your Linux system will always cache, however you cannot class this as unavailable memory.

You should class anything that is cache as free so your total amount of free memory is Free mem + Cached Mem.

It is not a design flaw, it is a monitoring flaw. You dont want to clear this down as cache gets overwritten by applications as pludi said when necessary just as it would write to free memory just the same, but keeping things in cache is obviously faster than having to go to disk each time.

Hope that makes sense.
This User Gave Thanks to Tommyk For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Maximum Memory RAM for windows 7 32 bit

Hi, i have just installed 4 gb RAM ddr3 on OS Windows 7 32 bit. In "manage peripherals" i see this section: Memory installed (ram) : 4,00 gb (2,30gb usable) Why only 2,30 gb usable ? In Windows 7 32bit the maximum size is not 3,00gb ? see file attached, please (4 Replies)
Discussion started by: nash83
4 Replies

2. Programming

Memory Allocation Query

When we dynamically allocate the memory say 100 integers say int *x = new int(1000); then does entire chunk of memory gets allocated at once after the completion of the statement? I mean will the the concept of page fault come into picture over here? (3 Replies)
Discussion started by: rupeshkp728
3 Replies

3. Ubuntu

Find defective ram memory

How do I find if I have defective ram in my computer. I don't have a cd-rom, so I can't use a bootable cd. (1 Reply)
Discussion started by: locoroco
1 Replies

4. Solaris

Ram memory fails.

Hi All, Ram memory always fails,i did not find the reason...........any one can help i this.:wall: (2 Replies)
Discussion started by: Rajesh_Apple
2 Replies

5. Shell Programming and Scripting

Retrieve RAM memory size from "top" command output

Hi, I am trying to get the system RAM size from "top" command's output by the following but it is not working. top | sed "s/^Mem.**\(*\), *//" (10 Replies)
Discussion started by: royalibrahim
10 Replies

6. Solaris

RAM memory display

Hi How to display RAM memory info under Sol10 ? I need info like : - how many slots is available in MoBo - how RAM is plugged into those slots - total number of RAM memory size and size divided in each slot ths for help. (2 Replies)
Discussion started by: presul
2 Replies

7. Filesystems, Disks and Memory

RAM memory checker / bad lister

A bit of background I'm running a Nexenta (OpenSolaris kernel + a number of Debian tools) server running a ZRAID of 3x 1TB SATA2 drives (essentially a RAID5 formatted in ZFS, for those who aren't familiar with zpools). When running the ZFS scrub command (ZFS's equivelent of fsck) I get a number... (0 Replies)
Discussion started by: laumars
0 Replies

8. UNIX for Dummies Questions & Answers

How to accurately determine memory (RAM) information

I'm writing a shell script to display as much useful information on physical and virtual memory availability and usage as possible. I need a CLI tool to print these numbers for me. The utilities that I know to give out some statistics are the following: free top vmstat sysctl In Linux... (1 Reply)
Discussion started by: fiori_musicali
1 Replies

9. Solaris

RAM Physical Memory usage by each Process.

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)
Discussion started by: bsrajirs
12 Replies

10. UNIX for Dummies Questions & Answers

Amount of RAM (Memory)

How do i check/get the total amount of RAM, on a machine running UNIX? (4 Replies)
Discussion started by: samudimu
4 Replies
Login or Register to Ask a Question