Re: killing of greater than MaxSpareServers

2001-01-18 Thread Jayme Frye

Perrin Harkins wrote:

  On Wed, 17 Jan 2001, ___cliff rayman___ wrote:
 
  i and others have written on the list before, that pushing apache
  children into swap causes a rapid downward spiral in performance. I
  don't think that MaxClients is the right way to limit the # of
  children.  i think MaxSpareCoreMemory would make more sense.  You
  could set this to 1K if your server was designated for Apache only, or
  set it to a higher value if it were a multipurpose machine.
 
 
  I've thought about that too.  The trick is, Apache would need to know
  things about your application to do that right.  It would need to 
know how
  big your processes were likely to be and how big they could get before
  they die.  Otherwise, it has no way of knowing whether or not there's
  enough room for another process.
 
  A combination of Apache::SizeLimit and a dynamically changing MaxClients
  could possibly accomplish this, but you wouldn't want to run it too close
  to the edge since you don't want to have to axe a process that's in the
  middle of doing something just because it got a little too big (i.e. no
  hard limits on per-process memory usage).
 
  You can't change MaxClients while the server is running, can you?
 
  - Perrin

This may not be quite on topic. I wonder in the case of a dedicated
Apache/Mod_Perl server if it wouldn't be best to spawn up to a maximum
number of child procs that the server can handle at startup. Maximum
child procs calculated based on the amount of core memory minus amount
of real memory used by each proc (Stas Bekman mod_perl guide Performance
Tuning Section) with a cushion of free core memory to allow for some
process growth and handle misc. house keeping duties of the server. Then
use the Apache::GtopLimit module to prune child procs based on memory
size. If a child proc grows too large because of memory leaks for
example it is killed and a fresh proc spawned in its place. In this way
you always have as many procs available as your server can handle for
periods of high load. No wasted time spawning up to meet the load.


Jayme Frye
System Administrator
Inventive Comm.





Re: Apache::Scoreboard returns incomplete information to Apache::Watchdog::RunAway.

2000-11-06 Thread Jayme Frye

"G.W. Haywood" wrote:

 Hi there,

 On Mon, 6 Nov 2000, Jayme Frye wrote:

  I am setting up Apache::Watchdog::RunAway and have come across a
  problem with Apache::Scoreboard that breaks Watchdog.
 [snip]
   Apache compile time options:
 
   SL_BASE=SYSTEM \
   EAPI_MM=SYSTEM \
   CC="egcs" \
   OPTIM="-O9

 Extract from apache_1.3.14/src/Configuration:

 # Optimization note:
 # Be careful when adding optimization flags (like -O3 or -O6) on the OPTIM
 # entry, especially when using some GCC variants. Experience showed that using
 # these for compiling Apache is risky. If you don't want to see Apache dumping
 # core regularly then at most use -O or -O2.

 73,
 Ged.

Thanks for the info. Although I have had no problems with this level of
optimization I tried recompiling with -O and -O2. Unfortunately compiling with -O
or -O2 did nothing to correct the ouptut of Apache::Scoreboard.  The problem also
effects Apache::VMonitor which returns incomplete information as well.

Jayme Frye
Senior System Administrator
Inventive Comm
[EMAIL PROTECTED]




Apache::Scoreboard returns incomplete information to Apache::Watchdog::RunAway.

2000-11-06 Thread Jayme Frye

I am setting up Apache::Watchdog::RunAway and have come across a problem
with Apache::Scoreboard that breaks Watchdog. The broken thing is
access_count which is always 0 (my $count = $process-my_access_count;).
This causes process running time to continue to increase until the
Apache::Watchdog::RunAway timeout is reached and the process is marked
as hung and killed.

Sample debug output from Watchdog:
OK 3 25345 W 0 30 0
OK 8 25383 W 0 24 0
OK 7 25411 W 0 18 0
OK 11 25421 W 0 15 0
OK 2 25408 W 0 3 0
OK 2 25408 W 0 6 0
OK 3 25345 W 0 33 0
[Tue Oct 31 11:37:11 2000] Apache::Watchdog::RunAway: child proc 25345
seems
to hang -- it is running longer than limit of 30 secs
($Apache::Watchdog::RunAway::TIMEOUT).
Killing proc 25345.
OK 7 25411 W 0 21 0
OK 11 25421 W 0 18 0

From conversations with the author of Watchdog an example of correct
output:
OK 2 13377 W 2 0 1
OK 0 13374 W 8 0 7
OK 2 13377 W 3 0 2
OK 0 13374 W 9 0 8
OK 2 13377 W 4 0 3
OK 2 13377 W 5 0 4
--
col   1  23 4 5 6

See the columns above: column 5 is the time the process is running,
column
4 is the count of requests served by the child and col6 is the last
request served. So the killing rule triggers when:
col 4 and 6 has the same value and col 5 is bigger than TIMEOUT value.

Finally here is some info on the environment this is running under.

Output from perl-status:
Embedded Perl version 5.00503 for Apache/1.3.12 (Unix) AuthMySQL/2.20
mod_perl/1.24 PHP/3.0.16 mod_ssl/2.6.4 OpenSSL/0.9.5a process 16288,
running since Tue Oct 31 16:34:26 2000

