perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <sbek...@iil.intel.com>
Subject rewrite of Apache::SizeLimit
Date Sat, 14 Aug 1999 17:39:40 GMT
Hi,

I rewrote  Apache::SizeLimit to use GTop perl interface to libgtop
(http://home-of-linux.org/gnome/libgtop/) a crossplatform lib to access
system resources (currenlty supports linux, *BSD, Solaris)

Using this library opens up the opportunities to limit the processes on
many different criterions (cpu, inodes, total memory (shared,rss, size and
etc), process memory, process cpu and much more - check out the URL from
above).

So first I've changed the name from Apache::SizeLimit to Apache::Limit,
since it's going to be a much wider range of limits, than just Size...

As of this moment I've implemented the MIN_PROCESS_SHARED_SIZE in addition
to the original MAX_PROCESS_SIZE.

Of course the question that follows, what is an overhead added? You will
see the benchmarks below, that were optimized to measure the margins added
by Apache::(Size)?Limit handlers relative to a regular configuration. 

The results are that both Apache::(Size)?Limit handlers counted the same
results, so there is no more overhead added by making Apache::SizeLimit
obsolete. And there is a very little overhead about 15% related to the
regular run (with no Apache::(Size)?Limit handler enabled), which is
actually much smaller in a real application and not "Hello" print.

So here are the benchmarks - try the lib, tell me whether it works for
you. Later I'll add the missing pods and upload it to CVS.

BTW, Am I correct to rename it?

Environment:
* Both testing clients and server were run on the same machine (worse
testing)
* Machine: 		Linux RH6.0, 200Mb RAM, Pentium 200MMX
* Server Software:   	Apache/1.3.9-dev   (mod_perl 1.22-dev)
* server params:
MinSpareServers 	20
MaxSpareServers 	20
StartServers 		20
MaxClients 		50
MaxRequestsPerChild    300

Benchmarks:

the script:
----------
print "Content-type: text/html\n\n";
print "Hello $$\n";

% ab -n 100 -c 10 http://www.stas.com/perl/limit/hello.pl

1. no limits handler

Concurrency Level:      10
Time taken for tests:   1.457 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      21500 bytes
HTML transferred:       1100 bytes
Requests per second:    68.63
Transfer rate:          14.76 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:        0     0     3
Processing:   122   143   175
Total:        122   143   178

2. Apache::Limit

Concurrency Level:      10
Time taken for tests:   1.780 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      21500 bytes
HTML transferred:       1100 bytes
Requests per second:    56.18
Transfer rate:          12.08 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:        0     0     3
Processing:   158   176   255
Total:        158   176   258

3. Apache::SizeLimit

Concurrency Level:      10
Time taken for tests:   1.808 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      21500 bytes
HTML transferred:       1100 bytes
Requests per second:    55.31
Transfer rate:          11.89 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:        0     0     3
Processing:   155   178   238
Total:        155   178   241



_______________________________________________________________________
Stas Bekman  mailto:sbekman@iil.intel.com    www.singlesheaven.com/stas  
Perl,CGI,Apache,Linux,Web,Java,PC at  www.singlesheaven.com/stas/TULARC
www.apache.org  & www.perl.com  == www.modperl.com  ||  perl.apache.org
single o-> + single o-+ = singlesheaven    http://www.singlesheaven.com

Mime
View raw message