Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
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.
Can somebody explain what is the Apache doing when the state is "sleep"?
My friend is suspecting that it is a zombie process, which means it consumes memory and CPU resource but it doing nothing.. that's why it is called "sleep" state. I doubt this theory.
My suspect is the child process is created when the apache first started and accepting request as it should. But when the user is already close the browser, the child process is still waiting other request in state of sleep and not immediately killed and that's why it is called "sleep" state.
Which one is correct? Actually I still doubt in my theory too, could somebody explain to me?
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
Originally Posted by romeo_tango
My friend is suspecting that it is a zombie process, which means it consumes memory and CPU resource but it doing nothing.. that's why it is called "sleep" state. I doubt this theory.
You are right, zombies are dead, so can't sleep !
It is wrong however to state zombies processes consumes memory and CPU, they make use of neither actually.
Quote:
My suspect is the child process is created when the apache first started and accepting request as it should. But when the user is already close the browser, the child process is still waiting other request in state of sleep and not immediately killed and that's why it is called "sleep" state.
Yes, a sleeping process is a process that currently has nothing to execute. It is just waiting for some event to occur (user action, network traffic)
Now the problem is how to explain things like that to our client that has the same opinion with my friend. He insisted that the "sleep" process is harmful to his system and wanted a good explanation why the heck was the process sleeping while the load / hits to the web were hundreds.
Well the person has no *NIX background and this is the first time he is using Apache... and the word "sleep" which is displayed by prstat command really bugs him since the website becomes very slow at the peak time.
Our box is using 8 GB RAM and at the peak time, all the 90% of the memory is taken by apache. I already try to change the MaxClients directive in the httpd.comf file, and it has no effect to the performance whether the webservd user is 180 or 300. It is still slow..
Could it be because of the content? The index.php file itself is loading many dynamic flash files and image type objects. The server's bandwidth will be no problem as they are one of the biggest ISPs in my country.
I am gonna checking the Oracle's query in the server with my friend tomorrow. I just want to assure that the server (the "sleeping" httpd) is fine.
Thanks for the suggestion.
Last edited by romeo_tango; 04-15-2008 at 10:52 AM.
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547
Rep:
It's not as easy to diagnose such problem without observing the runtime environment. You should profile your application, run performance test with a proper methodology and discover the causes of the slowdown, which aren't obvious a priori. You should not only check memory usage, but the usual parameters you observe in such situation such as: CPUs usage, memory usage, I/O, network usage, threading issues, request queues and so on and discover which is the major bottleneck at peak time. Once resolved that, you may iterate to resolve other issues which may surface and you can't observe now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.