You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" <ma...@hp.com> on 2001/08/15 22:55:06 UTC

[PATCH] ab with SSL support

Hi,
	For those interested in having ApacheBench with SSL support, here's
the patch for ab.c.. I've done some tests (concurrency, keepalive, no. of
requests) - there are still a lot of features which are yet to be developed
for SSL connections.. The patch is pretty simple - I just replace the HTTP
open/read/write/close function calls by the corresponding SSL functions...
So, the basic functionality provided by AB for HTTP connections should now
be available for HTTPS connections also.. 
	The SSL support can be enabled by defining "USE_SSL" on the compile
line.. There's however, a small problem of performance penalty.. If AB is
compiled with USE_SSL = ON, then there'll be atleast 4  "if (ssl == 1)"
statements executed for HTTP transactions.. I'm trying to get around it - by
defining a separate path for HTTP & HTTPS transactions - any ideas are
welcome.. 

SUMMARY OF ENHANCEMENTS:
-----------------------
- HTTPS GET requests
- HTTPS KeepAlive
- Concurrency & no. of requests (-c & -n)


Thanks
-Madhu


Re: Compiling Flood

Posted by Aaron Bannert <aa...@clove.org>.
Not yet :) But that looks like a bug.

One of the major goals of flood is to ensure that it will scale huge using
whatever mechanisms the local machine/network has; be those threads,
forked children, remote instances of flood (over rsh/ssh), and all at
the same time if desired.

Feel free to bring this discussion over to test-dev@httpd.apache.org

-aaron


On Thu, Aug 23, 2001 at 04:17:54PM +0200, Martin Kraemer wrote:
> On Thu, Aug 23, 2001 at 04:05:30PM +0200, Sander Striker wrote:
> > Do a cvs update, Justin fixed this yesterday :)
> > The rm_sp field was a solaris specific extention...
> 
> Thanks, that was better, but still no slice.
> 
> flood_net_ssl.o: In function `ssl_id':
> flood_net_ssl.c(.text+0xe3): undefined reference to `apr_os_thread_current'
> flood_easy_reports.o: In function `easy_process_stats':
> flood_easy_reports.c(.text+0xdc): undefined reference to `apr_os_thread_current'
> flood_farm.o: In function `farmer_worker':
> flood_farm.c(.text+0x15): undefined reference to `apr_thread_pool_get'
> flood_farm.o: In function `run_farm':
> flood_farm.c(.text+0x476): undefined reference to `apr_thread_create'
> flood_farm.c(.text+0x4e5): undefined reference to `apr_thread_join'
> flood_report_relative_times.o: In function `relative_times_process_stats':
> flood_report_relative_times.c(.text+0xcf): undefined reference to `apr_os_thread_current'
> Make: *** [flood] Fehler 1
> 
> Because of problems with threading in the past, I compiled apr without
> threading support (prefork mpm). Can't flood live without threads?
> 
>    Martin
> -- 
> <Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
>        <ma...@apache.org>              |   81730  Munich,  Germany

Re: Compiling Flood

Posted by Aaron Bannert <aa...@clove.org>.
Not yet :) But that looks like a bug.

One of the major goals of flood is to ensure that it will scale huge using
whatever mechanisms the local machine/network has; be those threads,
forked children, remote instances of flood (over rsh/ssh), and all at
the same time if desired.

Feel free to bring this discussion over to test-dev@httpd.apache.org

-aaron


On Thu, Aug 23, 2001 at 04:17:54PM +0200, Martin Kraemer wrote:
> On Thu, Aug 23, 2001 at 04:05:30PM +0200, Sander Striker wrote:
> > Do a cvs update, Justin fixed this yesterday :)
> > The rm_sp field was a solaris specific extention...
> 
> Thanks, that was better, but still no slice.
> 
> flood_net_ssl.o: In function `ssl_id':
> flood_net_ssl.c(.text+0xe3): undefined reference to `apr_os_thread_current'
> flood_easy_reports.o: In function `easy_process_stats':
> flood_easy_reports.c(.text+0xdc): undefined reference to `apr_os_thread_current'
> flood_farm.o: In function `farmer_worker':
> flood_farm.c(.text+0x15): undefined reference to `apr_thread_pool_get'
> flood_farm.o: In function `run_farm':
> flood_farm.c(.text+0x476): undefined reference to `apr_thread_create'
> flood_farm.c(.text+0x4e5): undefined reference to `apr_thread_join'
> flood_report_relative_times.o: In function `relative_times_process_stats':
> flood_report_relative_times.c(.text+0xcf): undefined reference to `apr_os_thread_current'
> Make: *** [flood] Fehler 1
> 
> Because of problems with threading in the past, I compiled apr without
> threading support (prefork mpm). Can't flood live without threads?
> 
>    Martin
> -- 
> <Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
>        <ma...@apache.org>              |   81730  Munich,  Germany

