Server RAM Usage checkup & support


 
Thread Tools Search this Thread
Operating Systems Solaris Server RAM Usage checkup & support
# 1  
Old 04-30-2010
Server RAM Usage checkup & support

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 ..

Also what can be impact of this high RAM usage of the system ?

one impact i have noticed that it has become slow .

Thanks in Advace ...
# 2  
Old 04-30-2010
Beware that you might have computed shared memory segments more than once by using pmap output.

To better understand your memory usage, you can post these commands output:
Code:
swap -s
echo ::memstat | mdb -k
vmstat 5 5
prstat -Z -s rss -c -n 4 1 1

# 3  
Old 04-30-2010
swap -s
total: 28946352k bytes allocated + 3414784k reserved = 32361136k used, 3885104k available



vmstst 5 5

kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr m0 m1 m3 m4 in sy cs us sy id
10 0 0 5100944 886776 164 974 154 493 494 0 116 2 5 0 1 18113 196973 39266 69 16 15
13 0 0 3875264 1252720 229 587 690 428 412 0 0 0 0 0 0 21647 383666 38999 76 24 0
16 0 0 3865208 1246056 68 422 3 460 439 0 0 0 0 0 0 33147 377207 46801 75 25 0
20 0 0 3824328 1234288 289 1238 326 471 447 0 0 10 0 0 0 30461 383568 48936 75 25 0
15 0 0 3849016 1230616 206 809 231 327 305 0 0 7 0 0 5 18192 363225 31013 78 22 0


prstat -Z -s rss -c -n 4 1 1

PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
22375 a 1402M 1291M sleep 59 0 3:28:06 0.9% java/120
6600 a 1632M 1197M sleep 59 0 0:26:48 0.3% java/30
22396 a 897M 551M sleep 59 0 6:45:25 1.5% java/30
18180 a 468M 366M cpu0 21 0 29:18:35 7.5% java/26
ZONEID NPROC SWAP RSS MEMORY TIME CPU ZONE
0 238 31G 20G 83% 1020:05:3 96% global
Total: 238 processes, 4370 lwps, load averages: 25.22, 26.96, 33.10


echo ::memstat | mdb -k


Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 196209 1532 6%
Anon 2614375 20424 84%
Exec and libs 6415 50 0%
Page cache 110035 859 4%
Free (cachelist) 102065 797 3%
Free (freelist) 101092 789 3%

Total 3130191 24454
Physical 3079480 24058



Thanks for the Reply ... Can you please explain the meaning of all these and Usage of mamory as well as what is the meanng when u said "you might have computed shared memory segments more than once by using pmap output."
# 4  
Old 04-30-2010
Please add code tags to your previous posting; It is hard to read as is.

What is unclear in my sentence about shared memory segments ?
# 5  
Old 04-30-2010
PLease find below Output .... Sorry for inconvenience ,i am new on the forums ...

Code:
swap -s
total: 28946352k bytes allocated + 3414784k reserved = 32361136k used, 3885104k available

Code:
vmstst 5 5

kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr m0 m1 m3 m4 in sy cs us sy id
10 0 0 5100944 886776 164 974 154 493 494 0 116 2 5 0 1 18113 196973 39266 69 16 15
13 0 0 3875264 1252720 229 587 690 428 412 0 0 0 0 0 0 21647 383666 38999 76 24 0
16 0 0 3865208 1246056 68 422 3 460 439 0 0 0 0 0 0 33147 377207 46801 75 25 0
20 0 0 3824328 1234288 289 1238 326 471 447 0 0 10 0 0 0 30461 383568 48936 75 25 0
15 0 0 3849016 1230616 206 809 231 327 305 0 0 7 0 0 5 18192 363225 31013 78 22 0



Code:
prstat -Z -s rss -c -n 4 1 1

PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
22375 a 1402M 1291M sleep 59 0 3:28:06 0.9% java/120
6600 a 1632M 1197M sleep 59 0 0:26:48 0.3% java/30
22396 a 897M 551M sleep 59 0 6:45:25 1.5% java/30
18180 a 468M 366M cpu0 21 0 29:18:35 7.5% java/26
ZONEID NPROC SWAP RSS MEMORY TIME CPU ZONE
0 238 31G 20G 83% 1020:05:3 96% global
Total: 238 processes, 4370 lwps, load averages: 25.22, 26.96, 33.10


Code:
echo ::memstat | mdb -k


Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 196209 1532 6%
Anon 2614375 20424 84%
Exec and libs 6415 50 0%
Page cache 110035 859 4%
Free (cachelist) 102065 797 3%
Free (freelist) 101092 789 3%

Total 3130191 24454
Physical 3079480 24058



---------- Post updated at 08:04 PM ---------- Previous update was at 07:58 PM ----------

I guess I have not computed the shared memory ... Below is the script which i created to check the Memory usage ... Kindly let me know if i need to refine this or if you want to give me some suggeston on these ... Thanks

Code:
pids=`ps -fu a | grep -v grep | grep -v PID | grep -v memory_total_usage | awk '{print $2}'`

count=0

for i in $pids
do
memory=`pmap -x $i | grep -i total | awk '{ print $3 }'`
echo "Memory usage for this process PID $i is $memory"
if [ "$memory" -gt 0 ] ; then
count=`expr $count + $memory`
fi
done
echo "$memory"
MemoryinMB=`expr $count / 1024 `
MemoryinGB=`expr $MemoryinMB / 1024 `

echo "memory in Gb is $MemoryinGB"

# 6  
Old 04-30-2010
Well, you missed again to post something readable. You need to cut/paste the command output from your terminal emulator to the web editor to keep its correct formatting. Adding code tags to something that has lost its formatting is pretty useless.

Anyway, go buy some RAM to your server, it will be grateful to you.

You are using 29 GB of virtual memory on a server with 24 GB of RAM. Although it isn't currently starving, performance will be impacted sooner or later.

Alternatively, you can randomly kill one of these java processes, that's the Gnu/Linux way to save memory Smilie
# 7  
Old 04-30-2010
okay ! Thanks for such a great idea Sir Smilie


Any ways I will be so thankful to you if you can please explain me How can i find that from where the Server is using virtual memory i.e. which command will tell that which slice of disk is associated to be used as a virtual memory .

Also why is it using 29GB of virtual memory , it does have 24 GB RAM , then can t it use 24 GB RAM and 5 GB Virtual memory i.e. disk memory or swap space or input /output ....

I havn t worked in memory manegement etc at all . Will appreciate your answers on this
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Ubuntu 14.04 - how to less ram usage

Hello, I have an ubuntu14.04 installed pc with 32GB ram. Operating System: Ubuntu 14.04.5 LTS Kernel: Linux 4.9.148-xxxx-std-ipv6-64 Architecture: x86_64 When I check free memory it shows: total used free shared buffers cached Mem: 31882 ... (2 Replies)
Discussion started by: baris35
2 Replies

2. UNIX for Beginners Questions & Answers

Peak Ram Usage

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)
Discussion started by: dellanicholson
13 Replies

3. OS X (Apple)

RAM Usage discrepancy

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)
Discussion started by: dasx
2 Replies

4. Linux

Ram Usage

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)
Discussion started by: treds
8 Replies

5. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

6. Shell Programming and Scripting

RAM usage Information

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)
Discussion started by: warlock129
1 Replies

7. UNIX for Dummies Questions & Answers

Command to check RAM usage

Hi Guys, How can i check the RAM usage for a particular user on the Linux machine. What command can be used. Thanks in advance, Swapna (1 Reply)
Discussion started by: Swapna173
1 Replies

8. 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

9. Linux

Shared web server resources (CPU&RAM)

Hello, guys ! Long time no seen. I have a question about Linux web servers. I guess it is a more general question, but in my case it is a Linux web server. I want to know how much RAM memory should I put on my servers. Do you have some formula or guidelines on how should I calculate the amount... (1 Reply)
Discussion started by: Sergiu-IT
1 Replies
Login or Register to Ask a Question