Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 27 Nov 2002 22:39:05 +0100
From: thomas <tom@huno.net>
Reply-To: thomas <cygwin@cygwin.com>
X-Priority: 3 (Normal)
Message-ID: <14936170000.20021127223905@huno.net>
To: cygwin@cygwin.com
Subject: Re: pipe performance problem
In-Reply-To: <10824453046.20021123003030@huno.net>
References: <20021122210856.GA10679@redhat.com>
 <777770015.20021122040845@huno.net> <007301c291ff$eb9ce050$78d96f83@pomello>
 <21545718.20021122114035@huno.net> <12415481703.20021122220059@huno.net>
 <20021122210856.GA10679@redhat.com>
 <5.1.0.14.2.20021122143402.00fdc148@pop3.cris.com>
 <10824453046.20021123003030@huno.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Hi List,

I'm back with more information, I've narrowed down the problem further
with another strace session. I've run:

cat test.iso | strace -o dd1.log nice --1 dd of=/dev/null
cat test.iso | strace -o dd0.log nice --0 dd of=/dev/null

nice --1 needs much longer, like already shown in another thread here.
But the strace logs seem to be absolutely the same, in fact --1 is faster
like it should be. You can clearly see that it needs a few microseconds
less than --0 for each operation, but then i found this in dd1.log:

   24   40524 [main] dd 2384 writev: 512 = write (1, 0x240FD3C, 1), errno 0
   25   40549 [main] dd 2384 readv: readv (0, 0x240FD9C, 1) blocking, sigcatchers 4
10588   51137 [main] dd 2384 peek_pipe: /dev/piper, ready for read
   34   51171 [main] dd 2384 fhandler_base::ready_for_read: read_ready 1, avail 1
   29   51200 [main] dd 2384 fhandler_base::read: returning 512 chars, binary mode
...
10147   78483 [main] dd 2384 peek_pipe: /dev/piper, ready for read
...
10163  105142 [main] dd 2384 peek_pipe: /dev/piper, ready for read


10 ms delay, and there's many of them. Exactly every 612 lines or every
34816 bytes (34kb). Which is about 210 seconds delay on a 700MB file.

It doesn't happen with --0 at all. So i looked what peek_pipe in
select.cc does but i didn't find anything suspicious (or is readv
responsible here?).

Now before i continue to dig through more code i'd greatly appreciate if
someone can confirm that this is not expected behaviour.

thomas


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

