views:

189

answers:

2

I am having an issue when uploading files to tomcat. It seems that tomcat (or something else?) will not handle the upload as fast as I can send it.

When uploading multiple files concurrently I can max out my local connection upload speed (2.1MB/s). However, when uploading only one file at a time, no matter how small or large the file, the upload will max out around 400KB/s.

I have tried setting the appReadBufSize higher but it makes no difference. Is there something else that would be limiting the upload speed per request?

Proxy Server:

  • CentOS 4
  • Apache 2
  • SSL

Tomcat Server:

  • CentOS 4
  • Tomcat 5.5.25 (Tomcat Native Library Is Installed)
  • Java 6

Thanks!

Matt

+1  A: 

We have built our own file upload servlet and it will bottleneck on disk write performance, not on the network. It predated http://commons.apache.org/fileupload/ which is what we would use if we had to do it again.

What file upload implementation are you using? I've seen some sample file upload source code that reads the stream one byte at a time. Also try eliminating SSL and your proxy server and see if they are throttling the speed.

james
It shouldn't be the disk write speed because when upload multiple files concurrently I can max out my connection. I am using com.oreilly.servlet.MultipartRequest to handle the upload. However, I am starting to suspect it may not be related to tomcat because using scp to copy files also seems to max out at 410KB/s
maclema
A: 

UPDATE: It seem's that there must of been an issue with the OS on the server. After upgrading the OS the 400KB/s limit has gone away. Now there are no issues uploading files as fast as we can send them.

maclema
this goes in an edit, not an answer
Thorbjørn Ravn Andersen