-----BEGIN PGP SIGNED MESSAGE-----

Many people have been talked about bad performance when using Jason
code.But, you should tell me some information like available memory and
availabe disk space  When you try to use client and server on the same
machine and the problem still happens, we are able to say that bottleneck
isnt the reason of the slow speed.
Regards,

José Euclides Júnior
__________________________________
E-mail: [EMAIL PROTECTED]
            [EMAIL PROTECTED] 
            [EMAIL PROTECTED]
http://euclides.8m.com


- -----Mensagem original-----
De:             Randy Layman [SMTP:[EMAIL PROTECTED]]
Enviada em:             Sexta-feira, 5 de Janeiro de 2001 10:32
Para:           '[EMAIL PROTECTED]'
Assunto:                RE: Slow upload speeds


        I've never dealt with this in Tomcat, but from other network apps:
        How are you using the ServletInputStream - are you calling int
read(), which reads the stream a byte at a time, or are you calling int
read(byte[])?  My experience is that you want to use the second option,
preferably with the byte[] size equal to 1500 (Reason for 1500 - its the MTU
(Maximum Transmission Unit) of Ethernet, probably the network the server is
attached to).
        Reason this speeds things up:  When calling int read(), to get 1500
bytes of input, Java has to make 1500 system calls.  If you use int
read(byte[]) then it can get 1500 bytes in one system call.  The reason you
want this byte[] to be the same length as the MTU - you can read each packet
as it arrives and be processing it as the next packet finds its way across
the network instead of waiting on the next one.

        One caveat: I have not looked at the source code for this class, but
from the JavaDoc it appears that all the methods we are talking about are
inherited from InputStream, so these techniques should work.

        Randy

- -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 04, 2001 6:13 PM
To: [EMAIL PROTECTED]
Subject: Slow upload speeds


Hi everyone.

I am using Tomcat-3.2.1 on W2K, Solaris with or without apache. Since I 
need to provide users with functionality to upload fairly big files (> 10 
MB), speed is essential.

My uploader is based on Jason Hunter code. Maximum upload speed I could 
achieve is between 40 and 60 Kbytes/s (even when client and server are on 
the same machine). Bottleneck (quiet predictable) seems to be in 
ServletInputStream misc. "read()" methods. Speed does not seem to be 
dependant on a platform or web server.

Anyone was able to achieve better speeds (at least around 100 kBytes/s)? 
Any ideas ?

Thanks

Andrus


- ---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

- ---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.1

iQCVAwUBOlX0r90YhuJ3BUxtAQFLYAP9EPUYLOs+Sf6VhEoQt0LNvKG+sktEp5if
oHR5kFLRrw58dd7utPfw8Bs96CZUuOtU/G4PfdKzvz3CyLfz7HsmOokIe4NnIMZ3
whhPy3Mo4ZJffczcSLCbTioxNmObxy7FavLvJGbXnVqSwJrbMwQRYQJLP1P23i+R
2UMnZ0P6r6s=
=KmIk
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to