Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 10994 invoked from network); 9 Nov 2006 11:11:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Nov 2006 11:11:46 -0000 Received: (qmail 80378 invoked by uid 500); 9 Nov 2006 11:11:57 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 80245 invoked by uid 500); 9 Nov 2006 11:11:55 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 80234 invoked by uid 99); 9 Nov 2006 11:11:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Nov 2006 03:11:55 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [195.186.19.66] (HELO mail22.bluewin.ch) (195.186.19.66) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Nov 2006 03:11:41 -0800 Received: from [192.168.0.3] (83.77.190.236) by mail22.bluewin.ch (Bluewin 7.3.118) id 4513CD4900AF7DA5 for httpclient-user@jakarta.apache.org; Thu, 9 Nov 2006 11:11:20 +0000 Subject: Re: have question about buffer size From: Oleg Kalnichevski To: HttpClient User Discussion In-Reply-To: <200611082227.18063.paranoid_@ukr.net> References: <20061108161758.34492.qmail@web32815.mail.mud.yahoo.com> <200611082227.18063.paranoid_@ukr.net> Content-Type: text/plain Date: Thu, 09 Nov 2006 12:11:19 +0100 Message-Id: <1163070679.4930.13.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Wed, 2006-11-08 at 22:27 +0200, Paranoid wrote: > > Why should this be a problem? Over the network, > > maximum segments you get are (after removing > > framing/chunking overhead) probably that 1440 bytes in > > size, and httpclient is then returning you as much > > data as it can efficiently give at any given time. > > You just keep on reading all the data, piece by piece. > > That's how streams work; they present an abstraction > > over what may be (and often is) packet-based transport > > channel. > > some peaces are about 55 KB size, and first read is 75 KB. so why are all > other about 1.4 KB? There can be many factors affecting the content stream fragmentation and the way it is being transferred across the wire. I suggest that you install a traffic analyzer such as Ethereal and look at the packets sent by the target server. If you are absolutely convinced the content gets fragmented somewhere inside HttpClient, I'll dig into the code and try to pinpoint the problem. Oleg > and after - saving inputStream into FileOutputStream load CPU for great > number... this time it is really a problem... tested with different buffer > sized, and with greater buffer size have lower CPU load. > P.S.: speed of downloading about 5 MB/s... --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-user-help@jakarta.apache.org