delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/27/16:38:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 27 Nov 2002 22:39:05 +0100
From: thomas <tom AT huno DOT net>
Reply-To: thomas <cygwin AT cygwin DOT com>
X-Priority: 3 (Normal)
Message-ID: <14936170000.20021127223905@huno.net>
To: cygwin AT cygwin DOT com
Subject: Re: pipe performance problem
In-Reply-To: <10824453046.20021123003030@huno.net>
References: <20021122210856 DOT GA10679 AT redhat DOT com>
<777770015 DOT 20021122040845 AT huno DOT net> <007301c291ff$eb9ce050$78d96f83 AT pomello>
<21545718 DOT 20021122114035 AT huno DOT net> <12415481703 DOT 20021122220059 AT huno DOT net>
<20021122210856 DOT GA10679 AT redhat DOT com>
<5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20021122143402 DOT 00fdc148 AT pop3 DOT cris DOT com>
<10824453046 DOT 20021123003030 AT huno DOT net>
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019