Re: Compiling Flood

Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Thu, Aug 23, 2001 at 04:17:54PM +0200, Martin Kraemer wrote:
> Because of problems with threading in the past, I compiled apr without
> threading support (prefork mpm). Can't flood live without threads?

Not right now.  =)  We model each user as a thread.

However, it should not be hard to have it fork for each user and then
call farmer_main.  I can try and look at it later today (should be a
quickie patch).  Maybe Aaron can jump in here.  I dunno what his 
schedule is like nowadays.  -- justin

P.S.  Flood's project mailing list is test-dev@httpd.apache.org.  If 
you have any more questions/comments about flood, please post them 
there.  =)


Re: Compiling Flood

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Thu, Aug 23, 2001 at 04:05:30PM +0200, Sander Striker wrote:
> Do a cvs update, Justin fixed this yesterday :)
> The rm_sp field was a solaris specific extention...

Thanks, that was better, but still no slice.

flood_net_ssl.o: In function `ssl_id':
flood_net_ssl.c(.text+0xe3): undefined reference to `apr_os_thread_current'
flood_easy_reports.o: In function `easy_process_stats':
flood_easy_reports.c(.text+0xdc): undefined reference to `apr_os_thread_current'
flood_farm.o: In function `farmer_worker':
flood_farm.c(.text+0x15): undefined reference to `apr_thread_pool_get'
flood_farm.o: In function `run_farm':
flood_farm.c(.text+0x476): undefined reference to `apr_thread_create'
flood_farm.c(.text+0x4e5): undefined reference to `apr_thread_join'
flood_report_relative_times.o: In function `relative_times_process_stats':
flood_report_relative_times.c(.text+0xcf): undefined reference to `apr_os_thread_current'
Make: *** [flood] Fehler 1

Because of problems with threading in the past, I compiled apr without
threading support (prefork mpm). Can't flood live without threads?

   Martin
-- 
<Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
       <ma...@apache.org>              |   81730  Munich,  Germany

Re: Compiling Flood

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Thu, Aug 23, 2001 at 03:52:26PM +0200, Kraemer, Martin wrote:
> 
> % make
> "/home/com5/martin/apachen/X/httpd-2.0/build/rules.mk", line 255: Could not find /.deps
> make: fatal errors encountered -- cannot continue
> Exit 1
> 
> (Okay, I accept that gmake is a requirement, but: )

...but httpd-2.0 itself compiles just file with FreeBSD's 'make'.

  Martin
-- 
<Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
       <ma...@apache.org>              |   81730  Munich,  Germany

RE: Compiling Flood

Posted by Sander Striker <st...@apache.org>.
Do a cvs update, Justin fixed this yesterday :)
The rm_sp field was a solaris specific extention...

Sander

> -----Original Message-----
> From: Martin Kraemer [mailto:Martin.Kraemer@Fujitsu-Siemens.com]
> Sent: 23 August 2001 15:52
> To: new-httpd@apache.org
> Subject: Compiling Flood
> 
> 
> On Thu, Aug 16, 2001 at 12:03:40AM -0700, Justin Erenkrantz wrote:
> > 
> > A better solution may be flood rather than ab (see httpd-test CVS
> > repository).  
> > 
> > I'm sounding like a broken harp, but it'd be nice to get external 
> > feedback on flood after the work we've put into it - we're using 
> > it here internally, so we know it works, but I'd love to see what 
> > people think about it.  Can we make it better (blah, blah, blah)?
> > 
> > SSL works there (has all of the features you want to add to ab) and 
> > you can do lots more with it.  That may come at *some* client-side 
> > performance penalty, but flood is still much more lightweight than 
> > the actual browsers people use.  So, the performance "penalty" is 
> > probably negligable for meaningless benchmarks anyway.  -- justin
> 
> All sounds very promising - only it doesn't compile.
> 
> % uname -a
> FreeBSD deejai2.mch.fsc.net 4.3-STABLE FreeBSD 4.3-STABLE #9: Thu 
> Aug  2 13:42:26 CEST 2001     
> martin@deejai2.mch.fsc.net:/usr/src/sys/compile/DEEJAI4B  i386
> 
> % make
> "/home/com5/martin/apachen/X/httpd-2.0/build/rules.mk", line 255: 
> Could not find /.deps
> make: fatal errors encountered -- cannot continue
> Exit 1
> 
> (Okay, I accept that gmake is a requirement, but: )
> 
> % gmake
> /bin/sh /home/com5/martin/apachen/X/httpd-2.0/srclib/apr/libtool 
> --silent --mode=compile gcc  -g -O2 -Wall    -D_REENTRANT 
> -D_THREAD_SAFE -I/pkg/openssl-0.9.6b/include 
> -I/home/com5/martin/apachen/X/httpd-2.0/srclib/apr/include/arch/un
> ix -DAP_HAVE_DESIGNATED_INITIALIZER   -I. 
> -I/home/com5/martin/apachen/X/httpd-2.0/os/unix 
> -I/home/com5/martin/apachen/X/httpd-2.0/server/mpm/prefork 
> -I/home/com5/martin/apachen/X/httpd-2.0/modules/http 
> -I/home/com5/martin/apachen/X/httpd-2.0/include 
> -I/home/com5/martin/apachen/X/httpd-2.0/srclib/apr/include 
> -I/home/com5/martin/apachen/X/httpd-2.0/srclib/apr-util/include 
> -I/usr/include/openssl 
> -I/home/com5/martin/apachen/X/httpd-2.0/modules/dav/main  -c 
> flood_round_robin.c && touch flood_round_robin.lo
> flood_round_robin.c: In function `handle_param_string':
> flood_round_robin.c:465: structure has no member named `rm_sp'
> flood_round_robin.c:474: structure has no member named `rm_sp'
> flood_round_robin.c:487: structure has no member named `rm_sp'
> flood_round_robin.c:495: structure has no member named `rm_sp'
> flood_round_robin.c:516: structure has no member named `rm_ep'
> flood_round_robin.c:452: warning: `size' might be used 
> uninitialized in this function
> flood_round_robin.c: In function `round_robin_postprocess':
> flood_round_robin.c:675: structure has no member named `rm_sp'
> gmake: *** [flood_round_robin.lo] Fehler 1
> Exit 2
> 
> I searched for rm_sp in the system's regex.h, as well as in
> httpd-2.0's srclib/pcre/, and in apache-1.3's src/regex/,
> but to no avail.
> 
> What do I need to change to get it to compile on a non-whatever-special
> system?
> 
> Curious and eagerly waiting,
> 
>   Martin
> -- 
> <Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
>        <ma...@apache.org>              |   81730  Munich,  Germany
> 

