LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This 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


Reply
  Search this Thread
Old 04-15-2008, 05:34 AM   #1
romeo_tango
Member
 
Registered: Nov 2006
Distribution: Mint
Posts: 148

Rep: Reputation: 15
apache sleep status ?


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?

I am using mpm_prefork.

Thanks.
 
Old 04-15-2008, 08:55 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by romeo_tango View Post
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)
 
Old 04-15-2008, 10:49 AM   #3
romeo_tango
Member
 
Registered: Nov 2006
Distribution: Mint
Posts: 148

Original Poster
Rep: Reputation: 15
Hi jlliagre, thanks for the reply.

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.
 
Old 04-15-2008, 10:56 AM   #4
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Rep: Reputation: 36
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache server-status ilnli Linux - Software 0 07-11-2007 08:32 PM
Modify apache status code twantrd Linux - Software 6 05-10-2007 07:01 PM
Searching for Server (BOOTP/DHCP) <sleep> <sleep> .. .. Eileen Linux - Networking 12 10-21-2005 01:14 AM
Apache server-status help javamdk Linux - Networking 4 03-27-2005 08:45 PM
Apache server-status help javamdk Ubuntu 1 03-27-2005 05:53 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 08:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration