Query on RAM Memory

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Query on RAM Memory
# 8  
Old 09-27-2011
No. How much of the disk is used has nothing to do with how much RAM is used. Files are only cached once they are read (and not automatically the whole disk), so it only contains files that have been used. And I doubt you'd be willing to remove files that are required.

Adapt the script/program that's sending out the alert, that's the best advice I can give you.
This User Gave Thanks to pludi For This Post:
# 9  
Old 09-27-2011
If you really need to get the cached value low you can
a) make the application on that box use direct I/O (recommended if its a database or another application that caches itself) or
b) tune your system to use less fs-cache which will most likely degrade that systems performace. Have a look at the sysctl utility for this and be sure you know what you're doing before using this approach.

Edit: I second pludis and Tommyks advice to adapt your monitoring script as the best solution to your problem...

Last edited by cero; 09-27-2011 at 06:15 AM..
# 10  
Old 09-27-2011
Thanks a lot...

Below is the snapshot of part of SAR output...

Code:
00:00:01    kbmemfree kbmemused  %memused kbbuffers  kbcached kbswpfree kbswpused  %swpused  kbswpcad
00:10:01       487844   3138228     86.55    582252   1906476   4194296         0      0.00         0
00:20:01       487688   3138384     86.55    582252   1906520   4194296         0      0.00         0
00:30:01       487656   3138416     86.55    582256   1906560   4194296         0      0.00         0
00:40:01       486632   3139440     86.58    582256   1906620   4194296         0      0.00         0
00:50:01       486908   3139164     86.57    582256   1906660   4194296         0      0.00         0
01:00:01       485636   3140436     86.61    582256   1906712   4194296         0      0.00         0
01:10:01       485420   3140652     86.61    582256   1906756   4194296         0      0.00         0
01:20:01       483960   3142112     86.65    582256   1906820   4194296         0      0.00         0
01:30:01       483124   3142948     86.68    582256   1906888   4194296         0      0.00         0
01:40:01       482472   3143600     86.69    582256   1906928   4194296         0      0.00         0
01:50:01       483120   3142952     86.68    582256   1906960   4194296         0      0.00         0
02:00:01       480484   3145588     86.75    582256   1907100   4194296         0      0.00         0
02:10:01       479088   3146984     86.79    582256   1907228   4194296         0      0.00         0
02:20:01       479364   3146708     86.78    582256   1907280   4194296         0      0.00         0
02:30:01       475056   3151016     86.90    582256   1907416   4194296         0      0.00         0
02:40:01       473100   3152972     86.95    582256   1907560   4194296         0      0.00         0
02:50:01       472880   3153192     86.96    582256   1907652   4194296         0      0.00         0
03:00:01       471796   3154276     86.99    582256   1907812   4194296         0      0.00         0

Everywhere it does consider as used up memory, system understands it as 86% used up memory... and i assume my alarm is also triggered because of this.... I have to find out some way to fix it... Thanks a lot for your explanation
# 11  
Old 09-27-2011
%memused is worked out based on %memfree of total RAM, although you may see it as used from the outputs, cached is by no means anywhere near to used. You cannot use this value for monitoring until your no longer using cache.

If you reboot your machine it will clear the cached memory down, however you can't reboot your machine every 5 minutes to keep that low as cache builds up again.

I have a server with 32GB RAM, its only using 2GB and 29GB is cached, showing 1GB free, however if an application requires more memory it will used cached memory before it goes into swap.

Quote:
I have to find out some way to fix it...
I think you need to think again about this, it is not a problem that needs fixing, this is your box running at its optimal performance. Your alarm is triggered due to a result that is not entirely representative of what your looking for.
# 12  
Old 09-27-2011
Here i meant by fixing is only in terms of the alarm ( Not memory) now i understood the concept of memory cache , thanks to you and pludi...

Just was wondering what is the impact on clearing the cache, If nothing , by any means can we clear cache without reboot....

Thanks again
# 13  
Old 09-27-2011
There is no problem with clearing cache, it just reduces performance on the Linux server.

Try this command:

Code:
root@server [~]# echo 1 > /proc/sys/vm/drop_caches

and then check memory usage to see if it has cleared it:

Code:
root@server [~]# free

# 14  
Old 09-27-2011
Thanks ... I will try this and see if it helps.....
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