You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Samisa Abeysinghe <SA...@virtusa.com> on 2004/11/25 06:00:49 UTC

RE: Axis 1.3 bug

Hi Steve,
	Thank you for the valuable feedback.
	I will look into these and fix them for 1.4 asap.
Regards,
Samisa...

-----Original Message-----
From: Steve Hardy [mailto:steve@connectux.com]
Sent: Wednesday, November 24, 2004 6:52 PM
To: Samisa Abeysinghe
Subject: Re: Axis 1.3 bug

And the same problem on line 230 with m_strServiceURI

fixing these two problems (and using Xerces, expat didn't seem to work),
fixes the simpleserver on win32.

On Wed, 24 Nov 2004, Steve Hardy wrote:

> Hey there,
>
> I was looking at why axis doesn't want te run on my win32 platform,
and
> came across the following (bad) problem:
>
> SimpleAxisTransport.cpp, line 244:
>
> return m_strSOAPAction.substr(uiOpStart,
> 		m_strSOAPAction.length () -
> 		uiOpStart).c_str();
>
> This is a *bad thing* because you are returning a pointer with c_str()
to
> an unnamed string object (the one returned by substr) which is out of
> context when you return the function. This seems to work in linux, (as
> long as the stack isn't clobbered), but in windows this fails in debug
> mode for sure, and probably in release mode too (MSVC++ 6.0).
>
> I'd recommend recoding this to returning a string object or having a
> c_str() pointer from the m_strSOAPAction object as this doesn't go out
of
> context.
>
> Yours,
>   Steve Hardy
>
>


--------------------------- -----------------------------------------------------------------
This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is intended for the addressee only. Any unauthorized disclosure, use, dissemination, copying, or distribution of this message or any of its attachments or the information contained in this e-mail, or the taking of any action based on it, is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail and delete this message.

Apache modules, simple axis server compiles on windows

Posted by sanjaya singharage <sa...@opensource.lk>.
Apache modules, simple axis server are compiling on windows now and the
initialize_module problem is gone.

sanjaya.



Re: Axis 1.3 bug

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
Patch applied to CVS head. On linux, the run_interoptests.sh runs in about 1/3 the time it took
earlier. Need to test on Windows.

Thanks for this valuble contribution.

Samisa....

--- Samisa Abeysinghe <sa...@yahoo.com> wrote:

> Cool! That sounds good!!!
> 
> I will apply the patch to CVS.
> 
> Thanks,
> Samisa...
> 
> --- Steve Hardy <st...@connectux.com> wrote:
> 
> > Sorry, the patch just posted was a patch to 1.3, here is the patch to
> > HEAD.
> > 
> > The Keep-Alive support of Axis2 now bumps up performance to around 2.6
> > seconds for 1000 requests, which is around 400 requests/second.
> > 
> > On Tue, 30 Nov 2004, Steve Hardy wrote:
> > 
> > > Here is the patch for the axis2 transport.
> > > 
> > > In my setup (linux client, win32 server, both on 100mbit LAN, and around
> > > 1Ghz CPU's), this increases client-side performance from doing 5 requests
> > > per second, to around 300 requests per second.
> > > 
> > > This is pretty good going for 2 lines of code ;)
> > > 
> > > The same patch could be applied to the axis transport, but I have not
> > > tested this.
> > > 
> > > I will test it with the Keepalive option I read about in HEAD to see if
> > > that further improver performance.
> > > 
> > > On Sun, 28 Nov 2004, Sanjiva Weerawarana wrote:
> > > 
> > > > Hi Steve,
> > > > 
> > > > Please submit the patch .. turning off Nagle had major impact
> > > > on Axis/Java and Apache SOAP as well. This was esp. true when
> > > > the client was a Win32 box ..
> > > > 
> > > > Sanjiva.
> > > > 
> > > > ----- Original Message ----- 
> > > > From: "Steve Hardy" <st...@connectux.com>
> > > > To: "Samisa Abeysinghe" <sa...@yahoo.com>
> > > > Cc: "Apache AXIS C Developers List" <ax...@ws.apache.org>
> > > > Sent: Thursday, November 25, 2004 6:07 PM
> > > > Subject: RE: Axis 1.3 bug
> > > > 
> > > > 
> > > > > Hi Samisa,
> > > > >
> > > > > I have been experimenting some more and found that if I modify the
> > > > > Calculator sample to do, say, 100 requests, it has a really bad
> > > > > performance of only 5 requests per second... I have traced this to delays
> > > > > caused by the Nagle algorithm in TCP, so I turned them off with
> > > > > setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(int)) in the
> > > > > Channel.cpp files, which made the performance shoot up to 300 requests per
> > > > > second on a single-threaded (win32) apache server (apache -X).
> > > > >
> > > > > Are you aware of this performance 'problem' and do you want a patch ? Or
> > > > > was this a design decision ?
> > > > >
> > > > > Also, are there any plans for bumping up the performance by supporting
> > > > > mutiple queries per HTTP connection? Experiments I have done with XMLRPC
> > > > > show that you can get up to 3000 requests per second that way.
> > > > >
> > > > > by the way, apache2 seems to segfault in win32 when running
> > > > > multi-threaded, but I'll look in to that later.
> > > > >
> > > > > On Thu, 25 Nov 2004, Samisa Abeysinghe wrote:
> > > > >
> > > > > > Hi Steve,
> > > > > >     I have done the fixes in the CVS head. Please try with a freash
> > > > ckeckout.
> > > > > > Thanks,
> > > > > > Samisa...
> > > > > >
> > > > > > --- Samisa Abeysinghe <SA...@virtusa.com> wrote:
> > > > > >
> > > > > > >
> > > > > > > Hi Steve,
> > > > > > > Thank you for the valuable feedback.
> > > > > > > I will look into these and fix them for 1.4 asap.
> > > > > > > Regards,
> > > > > > > Samisa...
> > > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Steve Hardy [mailto:steve@connectux.com]
> > > > > > > Sent: Wednesday, November 24, 2004 6:52 PM
> > > > > > > To: Samisa Abeysinghe
> > > > > > > Subject: Re: Axis 1.3 bug
> > > > > > >
> > > > > > > And the same problem on line 230 with m_strServiceURI
> > > > > > >
> > > > > > > fixing these two problems (and using Xerces, expat didn't seem to
> > > > work),
> > > > > > > fixes the simpleserver on win32.
> > > > > > >
> > > > > > > On Wed, 24 Nov 2004, Steve Hardy wrote:
> > > > > > >
> > > > > > > > Hey there,
> > > > > > > >
> > > > > > > > I was looking at why axis doesn't want te run on my win32 platform,
> > > > > > > and
> > > > > > > > came across the following (bad) problem:
> > > > > > > >
> > > > > > > > SimpleAxisTransport.cpp, line 244:
> > > > > > > >
> > > > > > > > return m_strSOAPAction.substr(uiOpStart,
> > > > > > > > m_strSOAPAction.length () -
> > > > > > > > uiOpStart).c_str();
> > > > > > > >
> > > > > > > > This is a *bad thing* because you are returning a pointer with
> > > > c_str()
> > > > > > > to
> > > > > > > > an unnamed string object (the one returned by substr) which is out
> > > > of
> > > > > > > > context when you return the function. This seems to work in linux,
> > > > (as
> > > > > > > > long as the stack isn't clobbered), but in windows this fails in
> > > > debug
> > > > > > > > mode for sure, and probably in release mode too (MSVC++ 6.0).
> > > > > > > >
> > > > > > > > I'd recommend recoding this to returning a string object or having a
> > > > > > > > c_str() pointer from the m_strSOAPAction object as this doesn't go
> > > > out
> > > > > > > of
> > > > > > > > context.
> > > > > > > >
> > > > > > > > Yours,
> > > > > > > >   Steve Hardy
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > --------------------------- ----------------------------------------------
> > > > -------------------
> > > > > > > This message, including any attachments, contains confidential
> > > > information intended for a
> > > > > > > specific individual and purpose, and is intended for the addressee
> > > > only. Any unauthorized
> > > > > > > disclosure, use, dissemination, copying, or distribution of this
> > > > message or any of its
> > > > > > > attachments or the information contained in this e-mail, or the taking
> > > > of any action based on
> > > > > > > it, is strictly prohibited. If you are not the intended recipient,
> > > > please notify the sender
> > > > > > > immediately by return e-mail and delete this message.
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > __________________________________
> > > > > > Do you Yahoo!?
> > > > > > Take Yahoo! Mail with you! Get it on your mobile phone.
> > > > > > http://mobile.yahoo.com/maildemo
> > > > > >
> > > > >
> > > > >
> > > > 
> > > > 
> > > 
> > > Index: c/src/transport/axis2/Channel.cpp
> > ===================================================================
> > RCS file: /home/cvspublic/ws-axis/c/src/transport/axis2/Channel.cpp,v
> > retrieving revision 1.8
> > diff -u -r1.8 Channel.cpp
> > --- c/src/transport/axis2/Channel.cpp	24 Nov 2004 08:08:50 -0000	1.8
> > +++ c/src/transport/axis2/Channel.cpp	30 Nov 2004 09:17:04 -0000
> > @@ -20,6 +20,9 @@
> >   * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
> >   */
> >  
> > +#include <sys/types.h>
> > +#include <sys/socket.h>
> > +#include <netinet/tcp.h>
> >  #include "Platform.h"
> >  #include "Channel.h"
> >  #include <iostream>
> > @@ -222,6 +225,19 @@
> >  #ifdef FJPDebug
> >  printf( "<Channel::open()=true, m_Sock=%d\n", m_Sock);
> >  #endif
> > +
> > +    /* Turn off the Nagle algorithm */
> > +
> > +    /* This is needed, because our TCP stack would otherwise wait at most
> > +     * 200 ms before actually sending data to the server (while waiting for
> > +     * a full packet). This limits performance to around 5 requests per
> > +     * second, which is not acceptable. Turning off the Nagle algorithm
> > +     * allows for much faster transmission of small packets, but may
> > +     * degrade high-bandwidth transmissions.
> > +     */
> > +
> > +    int one = 1;
> > +    setsockopt(m_Sock, IPPROTO_TCP, TCP_NODELAY, (char *)&one, sizeof(int));
> >  
> >      return true;
> >  }
> 
=== message truncated ===



	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

Re: Axis 1.3 bug

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
Cool! That sounds good!!!

I will apply the patch to CVS.

Thanks,
Samisa...

--- Steve Hardy <st...@connectux.com> wrote:

> Sorry, the patch just posted was a patch to 1.3, here is the patch to
> HEAD.
> 
> The Keep-Alive support of Axis2 now bumps up performance to around 2.6
> seconds for 1000 requests, which is around 400 requests/second.
> 
> On Tue, 30 Nov 2004, Steve Hardy wrote:
> 
> > Here is the patch for the axis2 transport.
> > 
> > In my setup (linux client, win32 server, both on 100mbit LAN, and around
> > 1Ghz CPU's), this increases client-side performance from doing 5 requests
> > per second, to around 300 requests per second.
> > 
> > This is pretty good going for 2 lines of code ;)
> > 
> > The same patch could be applied to the axis transport, but I have not
> > tested this.
> > 
> > I will test it with the Keepalive option I read about in HEAD to see if
> > that further improver performance.
> > 
> > On Sun, 28 Nov 2004, Sanjiva Weerawarana wrote:
> > 
> > > Hi Steve,
> > > 
> > > Please submit the patch .. turning off Nagle had major impact
> > > on Axis/Java and Apache SOAP as well. This was esp. true when
> > > the client was a Win32 box ..
> > > 
> > > Sanjiva.
> > > 
> > > ----- Original Message ----- 
> > > From: "Steve Hardy" <st...@connectux.com>
> > > To: "Samisa Abeysinghe" <sa...@yahoo.com>
> > > Cc: "Apache AXIS C Developers List" <ax...@ws.apache.org>
> > > Sent: Thursday, November 25, 2004 6:07 PM
> > > Subject: RE: Axis 1.3 bug
> > > 
> > > 
> > > > Hi Samisa,
> > > >
> > > > I have been experimenting some more and found that if I modify the
> > > > Calculator sample to do, say, 100 requests, it has a really bad
> > > > performance of only 5 requests per second... I have traced this to delays
> > > > caused by the Nagle algorithm in TCP, so I turned them off with
> > > > setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(int)) in the
> > > > Channel.cpp files, which made the performance shoot up to 300 requests per
> > > > second on a single-threaded (win32) apache server (apache -X).
> > > >
> > > > Are you aware of this performance 'problem' and do you want a patch ? Or
> > > > was this a design decision ?
> > > >
> > > > Also, are there any plans for bumping up the performance by supporting
> > > > mutiple queries per HTTP connection? Experiments I have done with XMLRPC
> > > > show that you can get up to 3000 requests per second that way.
> > > >
> > > > by the way, apache2 seems to segfault in win32 when running
> > > > multi-threaded, but I'll look in to that later.
> > > >
> > > > On Thu, 25 Nov 2004, Samisa Abeysinghe wrote:
> > > >
> > > > > Hi Steve,
> > > > >     I have done the fixes in the CVS head. Please try with a freash
> > > ckeckout.
> > > > > Thanks,
> > > > > Samisa...
> > > > >
> > > > > --- Samisa Abeysinghe <SA...@virtusa.com> wrote:
> > > > >
> > > > > >
> > > > > > Hi Steve,
> > > > > > Thank you for the valuable feedback.
> > > > > > I will look into these and fix them for 1.4 asap.
> > > > > > Regards,
> > > > > > Samisa...
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Steve Hardy [mailto:steve@connectux.com]
> > > > > > Sent: Wednesday, November 24, 2004 6:52 PM
> > > > > > To: Samisa Abeysinghe
> > > > > > Subject: Re: Axis 1.3 bug
> > > > > >
> > > > > > And the same problem on line 230 with m_strServiceURI
> > > > > >
> > > > > > fixing these two problems (and using Xerces, expat didn't seem to
> > > work),
> > > > > > fixes the simpleserver on win32.
> > > > > >
> > > > > > On Wed, 24 Nov 2004, Steve Hardy wrote:
> > > > > >
> > > > > > > Hey there,
> > > > > > >
> > > > > > > I was looking at why axis doesn't want te run on my win32 platform,
> > > > > > and
> > > > > > > came across the following (bad) problem:
> > > > > > >
> > > > > > > SimpleAxisTransport.cpp, line 244:
> > > > > > >
> > > > > > > return m_strSOAPAction.substr(uiOpStart,
> > > > > > > m_strSOAPAction.length () -
> > > > > > > uiOpStart).c_str();
> > > > > > >
> > > > > > > This is a *bad thing* because you are returning a pointer with
> > > c_str()
> > > > > > to
> > > > > > > an unnamed string object (the one returned by substr) which is out
> > > of
> > > > > > > context when you return the function. This seems to work in linux,
> > > (as
> > > > > > > long as the stack isn't clobbered), but in windows this fails in
> > > debug
> > > > > > > mode for sure, and probably in release mode too (MSVC++ 6.0).
> > > > > > >
> > > > > > > I'd recommend recoding this to returning a string object or having a
> > > > > > > c_str() pointer from the m_strSOAPAction object as this doesn't go
> > > out
> > > > > > of
> > > > > > > context.
> > > > > > >
> > > > > > > Yours,
> > > > > > >   Steve Hardy
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > --------------------------- ----------------------------------------------
> > > -------------------
> > > > > > This message, including any attachments, contains confidential
> > > information intended for a
> > > > > > specific individual and purpose, and is intended for the addressee
> > > only. Any unauthorized
> > > > > > disclosure, use, dissemination, copying, or distribution of this
> > > message or any of its
> > > > > > attachments or the information contained in this e-mail, or the taking
> > > of any action based on
> > > > > > it, is strictly prohibited. If you are not the intended recipient,
> > > please notify the sender
> > > > > > immediately by return e-mail and delete this message.
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > __________________________________
> > > > > Do you Yahoo!?
> > > > > Take Yahoo! Mail with you! Get it on your mobile phone.
> > > > > http://mobile.yahoo.com/maildemo
> > > > >
> > > >
> > > >
> > > 
> > > 
> > 
> > Index: c/src/transport/axis2/Channel.cpp
> ===================================================================
> RCS file: /home/cvspublic/ws-axis/c/src/transport/axis2/Channel.cpp,v
> retrieving revision 1.8
> diff -u -r1.8 Channel.cpp
> --- c/src/transport/axis2/Channel.cpp	24 Nov 2004 08:08:50 -0000	1.8
> +++ c/src/transport/axis2/Channel.cpp	30 Nov 2004 09:17:04 -0000
> @@ -20,6 +20,9 @@
>   * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
>   */
>  
> +#include <sys/types.h>
> +#include <sys/socket.h>
> +#include <netinet/tcp.h>
>  #include "Platform.h"
>  #include "Channel.h"
>  #include <iostream>
> @@ -222,6 +225,19 @@
>  #ifdef FJPDebug
>  printf( "<Channel::open()=true, m_Sock=%d\n", m_Sock);
>  #endif
> +
> +    /* Turn off the Nagle algorithm */
> +
> +    /* This is needed, because our TCP stack would otherwise wait at most
> +     * 200 ms before actually sending data to the server (while waiting for
> +     * a full packet). This limits performance to around 5 requests per
> +     * second, which is not acceptable. Turning off the Nagle algorithm
> +     * allows for much faster transmission of small packets, but may
> +     * degrade high-bandwidth transmissions.
> +     */
> +
> +    int one = 1;
> +    setsockopt(m_Sock, IPPROTO_TCP, TCP_NODELAY, (char *)&one, sizeof(int));
>  
>      return true;
>  }
> 



		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

