Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 3749 invoked from network); 12 Mar 2006 14:27:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Mar 2006 14:27:52 -0000 Received: (qmail 80103 invoked by uid 500); 12 Mar 2006 14:27:48 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 79565 invoked by uid 500); 12 Mar 2006 14:27:46 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 79553 invoked by uid 99); 12 Mar 2006 14:27:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Mar 2006 06:27:46 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [212.187.158.31] (HELO smtp1.34sp.com) (212.187.158.31) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Mar 2006 06:27:45 -0800 Received: from localhost (localhost.34sp.com [127.0.0.1]) by smtp1.34sp.com (Postfix) with ESMTP id AECEF2E224 for ; Sun, 12 Mar 2006 14:27:23 +0000 (GMT) Received: from smtp1.34sp.com ([127.0.0.1]) by localhost (smtp.34sp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 63739-02 for ; Sun, 12 Mar 2006 14:27:23 +0000 (GMT) Received: from [192.168.0.3] (unknown [81.168.113.121]) by smtp1.34sp.com (Postfix) with ESMTP id 414BE2E1A2 for ; Sun, 12 Mar 2006 14:27:23 +0000 (GMT) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <4411CF05.1010404@microserf.org.uk> References: <4411CF05.1010404@microserf.org.uk> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <72D91B11-ABF2-456F-A811-D59A5654DD98@microserf.org.uk> Content-Transfer-Encoding: 7bit From: C Rose Subject: Re: [FileUpload] Large file uploads are slow Date: Sun, 12 Mar 2006 14:27:23 +0000 To: "Jakarta Commons Users List" X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by Clam Anti Virus X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Martin, Sandy Many thanks for your replies. Sandy: Thanks for doing the profiling. Out of interest, what was the spec of the machine you did the profiling on? I can live with the performance I'm getting and I'm glad to learn that the performance isn't down to a mistake on my part. I guess HTTP was never meant for transferring large files anyway. Best regards C On 10 Mar 2006, at 19:09, C Rose wrote: > Hi all > > I'm using commons-fileupload-1.1.jar to handle file uploads to a > servlet. I expect typical file uploads to be around 40MB is size. > However, the time taken to upload such files seems quite long. > > I have performed some profiling and have found that the call to > ServletFileUpload.parseRequest() takes about 20 seconds for a 45MB > file and accounts for over 80% of the time taken to upload the > file. This is measured on a 600MHz P3 machine (yeah, I know...) > with 512MB RAM running Linux, Sun's JVM and Tomcat. The machine is > acting as both the client and the server and is under little > additional load. > > I am using a DiskFileItemFactory, and the only thing I do to it is > mandate that the ServletFileUpload object created by the factory > does not have a limit on the size of the file being uploaded. The > transfer is going via HTTPS. > > Does this upload time seem reasonable? > > Is there anything I can do to speed things up? > > If parsing the request has to take so long, is it possible to > perform this task after having returned a response to the client > (e.g. start a new thread in which to call parseRequest() so that it > appears as though I've serviced the request fully)---or am I right > in thinking that an HttpServletRequest object will be 'invalid' > after an HttpServletResponse is sent to the client? > > Thanks in advance > > C > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org