Linux server slow
I have been getting requests from application teams that the server is running slow. I have checked the memory utilization, processes running and cpu utilization. Please find below:
#free -m total used free shared buffers cached Mem: 3006 2994 11 0 6 171 -/+ buffers/cache: 2817 189 Swap: 12291 1123 11168 # Processes running and cpu utilization are OK. # df -h Filesystem Size Used Avail Use% Mounted on /dev/hda5 9.7G 2.6G 6.7G 28% / /dev/hda6 3.0G 69M 2.7G 3% /tmp /dev/hda2 68G 34G 31G 53% /u01 /dev/hda1 99M 12M 83M 13% /boot tmpfs 1.5G 0 1.5G 0% /dev/shm # Though most of the memory (RAM) utilized and just 11MB left for free, there is still HUGE swap space available. Will that not help with respect to memory? Why is the server running slow? Please let me know what are the other parameters to check and judge the server slowness. How to make it fast and comfortable server? |
Quote:
what about the output from top??? top -c then shift + m will list in order or memory usage. i dont think the ram being used is the problem as most of it is being used as cache for faster application access... |
or maybe just 'yum install htop' and see what is hang . and start type 'htop'.
|
I think you've run out of RAM. You're showing 189 MB free, but you've eaten over a GB of swap.
Run 'vmstat 2 20' and check the 'si' and 'so' values. If these are showing a lot of actvity, you're swapping. Dave |
Quote:
Code:
Swap: 12291 1123 11168 |
Yeah he has...
Code:
-/+ buffers/cache: 2817 189 Dave |
Thanks for the quick responses.
My question is: though I have huge SWAP space left why the machine is not using it? So once the memory (RAM)completely utilized, then server will stop running OR it will start using SWAP space? Please explain. |
Hi.
The machine's not using it because it doesn't need it. According to the figures you gave above, your machine is using 2817MB + 1123MB = 3940MB of memory for its applications. Your RAM /is/ completely utilised, and the machine is having to use swap space on disk because of this - this is what's (probably) slowing the machine down. The server should only stop working if you run out of swap (but if you end up using all 12GB of swap, the machine will probably be so slow it might as well have crashed). Dave |
Find out what is using this memory with top or htop..
|
Quote:
If you want to know anything about how much your use of swap is slowing the machine down, you need to look (or give us the chance to look) at the pages being swapped in and out. Having swap pages in use doesn't directly slow you down, but the traffic to and from the disk does. This is why you have been asked to give the information about traffic to and from swap, but you are not answering. Why is this? |
I have added 1GB more RAM. So now the RAM memory is 4GB and SWAP is 12GB.
Code:
]# vmstat 2 20 Please let me know your analysis. |
well, you asked: So here is my inadequate analysis:
Code:
-----------memory---------- ---swap-- -----io---- --system-- -----cpu----- - So the questions seem to be 'what' (what is causing the swapping) and 'why' (why is taking this much time)?
|
All times are GMT -5. The time now is 05:48 AM. |