Compiling Flood

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Thu, Aug 16, 2001 at 12:03:40AM -0700, Justin Erenkrantz wrote:
> 
> A better solution may be flood rather than ab (see httpd-test CVS
> repository).  
> 
> I'm sounding like a broken harp, but it'd be nice to get external 
> feedback on flood after the work we've put into it - we're using 
> it here internally, so we know it works, but I'd love to see what 
> people think about it.  Can we make it better (blah, blah, blah)?
> 
> SSL works there (has all of the features you want to add to ab) and 
> you can do lots more with it.  That may come at *some* client-side 
> performance penalty, but flood is still much more lightweight than 
> the actual browsers people use.  So, the performance "penalty" is 
> probably negligable for meaningless benchmarks anyway.  -- justin

All sounds very promising - only it doesn't compile.

% uname -a
FreeBSD deejai2.mch.fsc.net 4.3-STABLE FreeBSD 4.3-STABLE #9: Thu Aug  2 13:42:26 CEST 2001     martin@deejai2.mch.fsc.net:/usr/src/sys/compile/DEEJAI4B  i386

% make
"/home/com5/martin/apachen/X/httpd-2.0/build/rules.mk", line 255: Could not find /.deps
make: fatal errors encountered -- cannot continue
Exit 1

(Okay, I accept that gmake is a requirement, but: )

% gmake
/bin/sh /home/com5/martin/apachen/X/httpd-2.0/srclib/apr/libtool --silent --mode=compile gcc  -g -O2 -Wall    -D_REENTRANT -D_THREAD_SAFE -I/pkg/openssl-0.9.6b/include -I/home/com5/martin/apachen/X/httpd-2.0/srclib/apr/include/arch/unix -DAP_HAVE_DESIGNATED_INITIALIZER   -I. -I/home/com5/martin/apachen/X/httpd-2.0/os/unix -I/home/com5/martin/apachen/X/httpd-2.0/server/mpm/prefork -I/home/com5/martin/apachen/X/httpd-2.0/modules/http -I/home/com5/martin/apachen/X/httpd-2.0/include -I/home/com5/martin/apachen/X/httpd-2.0/srclib/apr/include -I/home/com5/martin/apachen/X/httpd-2.0/srclib/apr-util/include -I/usr/include/openssl -I/home/com5/martin/apachen/X/httpd-2.0/modules/dav/main  -c flood_round_robin.c && touch flood_round_robin.lo
flood_round_robin.c: In function `handle_param_string':
flood_round_robin.c:465: structure has no member named `rm_sp'
flood_round_robin.c:474: structure has no member named `rm_sp'
flood_round_robin.c:487: structure has no member named `rm_sp'
flood_round_robin.c:495: structure has no member named `rm_sp'
flood_round_robin.c:516: structure has no member named `rm_ep'
flood_round_robin.c:452: warning: `size' might be used uninitialized in this function
flood_round_robin.c: In function `round_robin_postprocess':
flood_round_robin.c:675: structure has no member named `rm_sp'
gmake: *** [flood_round_robin.lo] Fehler 1
Exit 2

I searched for rm_sp in the system's regex.h, as well as in
httpd-2.0's srclib/pcre/, and in apache-1.3's src/regex/,
but to no avail.

What do I need to change to get it to compile on a non-whatever-special
system?

Curious and eagerly waiting,

  Martin
-- 
<Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
       <ma...@apache.org>              |   81730  Munich,  Germany

Re: [PATCH] ab with SSL support

Posted by Aaron Bannert <aa...@clove.org>.
On Thu, Aug 16, 2001 at 12:03:40AM -0700, Justin Erenkrantz wrote:
> On Wed, Aug 15, 2001 at 01:55:06PM -0700, MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) wrote:
> > Hi,
> > 	For those interested in having ApacheBench with SSL support, here's
> > the patch for ab.c.. I've done some tests (concurrency, keepalive, no. of
> > requests) - there are still a lot of features which are yet to be developed
> > for SSL connections.. The patch is pretty simple - I just replace the HTTP
> > open/read/write/close function calls by the corresponding SSL functions...
> > So, the basic functionality provided by AB for HTTP connections should now
> > be available for HTTPS connections also.. 
> > 	The SSL support can be enabled by defining "USE_SSL" on the compile
> > line.. There's however, a small problem of performance penalty.. If AB is
> > compiled with USE_SSL = ON, then there'll be atleast 4  "if (ssl == 1)"
> > statements executed for HTTP transactions.. I'm trying to get around it - by
> > defining a separate path for HTTP & HTTPS transactions - any ideas are
> > welcome.. 
> 
> A better solution may be flood rather than ab (see httpd-test CVS
> repository).  
> 
> I'm sounding like a broken harp, but it'd be nice to get external 
> feedback on flood after the work we've put into it - we're using 
> it here internally, so we know it works, but I'd love to see what 
> people think about it.  Can we make it better (blah, blah, blah)?
> 
> SSL works there (has all of the features you want to add to ab) and 
> you can do lots more with it.  That may come at *some* client-side 
> performance penalty, but flood is still much more lightweight than 
> the actual browsers people use.  So, the performance "penalty" is 
> probably negligable for meaningless benchmarks anyway.  -- justin

[warning: shameless plug]

The other thing about flood that was designed in from the start was the
various ways in which it scales. Right now flood can operate parallel
"user profiles" by assigning each to a thread, but we have plans for
this to scale to multiple processes and multiple machines, all controlled
by one flood process. We want this thing to be able to generate a huge
amount of traffic that resembles real-world traffic as closely as possible.

(Justin and I could use some help :)

-aaron

Re: [PATCH] ab with SSL support

Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Wed, Aug 15, 2001 at 01:55:06PM -0700, MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) wrote:
> Hi,
> 	For those interested in having ApacheBench with SSL support, here's
> the patch for ab.c.. I've done some tests (concurrency, keepalive, no. of
> requests) - there are still a lot of features which are yet to be developed
> for SSL connections.. The patch is pretty simple - I just replace the HTTP
> open/read/write/close function calls by the corresponding SSL functions...
> So, the basic functionality provided by AB for HTTP connections should now
> be available for HTTPS connections also.. 
> 	The SSL support can be enabled by defining "USE_SSL" on the compile
> line.. There's however, a small problem of performance penalty.. If AB is
> compiled with USE_SSL = ON, then there'll be atleast 4  "if (ssl == 1)"
> statements executed for HTTP transactions.. I'm trying to get around it - by
> defining a separate path for HTTP & HTTPS transactions - any ideas are
> welcome.. 

A better solution may be flood rather than ab (see httpd-test CVS
repository).  

I'm sounding like a broken harp, but it'd be nice to get external 
feedback on flood after the work we've put into it - we're using 
it here internally, so we know it works, but I'd love to see what 
people think about it.  Can we make it better (blah, blah, blah)?

SSL works there (has all of the features you want to add to ab) and 
you can do lots more with it.  That may come at *some* client-side 
performance penalty, but flood is still much more lightweight than 
the actual browsers people use.  So, the performance "penalty" is 
probably negligable for meaningless benchmarks anyway.  -- justin