Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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.
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:
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?
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...
He's got 11168MB of free /swap/ (so no OOM errors) but he's swapping out - 1123MB swap in use on a 3GB RAM host tells me he's probably swapping quite hard, which is why the machine's running slow.
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?
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).
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?
getting data into and out of swap space is slower than doing a similar thing with ram, by orders of magnitude, so relying on swap to substitute for ram is not going to help speed, however much swap you have left.
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?
well, you asked: So here is my inadequate analysis:
Code:
-----------memory---------- ---swap-- -----io---- --system-- -----cpu----- -
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 3 873600 24528 2784 641004 448 4908 2690 4922 1303 576 10 25 0 64 0
look at that wait percentage; any system with a wait percentage that high is spending most of its time waiting for something to happen. Swap and IO is pretty high, so its probably swapping rather than other IO.
So the questions seem to be 'what' (what is causing the swapping) and 'why' (why is taking this much time)?
Is there any reason that your disk could be slow?
What kernel are you using?
Any idea why the number of processes waiting for run time suddenly jumps up? (Maybe watching top (etc) gives you some idea of this.)
Do any processes consume what seems to be an excessive amount of memory taking into account what they are doing? (Again, top, etc)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.