Hi all friends, Can any one plz guide me how i can increase the speed of tomcat server.I am using Tomcat4.0.1 .I am using tomcat server for uploading file on remote destination through servlet.Iam uploading big size of file (about 100MB or 150MB file) but the speed of writing file on destination is very slow.Iam writing file on destination through my servlet as a block of 1024 bytes.My computer's physical RAM is 512MB.Plz guide me how I can slove my problem. Regards Bikash
You're sure the speed slow-down is on the file writing, and not in the pipe between your uploading computer and server ?
Joined: Dec 04, 2001
Hi, Now by increasing the maximum heap size of JVM the speed of file writing increases upto some extent.Now during uploading Tomcat server uses 98% to 100% CPU,Is it the right way? My networking have done through 2MBPS dedicated lease line.I have tested my networking speed by manual copy and paste,it is ok.Plz guide me what is the best way to increase the speed of file writing on destination. Regards Bikash
Joined: Feb 04, 2002
If your are writing to file with a BufferedWriter, you may increase the size of the buffer.
The usual approach when performance is an issue is to front-end Tomcat with the Apache webserver. It's so common, that this forum is named "Apache/Tomcat". A file that big sounds like it's not really an HTTP-style transmission. Even if it's something like a really large SOAP request, you might check to see if there are other server solutions you might use instead (depending on network topology, firewalls and administrative policies). Just as an example, although I could have generated a bot to download OS updates from my supplier via HTTP or FTP, they also run an rsync server which allows me to maintain a mirror of the update site more optimally.
Customer surveys are for companies who didn't pay proper attention to begin with.
Author and all-around good cowpoke
Joined: Mar 22, 2000
Are you limited to writing 1024 byte blocks or can you use larger ones? Does your servlet do any creation of new objects for every block? You are reading and writing bytes, right? Character conversion with strings can be a major overhead. Bill