delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/09/20/13:51:53

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,TW_JW,TW_SJ,TW_YW,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
X-Authority-Analysis: v=1.0 c=1 a=2hYTL8vOn6QA:10 a=8nJEP1OIZ-IA:10 a=hOpmn2quAAAA:8 a=w_pzkKWiAAAA:8 a=WVNfIYznG6dZbkF4EJgA:9 a=E5Cw3XsInHrPCQFADmkA:7 a=PvuO0pjiGaijSu02CczvUPEAfZ4A:4 a=wPNLvfGTeEIA:10 a=buB1NfXUTBUA:10 a=IfQ-iFkkCvMA:10 a=lTVaEFIQNa4A:10 a=1oW8Lx85meTe8xsO:21 a=lyPiN-pW3ykioKt8:21
Message-ID: <4C979F1F.1050804@charter.net>
Date: Mon, 20 Sep 2010 13:51:27 -0400
From: SJ Wright <sjwright68 AT charter DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Unacceptable behavior -- slowing down script execution
References: <4C939E17 DOT 8030208 AT charter DOT net> <AANLkTim_nfcxr0FQprJsENzLor0e3tR67bZBtVX6qXhF AT mail DOT gmail DOT com>
In-Reply-To: <AANLkTim_nfcxr0FQprJsENzLor0e3tR67bZBtVX6qXhF@mail.gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

mike marchywka wrote:
> On 9/17/10, SJ Wright <sjwright68 charter.net> wrote:
>   
>> 4. Is it normal for any script to run CPU usage up to 100%?
>>     
>
> Unless it is blocking for something like IO including VM swaps, why not?
>
>
>   
>> Regarding #4:
>> I have a script that I ran in GNOME Terminal less than an hour ago. I
>> "time"d it -- the return was 20.6 seconds on the first line (real?). I
>> ran the same script fifteen minutes later, evaluating identical files of
>> the same type, length (5.37kb and 345b ASCII text) and time stamp, and
>> after 7 minutes it was barely one-eighth complete. That's when I checked
>> Task Manager and found my CPU usage was at 100% and three bash.exe's
>> were running simultaneously. Admittedly the script calls on several
>>     
>
> This sounds like a threading problem if I had to guess but it could
> be anything that changed between runs- certainly timing will make
> these things come and go but having no idea what you mean by identical
> instead of  "the same" there are a lot of things that could have changed etc.
> What did it seem to be trying to do? Often in cases like this
> the alarming situation is where your cpu usage drops to low values
> and your disk light gets stuck on as you have depleted memory.
>
> I guess I'm also not sure what you think a usual or good number
> of processes should be etc. A number of anecdotes have been
> reported about slower performance on 64 bit or multi core machines
> than  more primitive older cmoputers and it is easy to
> speculate on reasons why that could happen
> but hard to make a clear diagnosis without an explicit test case.
>
> --
> 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
>
>
>   
They were the same files, in terms of number of lines, bytes per line, 
and so forth. Likely the only differences were to be found in their 
timestamps.
This one script seems, now that I've got rid of bash-completion (thanks 
again Cyrille), to be the only one that will push CPU usage to 100% and 
keep it there for the duration of its execution.

Call me strange, but I like my Task Manager to show me no more than 51 
processes at a time. I also like my scripts to call up one and only one 
additional instance of the shell they're written to be executed in than 
I'm running before I start one.

I agree it's likely a threading problem, but I think it's more likely 
how I have the script written.

A breakdown of the calls to non-internal (not BASH built-ins, so far as 
I can judge) would look like this:
 
  -- 8 to Exiv2 v.0.20 by Andreas Huggel.

Likely there are more; I may be wrong. I don't normally keep track of 
which command came from where or calls on what class of "ps"- able 
process. Perhaps, as this has involved and included more than two shells 
running simultaneously (by visual evidence in Task Manager and nothing 
else), it is, instead, a matter of a too-high demand *on* the internals. 
Or I've got another software package, either Cygwin-adapted or just a 
lucky compile on my part, that's kicking in and making  itself known 
when I launch this one particular script.

I can post the script to the list as text if anyone thinks it's worth 
pursuing this line of logic.

Thanks for the replies and the help thus far. Looking forward to the 
same continuing.

Steve Wright

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

- Raw text -


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