homepage Welcome to WebmasterWorld Guest from 54.226.168.96
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Red Hat Linux 3.0 Enterprise A/S Memory usage
Memory utilization
yuvraj




msg:3166873
 10:33 am on Nov 24, 2006 (gmt 0)

Hi,

We have two boxes each with Red Hat Linux 3.0 Enterprise A/S loaded & 8 gigs of RAM. These boxes are used as app-servers (weblogic clustering; Weblogic JVM Heap size is set at 2 gig). Currently, there are only a small number of users accessing the application deployed. This will go up significantly by early next year. The client's IT team has recently sent us a report indicating that memory utilization of the servers is at 95 % levels.

We did not believe it and I ran the free -m on those two systems. Here is the output(only for one server)

[Note: However hard i try, i am unable to get the formatting right below. Please bear with me!]

$ free -m

 total used free shared buffers cached
Mem: 7948 7919 28 0 269 6869
-/+ buffers/cache: 779 7168
Swap:16386 0 16386

I also used vmstat command and I ran it for over 12 hrs(which i won't be posting here for obvious reasons)and I observed a few things:

1. "swpd" memory is 0, "si" & "so" are also 0.
2. Under the memory column, the "free" memory numbers are really low (even though it varies in the log, it first decreased, went up slightly, then went back down again). The average is around 40400 KB (approx 39.5 MB).
3. Directory Cache (buff) averages around 269825 KB (approx 263 MB).
4. Buffer Cache (cache) averages around 6856607 KB (approx 6695 MB).

Now, as per what I have read about linux memory management at various places (including this forum), linux actively uses the main memory for caching data that is used by the CPU. And as long as there is minimal or no swapping, the system is healthy. Also, the cached memory will shrink as and when this main memory is required by the user applications.

First off, I would like someone to confirm this and just validate my points.

Secondly, I would like to "prove" that what we are saying is right and that the system is in good shape & that "free" memory column is not the only one to look at while gathering statistics. It would be really helpful if someone could point me to some good monitoring tools which would be helpful, or some nice "official" documentation which would prove that we are correct.

This would really help me as we are planning to go "live" in a very big location with lots & lots of users.

Thank you all very much.

Regards,
Yuvraj

 

mcavic




msg:3167192
 5:02 pm on Nov 24, 2006 (gmt 0)

I'm not familiar with the free command; I use top. But it looks good to me. You're right that Linux uses as much free memory as possible for disk cache, but it will re-use that memory for applications when necessary. So,

If you add the "free" memory and "cached" together, that's approximately the amount that's available for applications. In your case, it looks like almost 6.9 gigs. You'll probably want that number to remain above 2 or 3 gigs for optimum performance.

Also, your swap usage is 0, which is essentially a sign that since you booted, the machine has never run out of memory.

yuvraj




msg:3167657
 5:27 am on Nov 25, 2006 (gmt 0)

Thank you mcavic. I have also used the top command, but i did not quite understand what the results meant. I am a developer and am not familiar with this stuff much.


$ top
12:23:56 up 12 days, 1:27, 2 users, load average: 0.11, 0.05, 0.01
225 processes: 224 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 2.8% 0.0% 1.4% 0.0% 0.0% 2.7% 92.8%
cpu00 2.1% 0.0% 1.5% 0.0% 0.0% 2.7% 93.4%
cpu01 3.6% 0.0% 1.4% 0.0% 0.0% 2.8% 92.2%
Mem: 8139048k av, 7425060k used,713988k free,0k shrd,352728k buff
3083828k actv, 3106852k in_d, 122744k in_c
Swap: 16779884k av, 0k used, 16779884k free 6092512k cached

PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
20 0 483M 483M 70472 S 0 6 00:16 1 java
15 0 483M 483M 70472 S 0 6 00:10 1 java
15 0 483M 483M 70472 S 0 6 00:01 0 java
16 0 483M 483M 70472 S 0 6 00:02 1 java
25 0 483M 483M 70472 S 0 6 00:00 1 java
25 0 483M 483M 70472 S 0 6 00:00 1 java
15 0 483M 483M 70472 S 0 6 00:00 1 java
15 0 483M 483M 70472 S 0 6 00:42 0 java
15 0 483M 483M 70472 S 0 6 00:48 1 java
15 0 483M 483M 70472 S 0 6 01:15 0 java
25 0 483M 483M 70472 S 0 6 00:00 1 java
25 0 483M 483M 70472 S 0 6 00:00 1 java
25 0 483M 483M 70472 S 0 6 00:00 1 java
25 0 483M 483M 70472 S 0 6 00:00 1 java
25 0 483M 483M 70472 S 0 6 00:00 1 java
25 0 483M 483M 70472 S 0 6 00:00 1 java
25 0 483M 483M 70472 S 0 6 00:00 1 java
25 0 483M 483M 70472 S 0 6 00:00 1 java
25 0 483M 483M 70472 S 0 6 00:00 0 java
25 0 483M 483M 70472 S 0 6 00:00 1 java
25 0 483M 483M 70472 S 0 6 00:00 1 java
25 0 483M 483M 70472 S 0 6 00:00 1 java
15 0 483M 483M 70472 S 0 6 00:14 0 java
15 0 483M 483M 70472 S 0 6 00:13 1 java
15 0 483M 483M 70472 S 0 6 00:23 0 java
15 0 483M 483M 70472 S 0 6 00:00 1 java
15 0 483M 483M 70472 S 0 6 00:03 0 java
15 0 483M 483M 70472 S 0 6 00:03 0 java
15 0 483M 483M 70472 S 0 6 00:05 1 java

Again, the formatting is going bad, hence i have removed the first two columns(the user is the same). Could you please explain what this means?

Also, as I already told you, we have set the weblogic JVM heap at 2 gigs, which means that if any application deployed in weblogic requires more than 2 gigs of memory, weblogic would simply shut down saying it is out of memory. And this being a dedicated server, it has nothing else but weblogic server which hosts our app. So, the idea that the machine is using 90% memory is a little absurd, I feel.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved