tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ben short" <...@benshort.co.uk>
Subject Re: Tomcat 5.5.17 has max 40 KB / sec
Date Mon, 25 Sep 2006 14:37:51 GMT
Hi Steffen,

I can see your post.

Ben

On 9/25/06, Steffen Heil <lists@steffen-heil.de> wrote:
> Hi
>
> I know, reasking the same question if there was no answer, is no good style.
> However I had problems using apache-lists earlier and I don't know wether my
> mail made it to the list.
> So could anyone please respond, that the mail itself made it?
> (Solutions to my problem are welcome as well :D )
>
> Sorry and regard,
>   Steffen
>
>
> > -----Original Message-----
> > From: Steffen Heil [mailto:lists@steffen-heil.de]
> > Sent: Saturday, September 23, 2006 3:27 AM
> > To: 'Tomcat Users List'
> > Subject: Tomcat 5.5.17 has max 40 KB / sec
> >
> > Hi
> >
> > I use tomcat 5.5.17 and want to upload files. As this was
> > *very* slow in some cases, I wrote a benchmark servlet. Code is below.
> > I get the following statistics:
> >
> > 1. Running server on debian linux it accepts about 8.5 MB /
> > sec. (Could slowed down by VM overhead.) 2. Running server on
> > windows xp it accepts about 3.5 MB / sec when the client is
> > connected over an rinetd redirection.
> > 3. Running server on windows xp it accepts ONLY 40 KB / sec
> > when the clinet is connected directly.
> >
> > This problem applies to Internet Explorer 6.0 as client only.
> > It does not occur so with Firebird (but still only about 2.4
> > MB / sec).
> >
> > Using wireshark I found that the Internet Explorer is sending
> > only 8 KB
> > (exactly) followed by an tcp PSH, which is not answered by
> > the windows xp machine running tomcat for 0.2 sec. That gives
> > me exactly the 40 KB/sec.
> >
> > I would say, my xp tcp stack is damaged, but it works with
> > the same server, when redirected through an external rinetd.
> >
> > What can I do ?
> > Where can I start debugging ?
> > Anyone having similar problems ?
> >
> > If possible, please also reply to me directly (CC).
> >
> > Regards,
> >    Steffen
> >
> >
> >
> > -->8----------------------------------------------------------
> > ----------
> > -->---
> >
> > package mypackage;
> >
> > import java.io.InputStream;
> >
> > import javax.servlet.ServletException;
> > import javax.servlet.http.HttpServlet;
> > import javax.servlet.http.HttpServletRequest;
> > import javax.servlet.http.HttpServletResponse;
> >
> >
> > public class UpstreamBenchmark extends HttpServlet implements
> > Runnable {
> >
> >       private long start = -1;
> >
> >       private int total;
> >
> >       private Thread thread;
> >
> >       private final byte[] buffer = new byte[ 4096 ];
> >
> >
> >       public void run()
> >       {
> >               while ( !Thread.interrupted() ) {
> >                       if ( start != -1 ) {
> >                               long time =
> > System.currentTimeMillis() - start + 1;
> >                               double speed = ( total / 1.024 ) / time;
> >                               System.out.println( "speed: " +
> > speed + "
> > kb/sec" );
> >                       }
> >                       try {
> >                               Thread.sleep( 500 );
> >                       } catch ( Throwable t ) {
> >                               t.printStackTrace();
> >                       }
> >               }
> >       }
> >
> >
> >       @Override
> >       public void destroy()
> >       {
> >               thread.interrupt();
> >               super.destroy();
> >       }
> >
> >
> >       @Override
> >       public void init()
> >               throws ServletException
> >       {
> >               super.init();
> >               thread = new Thread( this );
> >               thread.start();
> >       }
> >
> >
> >       @Override
> >       protected final void doPost( HttpServletRequest
> > request, HttpServletResponse response )
> >       {
> >               try {
> >                       total = 0;
> >                       start = System.currentTimeMillis();
> >                       InputStream is = request.getInputStream();
> >                       int read;
> >                       while ( ( read = is.read( buffer ) ) != -1 )
> >                               total += read;
> >                       is.close();
> >                       System.out.println( "read " + total + "
> > bytes." );
> >               } catch ( Throwable t ) {
> >                       t.printStackTrace();
> >               }
> >               start = -1;
> >       }
> >
> > }
> >
>
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message