X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :reply-to; q=dns; s=default; b=mkQfinIamqfYmxmdc+YO8vwnmFXKjyZ+f PUmGZJ3jjDqw9ujSQH9pJsLsSqwrEnvTNhoqckGW2vvYEmdnZxIbLETvzEvQ+7GI /O1h6RHe1kPixh/zfqOr8ryPQNO9wRHQs32FI1RlcnM2tPH7qrbfUWHvTjQUYbMh hc6N0A/SgU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :reply-to; s=default; bh=UsP5FwP2Agj1PPgkXT0tjPPEkyY=; b=XZaWOme DYTtoQVbG5QjdoW0gmniVgHBwH36Key1n5k4zJpKZXrv+/TtAATl0WveiY7BSHnZ p5OiINBKmyU5Wsmy5TjnNw1gOcwDLaHWSAi0zUJKBQjgrnMAmoB+5BBuIT5GeuE8 7jFRVgjVuzWBZVhcfZsZoffSgVD5faYDfVWs= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: qmta09.emeryville.ca.mail.comcast.net Message-ID: <53BD791F.6040807@acm.org> Date: Wed, 09 Jul 2014 10:17:19 -0700 From: David Rothenberger User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Severe performance degradation of writev References: <20140707101049 DOT GI1803 AT calimero DOT vinschen DOT de> <20140707134137 DOT GK1803 AT calimero DOT vinschen DOT de> <53BD7161 DOT 5030209 AT acm DOT org> <20140709170321 DOT GA9946 AT calimero DOT vinschen DOT de> In-Reply-To: <20140709170321.GA9946@calimero.vinschen.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Corinna Vinschen wrote: > On Jul 9 09:44, David Rothenberger wrote: >> Corinna Vinschen wrote: >>> On Jul 7 12:10, Corinna Vinschen wrote: >>>> On Jul 7 07:28, jojelino wrote: >>>>> 2008-07-27 Corinna Vinschen >>>>> >>>>> * fhandler_socket.cc (fhandler_socket::send_internal): >>>>> Send never more then 64K bytes at once. For blocking >>>>> sockets, loop until entire data has been sent or an error >>>>> occurs. (fhandler_socket::sendto): Drop code which sends on >>>>> 64K bytes. (fhandler_socket::sendmsg): Ditto. >>>>> >>>>> This commit added workaround for KB823764. but it has >>>>> brought another performance issue when writev sends <64k of >>>>> data. >>>> >>>> That's why the code contains that FIXME comment. If you have >>>> a good idea for simple code to split a message into the >>>> least number of pieces to minimize the number of WsaSendTo >>>> calls... >>> >>> I took a stab at the code and I think the new version improves >>> writing multiple small buffers a lot. In my testing it still >>> works in other scenarios, too, but I would be very grateful if >>> somebody could have a critical look into my code changes as >>> posted in >>> https://cygwin.com/ml/cygwin-cvs/2014-q3/msg00003.html >>> >>> I uploaded a new developer snapshot to >>> http://cygwin.com/snapshots/ Please give it a thorough try. >> >> FWIW, this snapshot fixed a recent performance degradation for me >> when doing ssh/rsync transfers within my local network at work. >> These transfers had run at about 25 MB/s but recently degraded to >> about 500 kB/s. The snapshot restored the original performance. > > Cool. Is the result still intact? It's kind of simple to have > lots of performance if the code just doesn't send everything... :} Details, details. :) Yeah, I just tried a transfer and verified the checksum of the transferred file. It worked fine. -- David Rothenberger ---- daveroth AT acm DOT org Hempstone's Question: If you have to travel on the Titanic, why not go first class? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple