Re: file upload speed.
Sorry, Tomcat users - just a correction to technical wording: In previous, meant: "asymmetric " configuration of total bi-directional bandwidth Maurice Maurice Yarrow wrote: Hello Tomcat users I am using TC 5.0.28 on a machine with an AMD Athlon 3000+ (not particularly strong, by current standards) I use an applet for uploading, which uses (pretty much) something like httpsOutput = httpsUrlCon.getOutputStream(); OutputStream bos = new BufferedOutputStream( httpsOutput,BUFFER_SIZE ); while(true) { i = bis.read(byteArray,0,BUFFER_SIZE); if( i == -1 ) break; bos.write(byteArray,0,i); bos.flush(); totalBytes += i; if( totalBytes >= fileLength ) break; } httpsOutput = httpsUrlCon.getOutputStream(); OutputStream bos = new BufferedOutputStream( httpsOutput,BUFFER_SIZE ); (fairly standard: BufferedOutputStream, etc. on client side, and pretty much the reverse equivalent on the server side - InputStream bis = new BufferedInputStream( request.getInputStream(), BUFFER_SIZE ); Point is: On my local area network, the client can send to the server at about 1 Megabyte a second. But, for example, from a remote location, residential clients are bandwidth-upload limited - even with Cable modem - to about 50,000 bytes a second due to the asynchronous configuration which broadband vendors impose on their hardware. That is, 50,000 bytes up / but 600,000 bytes download - most people download all the time, after all. (I guess as Point-to-point becomes more popular, this will change.) I don't know if any of this helps, but I thought I would mention all this to see if it gives any perspective on the situation. Maurice Yarrow Leon Rosenberg wrote: So you effectively measure the ability of tomcat to throw away your bytes and send you an error page. That doesn't make really sense, does it? Leon On 6/22/06, CMSuser <[EMAIL PROTECTED]> wrote: Leon Rosenberg-3 wrote: > > sorry, maybe i'm misunderstand a whole bunch of things here, but what > exactly is your "appropriate url"? > > I mean, you can test download speed by accessing your own servlet or > even static content, ok, but you can't upload anything without having > a receiver for it. > > leon > I'm very new to this "web" stuff. What I did to get started was installed the Tomcat 5.5.15 and copied one of the sub folders in webapps folder and named it "abc". in the web.xml in the conf folder , set the readonly to false. after that I just did a "put" from the client. eg. curl -T "file.txt" http://191.168.1.1:8080/abc/ . (This was what gave low throughput). or with my java client, it's : PutMethod pm = new PutMethod(url + "filename"); . then I use HttpClient to executed the above putmethod. (this give's good throughput ). My guess is that the curl client itself was the bottleneck previously. However the same curl client gave better upload speeds with other webservers(Apache), so it's confusing. regards, Aman. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4987102 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
Hello Tomcat users I am using TC 5.0.28 on a machine with an AMD Athlon 3000+ (not particularly strong, by current standards) I use an applet for uploading, which uses (pretty much) something like httpsOutput = httpsUrlCon.getOutputStream(); OutputStream bos = new BufferedOutputStream( httpsOutput,BUFFER_SIZE ); while(true) { i = bis.read(byteArray,0,BUFFER_SIZE); if( i == -1 ) break; bos.write(byteArray,0,i); bos.flush(); totalBytes += i; if( totalBytes >= fileLength ) break; } httpsOutput = httpsUrlCon.getOutputStream(); OutputStream bos = new BufferedOutputStream( httpsOutput,BUFFER_SIZE ); (fairly standard: BufferedOutputStream, etc. on client side, and pretty much the reverse equivalent on the server side - InputStream bis = new BufferedInputStream( request.getInputStream(), BUFFER_SIZE ); Point is: On my local area network, the client can send to the server at about 1 Megabyte a second. But, for example, from a remote location, residential clients are bandwidth-upload limited - even with Cable modem - to about 50,000 bytes a second due to the asynchronous configuration which broadband vendors impose on their hardware. That is, 50,000 bytes up / but 600,000 bytes download - most people download all the time, after all. (I guess as Point-to-point becomes more popular, this will change.) I don't know if any of this helps, but I thought I would mention all this to see if it gives any perspective on the situation. Maurice Yarrow Leon Rosenberg wrote: So you effectively measure the ability of tomcat to throw away your bytes and send you an error page. That doesn't make really sense, does it? Leon On 6/22/06, CMSuser <[EMAIL PROTECTED]> wrote: Leon Rosenberg-3 wrote: > > sorry, maybe i'm misunderstand a whole bunch of things here, but what > exactly is your "appropriate url"? > > I mean, you can test download speed by accessing your own servlet or > even static content, ok, but you can't upload anything without having > a receiver for it. > > leon > I'm very new to this "web" stuff. What I did to get started was installed the Tomcat 5.5.15 and copied one of the sub folders in webapps folder and named it "abc". in the web.xml in the conf folder , set the readonly to false. after that I just did a "put" from the client. eg. curl -T "file.txt" http://191.168.1.1:8080/abc/ . (This was what gave low throughput). or with my java client, it's : PutMethod pm = new PutMethod(url + "filename"); . then I use HttpClient to executed the above putmethod. (this give's good throughput ). My guess is that the curl client itself was the bottleneck previously. However the same curl client gave better upload speeds with other webservers(Apache), so it's confusing. regards, Aman. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4987102 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
Leon Rosenberg-3 wrote: > > oh... then its magic... > > ok i've tried it: > > [EMAIL PROTECTED]:~$ curl -T xxx.txt http://localhost:8000/xxx/ > Apache Tomcat/5.5.16 - Error > report<!--H1 > {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} > H2 > {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} > H3 > {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} > BODY > {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} > B > {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} > P > {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A > {color : black;}A.name {color : black;}HR {color : > #525D76;}--> HTTP Status 403 - size="1" noshade="noshade">type Status > reportmessage description Access > to the specified resource () has been forbidden. noshade="noshade">Apache Tomcat/5.5.16 > > and thats exactly what I expected. So, you have something in tomcat (a > servlet which can handle fileupload) which proceeds the file or you > get the above error message. Or, third option, you are performing some > magic I don't know about. > > regards > Leon > Did you set the readonly to false in web.xml in conf folder ? -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4989915 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
oh... then its magic... ok i've tried it: [EMAIL PROTECTED]:~$ curl -T xxx.txt http://localhost:8000/xxx/ Apache Tomcat/5.5.16 - Error report<!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--> HTTP Status 403 - type Status reportmessage description Access to the specified resource () has been forbidden.Apache Tomcat/5.5.16 and thats exactly what I expected. So, you have something in tomcat (a servlet which can handle fileupload) which proceeds the file or you get the above error message. Or, third option, you are performing some magic I don't know about. regards Leon On 6/22/06, CMSuser <[EMAIL PROTECTED]> wrote: Leon Rosenberg-3 wrote: > > So you effectively measure the ability of tomcat to throw away your > bytes and send you an error page. That doesn't make really sense, does > it? > > Leon > Of course not. The uploaded file is visible on the webpage in the new directory where it's supposed to be. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4987974 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
Leon Rosenberg-3 wrote: > > So you effectively measure the ability of tomcat to throw away your > bytes and send you an error page. That doesn't make really sense, does > it? > > Leon > Of course not. The uploaded file is visible on the webpage in the new directory where it's supposed to be. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4987974 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
So you effectively measure the ability of tomcat to throw away your bytes and send you an error page. That doesn't make really sense, does it? Leon On 6/22/06, CMSuser <[EMAIL PROTECTED]> wrote: Leon Rosenberg-3 wrote: > > sorry, maybe i'm misunderstand a whole bunch of things here, but what > exactly is your "appropriate url"? > > I mean, you can test download speed by accessing your own servlet or > even static content, ok, but you can't upload anything without having > a receiver for it. > > leon > I'm very new to this "web" stuff. What I did to get started was installed the Tomcat 5.5.15 and copied one of the sub folders in webapps folder and named it "abc". in the web.xml in the conf folder , set the readonly to false. after that I just did a "put" from the client. eg. curl -T "file.txt" http://191.168.1.1:8080/abc/ . (This was what gave low throughput). or with my java client, it's : PutMethod pm = new PutMethod(url + "filename"); . then I use HttpClient to executed the above putmethod. (this give's good throughput ). My guess is that the curl client itself was the bottleneck previously. However the same curl client gave better upload speeds with other webservers(Apache), so it's confusing. regards, Aman. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4987102 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
Leon Rosenberg-3 wrote: > > sorry, maybe i'm misunderstand a whole bunch of things here, but what > exactly is your "appropriate url"? > > I mean, you can test download speed by accessing your own servlet or > even static content, ok, but you can't upload anything without having > a receiver for it. > > leon > I'm very new to this "web" stuff. What I did to get started was installed the Tomcat 5.5.15 and copied one of the sub folders in webapps folder and named it "abc". in the web.xml in the conf folder , set the readonly to false. after that I just did a "put" from the client. eg. curl -T "file.txt" http://191.168.1.1:8080/abc/ . (This was what gave low throughput). or with my java client, it's : PutMethod pm = new PutMethod(url + "filename"); . then I use HttpClient to executed the above putmethod. (this give's good throughput ). My guess is that the curl client itself was the bottleneck previously. However the same curl client gave better upload speeds with other webservers(Apache), so it's confusing. regards, Aman. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4987102 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
I Agree You should be debugging the code in doPut method..more specifically.. protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, //be mindful that if you get a java.io.IOException you cannot see the file.. OR if your client sees a HTTP 501 then you have a content error (maybe its expecting text/html when the actual file is text or binary or whatever) Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Leon Rosenberg" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Wednesday, June 21, 2006 2:16 PM Subject: Re: file upload speed. > sorry, maybe i'm misunderstand a whole bunch of things here, but what > exactly is your "appropriate url"? > > I mean, you can test download speed by accessing your own servlet or > even static content, ok, but you can't upload anything without having > a receiver for it. > > leon > > On 6/21/06, CMSuser <[EMAIL PROTECTED]> wrote: >> >> >> Leon Rosenberg-3 wrote: >> > >> > I ment rather how do you handle the upload in tomcat? >> > >> I have not written any custom "upload handlers" on the web server side. I >> just give the appropriate url to the "put client" and it's done. >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/file-upload-speed.-t1816944.html#a4974353 >> Sent from the Tomcat - User forum at Nabble.com. >> >> >> - >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: file upload speed.
sorry, maybe i'm misunderstand a whole bunch of things here, but what exactly is your "appropriate url"? I mean, you can test download speed by accessing your own servlet or even static content, ok, but you can't upload anything without having a receiver for it. leon On 6/21/06, CMSuser <[EMAIL PROTECTED]> wrote: Leon Rosenberg-3 wrote: > > I ment rather how do you handle the upload in tomcat? > I have not written any custom "upload handlers" on the web server side. I just give the appropriate url to the "put client" and it's done. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4974353 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
Leon Rosenberg-3 wrote: > > I ment rather how do you handle the upload in tomcat? > I have not written any custom "upload handlers" on the web server side. I just give the appropriate url to the "put client" and it's done. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4974353 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
Leon Rosenberg-3 wrote: > > I ment rather how do you handle the upload in tomcat? > I have written any custom "upload handlers". I just give the appropriate url to the "put client" and it's done. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4974321 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
I ment rather how do you handle the upload in tomcat? On 6/21/06, CMSuser <[EMAIL PROTECTED]> wrote: FYI- I've been using the curl command line client for the uploads and downloads. When I tried the commons HttpClient from a java program, the upload/download throughputs matched !! (at over 85% ). regards, Aman. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4972313 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
FYI- I've been using the curl command line client for the uploads and downloads. When I tried the commons HttpClient from a java program, the upload/download throughputs matched !! (at over 85% ). regards, Aman. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4972313 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
The question is - how do you upload? leon On 6/21/06, CMSuser <[EMAIL PROTECTED]> wrote: Antonio, I've done other experiments (without tomcat) where the upload speed is better. There are no throughput constraints in the network/server configuration. Unless it's internally imposed by tomcat webserver. Are there any such constraints in tomcat ? is this throughput difference deliberate ? could the configuration be tweaked to produce better upload throughput ? I've tried playing with the input/output buffer sizes in web.xml but no significant benifit was seen. Thanks, Aman -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4968168 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
Antonio, I've done other experiments (without tomcat) where the upload speed is better. There are no throughput constraints in the network/server configuration. Unless it's internally imposed by tomcat webserver. Are there any such constraints in tomcat ? is this throughput difference deliberate ? could the configuration be tweaked to produce better upload throughput ? I've tried playing with the input/output buffer sizes in web.xml but no significant benifit was seen. Thanks, Aman -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4968168 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
CMSuser ha scritto: Hi, I'm using Tomcat 5.5.15 to transfer files. I get a throughput of roughly 20% on 100Mbps LAN whereas the download throughput is 95% approx. How can I make the uploads faster ? Just a thought, though you are in a LAN, is the server in an ADSL? If yes, you know what the "A" in ADSL means right? ;-) Ciao Antonio - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
file upload speed.
Hi, I'm using Tomcat 5.5.15 to transfer files. I get a throughput of roughly 20% on 100Mbps LAN whereas the download throughput is 95% approx. How can I make the uploads faster ? Thanks, Aman. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4953136 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]