This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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 ?
Bikash Paul
Ranch Hand
Joined: Dec 04, 2001
Posts: 342
posted
0
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
Juanjo Bazan
Ranch Hand
Joined: Feb 04, 2002
Posts: 231
posted
0
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.
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
1
posted
0
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
does anyone know if using the -server option in the 1.4 JVM would help in this instance? Is I/O optimized for -server, rather than -client (which is the default).
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.