Re: Axis 1.3 bug

Posted by Steve Hardy <st...@connectux.com>.
Sorry, the patch just posted was a patch to 1.3, here is the patch to
HEAD.

The Keep-Alive support of Axis2 now bumps up performance to around 2.6
seconds for 1000 requests, which is around 400 requests/second.

On Tue, 30 Nov 2004, Steve Hardy wrote:

> Here is the patch for the axis2 transport.
> 
> In my setup (linux client, win32 server, both on 100mbit LAN, and around
> 1Ghz CPU's), this increases client-side performance from doing 5 requests
> per second, to around 300 requests per second.
> 
> This is pretty good going for 2 lines of code ;)
> 
> The same patch could be applied to the axis transport, but I have not
> tested this.
> 
> I will test it with the Keepalive option I read about in HEAD to see if
> that further improver performance.
> 
> On Sun, 28 Nov 2004, Sanjiva Weerawarana wrote:
> 
> > Hi Steve,
> > 
> > Please submit the patch .. turning off Nagle had major impact
> > on Axis/Java and Apache SOAP as well. This was esp. true when
> > the client was a Win32 box ..
> > 
> > Sanjiva.
> > 
> > ----- Original Message ----- 
> > From: "Steve Hardy" <st...@connectux.com>
> > To: "Samisa Abeysinghe" <sa...@yahoo.com>
> > Cc: "Apache AXIS C Developers List" <ax...@ws.apache.org>
> > Sent: Thursday, November 25, 2004 6:07 PM
> > Subject: RE: Axis 1.3 bug
> > 
> > 
> > > Hi Samisa,
> > >
> > > I have been experimenting some more and found that if I modify the
> > > Calculator sample to do, say, 100 requests, it has a really bad
> > > performance of only 5 requests per second... I have traced this to delays
> > > caused by the Nagle algorithm in TCP, so I turned them off with
> > > setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(int)) in the
> > > Channel.cpp files, which made the performance shoot up to 300 requests per
> > > second on a single-threaded (win32) apache server (apache -X).
> > >
> > > Are you aware of this performance 'problem' and do you want a patch ? Or
> > > was this a design decision ?
> > >
> > > Also, are there any plans for bumping up the performance by supporting
> > > mutiple queries per HTTP connection? Experiments I have done with XMLRPC
> > > show that you can get up to 3000 requests per second that way.
> > >
> > > by the way, apache2 seems to segfault in win32 when running
> > > multi-threaded, but I'll look in to that later.
> > >
> > > On Thu, 25 Nov 2004, Samisa Abeysinghe wrote:
> > >
> > > > Hi Steve,
> > > >     I have done the fixes in the CVS head. Please try with a freash
> > ckeckout.
> > > > Thanks,
> > > > Samisa...
> > > >
> > > > --- Samisa Abeysinghe <SA...@virtusa.com> wrote:
> > > >
> > > > >
> > > > > Hi Steve,
> > > > > Thank you for the valuable feedback.
> > > > > I will look into these and fix them for 1.4 asap.
> > > > > Regards,
> > > > > Samisa...
> > > > >
> > > > > -----Original Message-----
> > > > > From: Steve Hardy [mailto:steve@connectux.com]
> > > > > Sent: Wednesday, November 24, 2004 6:52 PM
> > > > > To: Samisa Abeysinghe
> > > > > Subject: Re: Axis 1.3 bug
> > > > >
> > > > > And the same problem on line 230 with m_strServiceURI
> > > > >
> > > > > fixing these two problems (and using Xerces, expat didn't seem to
> > work),
> > > > > fixes the simpleserver on win32.
> > > > >
> > > > > On Wed, 24 Nov 2004, Steve Hardy wrote:
> > > > >
> > > > > > Hey there,
> > > > > >
> > > > > > I was looking at why axis doesn't want te run on my win32 platform,
> > > > > and
> > > > > > came across the following (bad) problem:
> > > > > >
> > > > > > SimpleAxisTransport.cpp, line 244:
> > > > > >
> > > > > > return m_strSOAPAction.substr(uiOpStart,
> > > > > > m_strSOAPAction.length () -
> > > > > > uiOpStart).c_str();
> > > > > >
> > > > > > This is a *bad thing* because you are returning a pointer with
> > c_str()
> > > > > to
> > > > > > an unnamed string object (the one returned by substr) which is out
> > of
> > > > > > context when you return the function. This seems to work in linux,
> > (as
> > > > > > long as the stack isn't clobbered), but in windows this fails in
> > debug
> > > > > > mode for sure, and probably in release mode too (MSVC++ 6.0).
> > > > > >
> > > > > > I'd recommend recoding this to returning a string object or having a
> > > > > > c_str() pointer from the m_strSOAPAction object as this doesn't go
> > out
> > > > > of
> > > > > > context.
> > > > > >
> > > > > > Yours,
> > > > > >   Steve Hardy
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > --------------------------- ----------------------------------------------
> > -------------------
> > > > > This message, including any attachments, contains confidential
> > information intended for a
> > > > > specific individual and purpose, and is intended for the addressee
> > only. Any unauthorized
> > > > > disclosure, use, dissemination, copying, or distribution of this
> > message or any of its
> > > > > attachments or the information contained in this e-mail, or the taking
> > of any action based on
> > > > > it, is strictly prohibited. If you are not the intended recipient,
> > please notify the sender
> > > > > immediately by return e-mail and delete this message.
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > __________________________________
> > > > Do you Yahoo!?
> > > > Take Yahoo! Mail with you! Get it on your mobile phone.
> > > > http://mobile.yahoo.com/maildemo
> > > >
> > >
> > >
> > 
> > 
> 

Re: Axis 1.3 bug

Posted by Steve Hardy <st...@connectux.com>.
Here is the patch for the axis2 transport.

In my setup (linux client, win32 server, both on 100mbit LAN, and around
1Ghz CPU's), this increases client-side performance from doing 5 requests
per second, to around 300 requests per second.

This is pretty good going for 2 lines of code ;)

The same patch could be applied to the axis transport, but I have not
tested this.

I will test it with the Keepalive option I read about in HEAD to see if
that further improver performance.

On Sun, 28 Nov 2004, Sanjiva Weerawarana wrote:

> Hi Steve,
> 
> Please submit the patch .. turning off Nagle had major impact
> on Axis/Java and Apache SOAP as well. This was esp. true when
> the client was a Win32 box ..
> 
> Sanjiva.
> 
> ----- Original Message ----- 
> From: "Steve Hardy" <st...@connectux.com>
> To: "Samisa Abeysinghe" <sa...@yahoo.com>
> Cc: "Apache AXIS C Developers List" <ax...@ws.apache.org>
> Sent: Thursday, November 25, 2004 6:07 PM
> Subject: RE: Axis 1.3 bug
> 
> 
> > Hi Samisa,
> >
> > I have been experimenting some more and found that if I modify the
> > Calculator sample to do, say, 100 requests, it has a really bad
> > performance of only 5 requests per second... I have traced this to delays
> > caused by the Nagle algorithm in TCP, so I turned them off with
> > setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(int)) in the
> > Channel.cpp files, which made the performance shoot up to 300 requests per
> > second on a single-threaded (win32) apache server (apache -X).
> >
> > Are you aware of this performance 'problem' and do you want a patch ? Or
> > was this a design decision ?
> >
> > Also, are there any plans for bumping up the performance by supporting
> > mutiple queries per HTTP connection? Experiments I have done with XMLRPC
> > show that you can get up to 3000 requests per second that way.
> >
> > by the way, apache2 seems to segfault in win32 when running
> > multi-threaded, but I'll look in to that later.
> >
> > On Thu, 25 Nov 2004, Samisa Abeysinghe wrote:
> >
> > > Hi Steve,
> > >     I have done the fixes in the CVS head. Please try with a freash
> ckeckout.
> > > Thanks,
> > > Samisa...
> > >
> > > --- Samisa Abeysinghe <SA...@virtusa.com> wrote:
> > >
> > > >
> > > > Hi Steve,
> > > > Thank you for the valuable feedback.
> > > > I will look into these and fix them for 1.4 asap.
> > > > Regards,
> > > > Samisa...
> > > >
> > > > -----Original Message-----
> > > > From: Steve Hardy [mailto:steve@connectux.com]
> > > > Sent: Wednesday, November 24, 2004 6:52 PM
> > > > To: Samisa Abeysinghe
> > > > Subject: Re: Axis 1.3 bug
> > > >
> > > > And the same problem on line 230 with m_strServiceURI
> > > >
> > > > fixing these two problems (and using Xerces, expat didn't seem to
> work),
> > > > fixes the simpleserver on win32.
> > > >
> > > > On Wed, 24 Nov 2004, Steve Hardy wrote:
> > > >
> > > > > Hey there,
> > > > >
> > > > > I was looking at why axis doesn't want te run on my win32 platform,
> > > > and
> > > > > came across the following (bad) problem:
> > > > >
> > > > > SimpleAxisTransport.cpp, line 244:
> > > > >
> > > > > return m_strSOAPAction.substr(uiOpStart,
> > > > > m_strSOAPAction.length () -
> > > > > uiOpStart).c_str();
> > > > >
> > > > > This is a *bad thing* because you are returning a pointer with
> c_str()
> > > > to
> > > > > an unnamed string object (the one returned by substr) which is out
> of
> > > > > context when you return the function. This seems to work in linux,
> (as
> > > > > long as the stack isn't clobbered), but in windows this fails in
> debug
> > > > > mode for sure, and probably in release mode too (MSVC++ 6.0).
> > > > >
> > > > > I'd recommend recoding this to returning a string object or having a
> > > > > c_str() pointer from the m_strSOAPAction object as this doesn't go
> out
> > > > of
> > > > > context.
> > > > >
> > > > > Yours,
> > > > >   Steve Hardy
> > > > >
> > > > >
> > > >
> > > >
> > >
> > --------------------------- ----------------------------------------------
> -------------------
> > > > This message, including any attachments, contains confidential
> information intended for a
> > > > specific individual and purpose, and is intended for the addressee
> only. Any unauthorized
> > > > disclosure, use, dissemination, copying, or distribution of this
> message or any of its
> > > > attachments or the information contained in this e-mail, or the taking
> of any action based on
> > > > it, is strictly prohibited. If you are not the intended recipient,
> please notify the sender
> > > > immediately by return e-mail and delete this message.
> > > >
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Take Yahoo! Mail with you! Get it on your mobile phone.
> > > http://mobile.yahoo.com/maildemo
> > >
> >
> >
> 
> 

Re: Axis 1.3 bug

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Hi Steve,

Please submit the patch .. turning off Nagle had major impact
on Axis/Java and Apache SOAP as well. This was esp. true when
the client was a Win32 box ..

Sanjiva.

----- Original Message ----- 
From: "Steve Hardy" <st...@connectux.com>
To: "Samisa Abeysinghe" <sa...@yahoo.com>
Cc: "Apache AXIS C Developers List" <ax...@ws.apache.org>
Sent: Thursday, November 25, 2004 6:07 PM
Subject: RE: Axis 1.3 bug


> Hi Samisa,
>
> I have been experimenting some more and found that if I modify the
> Calculator sample to do, say, 100 requests, it has a really bad
> performance of only 5 requests per second... I have traced this to delays
> caused by the Nagle algorithm in TCP, so I turned them off with
> setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(int)) in the
> Channel.cpp files, which made the performance shoot up to 300 requests per
> second on a single-threaded (win32) apache server (apache -X).
>
> Are you aware of this performance 'problem' and do you want a patch ? Or
> was this a design decision ?
>
> Also, are there any plans for bumping up the performance by supporting
> mutiple queries per HTTP connection? Experiments I have done with XMLRPC
> show that you can get up to 3000 requests per second that way.
>
> by the way, apache2 seems to segfault in win32 when running
> multi-threaded, but I'll look in to that later.
>
> On Thu, 25 Nov 2004, Samisa Abeysinghe wrote:
>
> > Hi Steve,
> >     I have done the fixes in the CVS head. Please try with a freash
ckeckout.
> > Thanks,
> > Samisa...
> >
> > --- Samisa Abeysinghe <SA...@virtusa.com> wrote:
> >
> > >
> > > Hi Steve,
> > > Thank you for the valuable feedback.
> > > I will look into these and fix them for 1.4 asap.
> > > Regards,
> > > Samisa...
> > >
> > > -----Original Message-----
> > > From: Steve Hardy [mailto:steve@connectux.com]
> > > Sent: Wednesday, November 24, 2004 6:52 PM
> > > To: Samisa Abeysinghe
> > > Subject: Re: Axis 1.3 bug
> > >
> > > And the same problem on line 230 with m_strServiceURI
> > >
> > > fixing these two problems (and using Xerces, expat didn't seem to
work),
> > > fixes the simpleserver on win32.
> > >
> > > On Wed, 24 Nov 2004, Steve Hardy wrote:
> > >
> > > > Hey there,
> > > >
> > > > I was looking at why axis doesn't want te run on my win32 platform,
> > > and
> > > > came across the following (bad) problem:
> > > >
> > > > SimpleAxisTransport.cpp, line 244:
> > > >
> > > > return m_strSOAPAction.substr(uiOpStart,
> > > > m_strSOAPAction.length () -
> > > > uiOpStart).c_str();
> > > >
> > > > This is a *bad thing* because you are returning a pointer with
c_str()
> > > to
> > > > an unnamed string object (the one returned by substr) which is out
of
> > > > context when you return the function. This seems to work in linux,
(as
> > > > long as the stack isn't clobbered), but in windows this fails in
debug
> > > > mode for sure, and probably in release mode too (MSVC++ 6.0).
> > > >
> > > > I'd recommend recoding this to returning a string object or having a
> > > > c_str() pointer from the m_strSOAPAction object as this doesn't go
out
> > > of
> > > > context.
> > > >
> > > > Yours,
> > > >   Steve Hardy
> > > >
> > > >
> > >
> > >
> >
> --------------------------- ----------------------------------------------
-------------------
> > > This message, including any attachments, contains confidential
information intended for a
> > > specific individual and purpose, and is intended for the addressee
only. Any unauthorized
> > > disclosure, use, dissemination, copying, or distribution of this
message or any of its
> > > attachments or the information contained in this e-mail, or the taking
of any action based on
> > > it, is strictly prohibited. If you are not the intended recipient,
please notify the sender
> > > immediately by return e-mail and delete this message.
> > >
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Take Yahoo! Mail with you! Get it on your mobile phone.
> > http://mobile.yahoo.com/maildemo
> >
>
>


RE: Axis 1.3 bug

Posted by Steve Hardy <st...@connectux.com>.
Hi Samisa,

I have been experimenting some more and found that if I modify the
Calculator sample to do, say, 100 requests, it has a really bad
performance of only 5 requests per second... I have traced this to delays
caused by the Nagle algorithm in TCP, so I turned them off with
setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(int)) in the
Channel.cpp files, which made the performance shoot up to 300 requests per
second on a single-threaded (win32) apache server (apache -X).

