Re: Slow HTTP upload speed with IE and Tomcat on Solaris (works fine on Linux and Windows)

2003-10-17 Thread Jonathan Eric Miller
Can someone that has a Solaris box try this (see the file attachments on my
original message)? It works great on my Linux box. Could it be some kind of
buffering problem?

I noticed something else that is strange. Mozilla uploads/downloads faster
with SSL than without when using Tomcat 5 on Linux (4.4 MBs versus 3 MBs).
IE is substantially slower when using SSL. I noticed that Mozilla was using
AES-128. IE was using 128 bit too, but, I don't know how to check what the
specific cipher suite was that was being used. Also, IE seems substantially
faster at downloads than Mozilla. IE was 9.47 MBs where as Mozilla was only
3 MBs.

Jon

- Original Message - 
From: Jonathan Eric Miller [EMAIL PROTECTED]
To: Tomcat User List [EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 3:52 PM
Subject: Slow HTTP upload speed with IE and Tomcat on Solaris (works fine on
Linux and Windows)


 I'm having a strange problem with regard to HTTP upload speed when using
 Internet Explorer on Windows with Tomcat on Solaris. If I upload a 10 MB
 file over a 100 Mbs Ethernet connection, it takes 2 minutes 25 seconds if
I
 use IE (~80 Kbs). If I use Mozilla, it takes 3 seconds (~3 Mbs). If I try
 the same thing, but, run Tomcat on Linux instead, it takes 2 seconds when
 using IE. It takes 1 second if I run Tomcat on my local Windows computer.
 I'm using Solaris 8 with a patch cluster that I downloaded and installed
 within the last few weeks, Tomcat 5.0.12, J2SE 1.4.1, and the version of
 Internet Explorer that comes with Windows XP with all the Windows updates
 applied. The problem seems to occur with Tomcat 4.1.24 as well. I also
tried
 it on a different Windows 2000 computer to make sure nothing was wrong
with
 my XP box and the other computer had the same problem.

 Has anyone else had this problem? Is there anyone out there that has a
 Solaris box that wouldn't mind running the test application that I created
 to see if you have the same problem?

 I'm wondering if the problem might be with our network, but, I don't think
 that's the case because I have another application on a Solaris box that
 does HTTP uploads using a Perl application that doesn't have the
performance
 problem.

 Jon







 -
 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]



Slow HTTP upload speed with IE and Tomcat on Solaris (works fine on Linux and Windows)

2003-10-15 Thread Jonathan Eric Miller
I'm having a strange problem with regard to HTTP upload speed when using
Internet Explorer on Windows with Tomcat on Solaris. If I upload a 10 MB
file over a 100 Mbs Ethernet connection, it takes 2 minutes 25 seconds if I
use IE (~80 Kbs). If I use Mozilla, it takes 3 seconds (~3 Mbs). If I try
the same thing, but, run Tomcat on Linux instead, it takes 2 seconds when
using IE. It takes 1 second if I run Tomcat on my local Windows computer.
I'm using Solaris 8 with a patch cluster that I downloaded and installed
within the last few weeks, Tomcat 5.0.12, J2SE 1.4.1, and the version of
Internet Explorer that comes with Windows XP with all the Windows updates
applied. The problem seems to occur with Tomcat 4.1.24 as well. I also tried
it on a different Windows 2000 computer to make sure nothing was wrong with
my XP box and the other computer had the same problem.

Has anyone else had this problem? Is there anyone out there that has a
Solaris box that wouldn't mind running the test application that I created
to see if you have the same problem?

I'm wondering if the problem might be with our network, but, I don't think
that's the case because I have another application on a Solaris box that
does HTTP uploads using a Perl application that doesn't have the performance
problem.

Jon
import java.text.*;
import java.util.*;

public class TimeSpan {
	public TimeSpan(Date startDate, Date endDate) {
		long l = (endDate.getTime() - startDate.getTime()) / 1000;
		hours = l / 60 / 60;
		minutes = l / 60 - (hours * 60);
		seconds = l - (hours * 60 * 60) - (minutes * 60);
	}
	
	public String toString() {
		Object[] o = {new Long(hours), new Long(minutes), new Long(seconds)};
		return new MessageFormat({0,number,00}:{1,number,00}:{2,number,00}).format(o);
	}
	
	public long hours;
	public long minutes;
	public long seconds;
}
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class FileUpload3 extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
		try {
			resp.setContentType(text/html);
			PrintWriter pw = resp.getWriter();
			pw.println(!DOCTYPE html PUBLIC \-//W3C//DTD XHTML 1.0 Transitional//EN\ \http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\;?xml version=\1.0\ encoding=\ISO-8859-1\?);
			pw.println(htmlheadtitleFile Upload/title/headbody);
			pw.println(form action=\/servlet/FileUpload3\ enctype=\multipart/form-data\ method=\post\);
			pw.println(pbFile:/b input name=\file\ type=\file\ //p);
			pw.println(pinput name=\submit\ type=\submit\ value=\Submit\ //p);
			pw.println(/form);
			pw.println(/body/html);
			pw.close();
		}
		catch(Exception e) {
			e.printStackTrace();
		}
	}

	public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
		try {
			Date d = new Date();
			ServletInputStream sis = req.getInputStream();
			while(sis.read() != -1);
			sis.close();
			Date d2 = new Date();
			TimeSpan ts = new TimeSpan(d, d2);
			resp.setContentType(text/html);
			PrintWriter pw = resp.getWriter();
			pw.println(!DOCTYPE html PUBLIC \-//W3C//DTD XHTML 1.0 Transitional//EN\ \http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\;?xml version=\1.0\ encoding=\ISO-8859-1\?);
			pw.println(htmlheadtitleFile Upload/title/headbody);
			pw.println(p);
			pw.println(p + ts + /p);
			pw.println(/p);
			pw.println(/body/html);
			pw.close();
		}
		catch(Exception e) {
			e.printStackTrace();
		}
	}
}

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