This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pipe performance problem


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]