www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/06/06/10:09:41

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
Message-Id: <5.1.0.14.0.20020606100221.0375bec8@pop.ma.ultranet.com>
X-Sender: lhall AT pop DOT ma DOT ultranet DOT com
Date: Thu, 06 Jun 2002 10:06:21 -0400
To: Randall R Schulz <rrschulz AT cris DOT com>, Russ Jorgensen <jorg928a AT yahoo DOT com>,
cygwin AT cygwin DOT com
From: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
Subject: Re: Big Performance issue with CYGWIN 1.3.10 on Win2k - Urgent
help reqd!
In-Reply-To: <5.1.0.14.2.20020605210753.02823c60@pop3.cris.com>
References: <20020606033103 DOT 40460 DOT qmail AT web21508 DOT mail DOT yahoo DOT com>
<1022769047 DOT 11820 DOT ezmlm AT cygwin DOT com>
Mime-Version: 1.0

And I get:

% time doit 1

real    0m1.124s
user    0m0.861s
sys     0m0.250s

% time doit 2

real    0m3.032s
user    0m2.182s
sys     0m0.861s

This is on my single iprocessor PIII-600 laptop running W2K.  I have to 
agree with Randall's conclusion on this issue.

Larry Hall                              lhall AT rfk DOT com
RFK Partners, Inc.                      http://www.rfk.com
838 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



At 12:11 AM 6/6/2002, Randall R Schulz wrote:
>Russ,
>
>Something is amiss with your system or your installation.
>
>Here's what I get running your scripts:
>
>% time doit 1
>
>real    0m0.972s
>user    0m0.622s
>sys     0m0.388s
>
>% time doit 2
>
>real    0m1.925s
>user    0m1.513s
>sys     0m0.828s
>
>% set |egrep VER
>BASH_VERSINFO=([0]="2" [1]="05a" [2]="0" [3]="3" [4]="release" [5]="i686-pc-cygwin")
>BASH_VERSION='2.05a.0(3)-release'
>
>% uname -a
>CYGWIN_NT-5.0 CLEMENS 1.3.10(0.51/3/2) 2002-02-25 11:14 i686 unknown
>
>
>It might be relevant that I have a dual-processor system.
>
>Randall Schulz
>Mountain View, CA USA
>
>
>
>At 20:31 2002-06-05, Russ Jorgensen wrote:
>>Was anyone able to resolve this issue?  A few weeks
>>ago I posted about poor bash performance with "while
>>read" loops.  Maybe this is the same issue...
>>
>>Anyway, I hadn't upgraded my cygwin1.dll for quite a
>>long time, but when I did, some of my shell scripts
>>started to have horrible performance.  I tracked it
>>down to the "while read" loops.  I wrote the following
>>benchmark shell script to see how bad the problem
>>really is.  On my PII-333 running Win-ME, I get the
>>following results:
>>
>># time ./doit 1
>>
>>real 0m3.555s
>>user 0m0.000s
>>sys  0m0.000s
>>
>># time ./doit 2
>>
>>real 0m22.870s
>>user 0m0.000s
>>sys  0m0.000s
>>
>>When I run the same benchmark on a linux machine, I
>>don't get nearly as big a difference between the two
>>runs.
>>
>>It would be really great if one of the crack
>>programmers who work on cygwin could look into this.
>>I imagine that everyone who uses cygwin would
>>appreciate a performance boost!
>>
>>Anyway, here's the benchmark shell script.  Thanks.
>>
>>    -Russ
>>
>>#!/bin/bash
>>
>>#
>># benchmark piping into "while read"
>>#
>># "doit 1" is the "first pass" which benchmarks
>># generating output with the nested for-loops
>>#
>># "doit 2" is the "second pass" which adds on the
>># "while read" loop
>>#
>>
>># check usage
>>if test $# -ne 1; then
>>    echo "usage: doit {1|2}"
>>    exit 1
>>fi
>>
>># first pass: generate a bunch of output
>>for i in 1 2 3 4 5 6 7 8 9 0; do
>>    for j in 1 2 3 4 5 6 7 8 9 0; do
>>        for k in 1 2 3 4 5 6 7 8 9 0; do
>>            for l in 1 2 3 4 5 6 7 8 9 0; do
>>                echo hi
>>            done
>>        done
>>    done
>>done |
>>
>># second pass: the "while read" loop
>>if test $1 != 2; then
>>    cat - > /dev/null
>>else
>>    while read JUNK; do
>>        A=1
>>    done
>>fi
>
>
>--
>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/


--
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