Everything is compiled from tar balls on a RH 6.2 base install. Below
are my
compile time options for apache and mod_perl:

 Apache compile time options:

 SL_BASE=SYSTEM \
 EAPI_MM=SYSTEM \
 CC="egcs" \
 OPTIM="-O9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro
 -march=pentiumpro -fomit-frame-pointer -fno-exceptions" \
 CFLAGS="-DDYNAMIC_MODULE_LIMIT=0 -DSINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -DBUFFERED_LOGS" \
 ./configure \
 --with-layout=GNU \
 --add-module=src/modules/experimental/mod_mmap_static.c \
 --add-module=src/modules/standard/mod_auth_dbm.c \
 --enable-module=ssl \
 --enable-rule=SSL_SDBM \
 --disable-rule=SSL_COMPAT \
 --activate-module=src/modules/php3/libphp3.a \
 --enable-module=php3 \
 --activate-module=src/modules/perl/libperl.a \
 --enable-module=perl \
 --activate-module=src/modules/auth_mysql/libauth_mysql.a \
 --disable-module=negotiation \
 --disable-module=autoindex \
 --disable-module=asis \
 --disable-module=imap

 mod_perl compile time options:

 EVERYTHING=1 \
 APACHE_SRC=../apache-1.3.12/src \
 USE_APACI=1 \
 PREP_HTTPD=1 \
 DO_HTTPD=1

 Thanks again for the help.

Jayme Frye
Senior System Administrator
Inventive Comm.
[EMAIL PROTECTED]



Apache::Scoreboard returns incomplete information to Apache::Watchdog::RunAway.

2000-11-01 Thread Jayme Frye

I am setting up Apache::Watchdog::RunAway and have come across a problem
with Apache::Scoreboard that breaks Watchdog. The broken thing is
access_count which is always 0 (my $count = $process-my_access_count;).
This causes process running time to continue to increase until the
Apache::Watchdog::RunAway timeout is reached and the process is marked
as hung and killed.

Sample debug output from Watchdog:
OK 3 25345 W 0 30 0
OK 8 25383 W 0 24 0
OK 7 25411 W 0 18 0
OK 11 25421 W 0 15 0
OK 2 25408 W 0 3 0
OK 2 25408 W 0 6 0
OK 3 25345 W 0 33 0
[Tue Oct 31 11:37:11 2000] Apache::Watchdog::RunAway: child proc 25345
seems
to hang -- it is running longer than limit of 30 secs
($Apache::Watchdog::RunAway::TIMEOUT).
Killing proc 25345.
OK 7 25411 W 0 21 0
OK 11 25421 W 0 18 0

From conversation with the author of Watchdog correct output:
OK 2 13377 W 2 0 1
OK 0 13374 W 8 0 7
OK 2 13377 W 3 0 2
OK 0 13374 W 9 0 8
OK 2 13377 W 4 0 3
OK 2 13377 W 5 0 4
--
col   1  23 4 5 6

See the columns above: column 5 is the time the process is running,
column
4 is the count of requests served by the child and col6 is the last
request served. So the killing rule triggers when:
col 4 and 6 has the same value and col 5 is bigger than TIMEOUT value.

Finally here is some info on the environment this is running under.

Output from perl-status:
Embedded Perl version 5.00503 for Apache/1.3.12 (Unix) AuthMySQL/2.20
mod_perl/1.24 PHP/3.0.16 mod_ssl/2.6.4 OpenSSL/0.9.5a process 16288,
running since Tue Oct 31 16:34:26 2000

Everything is compiled from tar balls on a RH 6.2 base install. Below
are my
compile time options for apache and mod_perl:

 Apache compile time options:

 SL_BASE=SYSTEM \
 EAPI_MM=SYSTEM \
 CC="egcs" \
 OPTIM="-O9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro
 -march=pentiumpro -fomit-frame-pointer -fno-exceptions" \
 CFLAGS="-DDYNAMIC_MODULE_LIMIT=0 -DSINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -DBUFFERED_LOGS" \
 ./configure \
 --with-layout=GNU \
 --add-module=src/modules/experimental/mod_mmap_static.c \
 --add-module=src/modules/standard/mod_auth_dbm.c \
 --enable-module=ssl \
 --enable-rule=SSL_SDBM \
 --disable-rule=SSL_COMPAT \
 --activate-module=src/modules/php3/libphp3.a \
 --enable-module=php3 \
 --activate-module=src/modules/perl/libperl.a \
 --enable-module=perl \
 --activate-module=src/modules/auth_mysql/libauth_mysql.a \
 --disable-module=negotiation \
 --disable-module=autoindex \
 --disable-module=asis \
 --disable-module=imap

 mod_perl compile time options:

 EVERYTHING=1 \
 APACHE_SRC=../apache-1.3.12/src \
 USE_APACI=1 \
 PREP_HTTPD=1 \
 DO_HTTPD=1

 Thanks again for the help.

Jayme Frye
Senior System Administrator
Inventive Comm.
[EMAIL PROTECTED]