Figuring out Causes for Server Slowness
Let's say we see a Linux Server experiencing slowness in responding to requests, as it would do if you were running Apache/Tomcat on it, for instance. We check the Load Average, CPU Utilization, and RAM/SWAP Utilization, etc. What else can we check to figure out the slowness?
I was asked the question in an interview for Linux Administration and the interviewer said he was not satisfied with the answer I provided. He wanted an answer to the part shown in Italic above. I told him we could use Process Tree or trace the process / application as to what other system calls it is making. He wanted to know what else we could check, if CPU/Memory utilization was not causing the slowness on the server side?
One more thing, he asked, is it safe to kill Zombie processes? My answer was "Yes!" What else would you do with a Zombie process, by the way? Do we keep them as they are?
Thanks for your insight on the above discussion.
CPU, Memory, and Disk.;)
It's hard to answer the question without the benefit of knowing the level of professionalism of the company. If the company adheres to a methodology that includes release management you expect it to maintain separate production and staging areas. Testing and quality assurance being the responsibility of both the development group and whoever does release management, this ensures no release is installed in the staging area w/o it being signing off based on whatever quality control parameters are used. (On a side note if development is unorganized and free to inject whatever new tricks they learned the result can only be utter crap. Problem is utter crap can rear its ugly head very subtly and days or weeks after deployment. So due to experience whenever there were deployment problems my first reflex was to blame the developer group.)
Practically speaking this means you have two environments for behaviour comparison, and given low level bottlenecks (SAR) should be considered the most basic metrics monitored anyway, this leaves you with application level performance profiling. Apache, BEA, Sun and JBoss all have toolkits to help investigate performance and memory leak issues and if you can't find what you need there's always companies willing to sell you some tools.
...would be my reply.
Perhaps he was expecting sar,vmstat,iostat,top kind of answers.
1.Monitor the amount of hits by apache server for particular time schedule and check whether the server of capable of handling the huge request
grep -c "date" /etc/httpd/log/access.log
2.Check the memory consumption & Harddisk usage.Check whether its using swap memory .Whenever server start using swap memory eventually server leads to slowness
3.Check the input/output statitics using iostat
4.Its always safe to keep zombie process low as possible because which eventually utilise the resource of server and leads to server slowness
# ps -elf | grep Z -To list Zombie process
S : sleeping
R : running
D : waiting (over het algemeen voor IO)
T : gestopt (suspended) of getrasseerd
Z : zombie (defunct)
4.If its Apache check .
* check whether log resolvation happens by hostname instead of ipadress .Name resolvation can increase the load of server
* check whether mod deflate module is enable to filecompression take place between server to client browser to reduce bandwidth
* we can even optimise the slowness of Apache Server using apache module like mod_cache to which gives to faster response time of the request
*Check whether Apache Tomcat is updated on regular basis
|All times are GMT -5. The time now is 07:42 PM.|