If speed really is of paramount importance, consider directly opening sockets and transfering data directly between code running on Tomcat and your client application/applet/etc -- essentially taking Tomcat out of the loop for the actual file transfer.


We've seen significant performance increases by doing this (though our messages are short enough that the http/Tomcat overhead is significant). Think long and hard before doing this as you'll give up most of the benefits you get from Tomcat in the first place. It's an option, though.

justin


At 05:06 AM 8/19/2003, you wrote:


OK, take a step back and think about this.

ATA-66 disk bus: 533 Mbps
ATA-100 disk bus: 800 Mbps
Ultra-160 SCSI disk bus: 1300 Mbps

Now, you're saying that you have a network connection of 2 Mbps (I think you mean T1 or E1 as ISDN is not > 128 Kbps unless you have a bunch of lines bonded together but that's not important). There's no way to change Tomcat to make 2 Mbps be equal to 533 Mbps or even 20 Mbps.

A basic 200 MHz Pentium class server with even rudimentary disks can easily saturate a 10 Mbps LAN connection. Unless your server was built prior to 1997 or so, my guess is your network connection can never match your server's internal bus "speed".

I think your solution is to stop writing blocks to disk as soon as you receive them, and instead assemble your file in a buffer, then write it out to disk all at once. Or switch to a dedicated GIGAbit line, which with overhead would get you around ATA-100 speed.

John

Bikash Paul wrote:

Hi gang,
I have developed one file transfer(means file
uploading) application for that I have used
swing,servlet and Tomcat4.1.24.Now my problem is the
speed. The speed of manual copy and paste of file on
hard disk of remote computer is faster than my
application.I want to increase the speed of file
transfer.Networking is done through 2MBPS dedicated
ISDN lease line.Any help will be highly appreciated.
I want some suggestion about below factors:
1.Iam sending file to server as block wise of 1024
bytes and my servlet also writes file in remote
destination folder as a block wise of 1024 bytes.If I
increase the block size then is it increase the speed
?
2. I have used DataOutputStream for writing on
outputstream and InputStream for reading,if I used
BufferWriter and BufferReader then is it increase the
speed ?
3.Is there any tuning of tomcat,so that it increase
the speed ?
4.Lastly I have closed all my Input and output stream
object and I have also closed all connection at the
end of file transfer method.
Or is there any other factor for increasing Speed ?
Thanks & Regards
Bikash

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


____________________________________
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php
____________________________________


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



Reply via email to