I suspect I've found a clue. My vps is a user mode linux vps. I'm
beginning to suspect that under uml or at least the one i'm operating
under the threads are handled 'special' since i can see the apache
threads on my real box using ps.

In fact i ran my load tester locally on the vps and each thread showed
up as a separate process using ps. Which on a normal box shows up as
threads...


On May 18, 10:56 am, Caz <[EMAIL PROTECTED]> wrote:
> Good point, tho i do ps -e which only lists the process name, not its
> params. So greps not included.
>
> Here's the count specifically excluding greps...
> $ ps -ef | grep apache2 | grep -v grep | wc
>      29     319    2349
>
> Here's the straight grepped output with f added
> [EMAIL PROTECTED]:~$ ps -ef | grep apache2
> root       686     1  0 May13 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22687   686  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22688 22687  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22690 22688  0 May17 ?        00:00:01 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22691 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22692 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22693 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22694 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22695 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22696 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22697 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22698 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22699 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22700 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22701 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22702 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22703 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22704 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22705 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22706 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22707 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22708 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22709 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22710 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22711 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22712 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22713 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22714 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
> www-data 22715 22688  0 May17 ?        00:00:00 /usr/sbin/apache2 -k
> start -DSSL
>
> Looks like there's a parent process with a single child which then has
> 27 children of his own...
>
> I'm assuming apache's setup is running worker mpm since i get worker
> when i list apache's modules
>
> # apache2 -l
> Compiled in modules:
>   core.c
>   mod_access.c
>   mod_auth.c
>   mod_log_config.c
>   mod_logio.c
>   mod_env.c
>   mod_setenvif.c
>   worker.c
>   http_core.c
>   mod_mime.c
>   mod_status.c
>   mod_autoindex.c
>   mod_negotiation.c
>   mod_dir.c
>   mod_alias.c
>   mod_so.c
>
> >From the apache docs(http://httpd.apache.org/docs/2.0/mod/
>
> worker.html):
> "A single control process (the parent) is responsible for launching
> child processes. Each child process creates a fixed number of server
> threads as specified in the ThreadsPerChild directive,...."
>
> So thats 1 Process. The parent.
>
> "The number of processes that will initially launched is set by the
> StartServers  directive. Then during operation, Apache assesses the
> total number of idle threads in all processes, and forks or kills
> processes to keep this number within the boundaries specified by
> MinSpareThreads and MaxSpareThreads.....The maximum number of active
> child processes is determined by the MaxClients  directive divided by
> the  ThreadsPerChild directive."
>
> According to my config the max active child processes should be
> MaxClients(50)/ThreadsPerChild(25)=2 child processes. Which totals to
> 3 when u include the parent. However after startup it goes up to 29
> total. It used to be somewhere in the 50ties till i tuned MaxClietns
> down to 50, MaxSpareThreads down to 25 and MinSpareThreads down to 10.
>
> On May 17, 8:51 pm, Tim Chase <[EMAIL PROTECTED]> wrote:
>
> > > <IfModule worker.c>
> > > StartServers         2
> > > MaxClients         50
> > > MinSpareThreads    10
> > > MaxSpareThreads     25
> > > ThreadsPerChild     25
> > > MaxRequestsPerChild  0
> > > </IfModule>
>
> > > It still starts up 29 processes as given by:
> > > # ps -e | grep apache2 | wc
> > >      29     116     928
>
> > Well, my first thought is, if you omit the "| wc", what do you
> > see?  What's the output of
>
> >    # ps -e | grep apache2
>
> > Frequently, one of those processes is the grep process.  That
> > gets you down to 28.  There might be other items in those results
> > that give a forehead-smacking "duh" to the answer.
>
> > -tim


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to