Are you aware of this performance 'problem' and do you want a patch ? Or
was this a design decision ?

Also, are there any plans for bumping up the performance by supporting
mutiple queries per HTTP connection? Experiments I have done with XMLRPC
show that you can get up to 3000 requests per second that way.

by the way, apache2 seems to segfault in win32 when running
multi-threaded, but I'll look in to that later.

On Thu, 25 Nov 2004, Samisa Abeysinghe wrote:

> Hi Steve,
>     I have done the fixes in the CVS head. Please try with a freash ckeckout.
> Thanks,
> Samisa...
>     
> --- Samisa Abeysinghe <SA...@virtusa.com> wrote:
> 
> > 
> > Hi Steve,
> > 	Thank you for the valuable feedback.
> > 	I will look into these and fix them for 1.4 asap.
> > Regards,
> > Samisa...
> > 
> > -----Original Message-----
> > From: Steve Hardy [mailto:steve@connectux.com]
> > Sent: Wednesday, November 24, 2004 6:52 PM
> > To: Samisa Abeysinghe
> > Subject: Re: Axis 1.3 bug
> > 
> > And the same problem on line 230 with m_strServiceURI
> > 
> > fixing these two problems (and using Xerces, expat didn't seem to work),
> > fixes the simpleserver on win32.
> > 
> > On Wed, 24 Nov 2004, Steve Hardy wrote:
> > 
> > > Hey there,
> > >
> > > I was looking at why axis doesn't want te run on my win32 platform,
> > and
> > > came across the following (bad) problem:
> > >
> > > SimpleAxisTransport.cpp, line 244:
> > >
> > > return m_strSOAPAction.substr(uiOpStart,
> > > 		m_strSOAPAction.length () -
> > > 		uiOpStart).c_str();
> > >
> > > This is a *bad thing* because you are returning a pointer with c_str()
> > to
> > > an unnamed string object (the one returned by substr) which is out of
> > > context when you return the function. This seems to work in linux, (as
> > > long as the stack isn't clobbered), but in windows this fails in debug
> > > mode for sure, and probably in release mode too (MSVC++ 6.0).
> > >
> > > I'd recommend recoding this to returning a string object or having a
> > > c_str() pointer from the m_strSOAPAction object as this doesn't go out
> > of
> > > context.
> > >
> > > Yours,
> > >   Steve Hardy
> > >
> > >
> > 
> > 
> > --------------------------- -----------------------------------------------------------------
> > This message, including any attachments, contains confidential information intended for a
> > specific individual and purpose, and is intended for the addressee only. Any unauthorized
> > disclosure, use, dissemination, copying, or distribution of this message or any of its
> > attachments or the information contained in this e-mail, or the taking of any action based on
> > it, is strictly prohibited. If you are not the intended recipient, please notify the sender
> > immediately by return e-mail and delete this message.
> > 
> 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Take Yahoo! Mail with you! Get it on your mobile phone. 
> http://mobile.yahoo.com/maildemo 
> 


RE: Axis 1.3 bug

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
Hi Steve,
    I have done the fixes in the CVS head. Please try with a freash ckeckout.
Thanks,
Samisa...
    
--- Samisa Abeysinghe <SA...@virtusa.com> wrote:

> 
> Hi Steve,
> 	Thank you for the valuable feedback.
> 	I will look into these and fix them for 1.4 asap.
> Regards,
> Samisa...
> 
> -----Original Message-----
> From: Steve Hardy [mailto:steve@connectux.com]
> Sent: Wednesday, November 24, 2004 6:52 PM
> To: Samisa Abeysinghe
> Subject: Re: Axis 1.3 bug
> 
> And the same problem on line 230 with m_strServiceURI
> 
> fixing these two problems (and using Xerces, expat didn't seem to work),
> fixes the simpleserver on win32.
> 
> On Wed, 24 Nov 2004, Steve Hardy wrote:
> 
> > Hey there,
> >
> > I was looking at why axis doesn't want te run on my win32 platform,
> and
> > came across the following (bad) problem:
> >
> > SimpleAxisTransport.cpp, line 244:
> >
> > return m_strSOAPAction.substr(uiOpStart,
> > 		m_strSOAPAction.length () -
> > 		uiOpStart).c_str();
> >
> > This is a *bad thing* because you are returning a pointer with c_str()
> to
> > an unnamed string object (the one returned by substr) which is out of
> > context when you return the function. This seems to work in linux, (as
> > long as the stack isn't clobbered), but in windows this fails in debug
> > mode for sure, and probably in release mode too (MSVC++ 6.0).
> >
> > I'd recommend recoding this to returning a string object or having a
> > c_str() pointer from the m_strSOAPAction object as this doesn't go out
> of
> > context.
> >
> > Yours,
> >   Steve Hardy
> >
> >
> 
> 
> --------------------------- -----------------------------------------------------------------
> This message, including any attachments, contains confidential information intended for a
> specific individual and purpose, and is intended for the addressee only. Any unauthorized
> disclosure, use, dissemination, copying, or distribution of this message or any of its
> attachments or the information contained in this e-mail, or the taking of any action based on
> it, is strictly prohibited. If you are not the intended recipient, please notify the sender
> immediately by return e-mail and delete this message.
> 



		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo