[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: one process occupying the whole cpu



see below.

On Fri, Nov 26, 2010 at 07:58, Jochen Schulz <ml@well-adjusted.de> wrote:
> Kjetil brinchmann Halvorsen:
>>
>> At 16.10 this afternoon I started a process via a shell script  which
>> is nso resource-hungry
> …
>> (In the script, I am loopìng over the about 3700 tar.gz files in one
>> directory. For e ach of them, I am spawning a
>> sub-shell (using &)  doing some installation wo rk).
>                   ^
> Looks like you are uncompressing and extracting your 3700 tar.gz files
> in parallel. You are probably stressing CPU and hard disk at the same
> time.
>
> Yes, the system shouldn't become *totally* unresponsive. But hey, you
> are generating a system load far beyond 100, I guess. What did you
> expect?
>

This si my shell (bash) script:

# shell script to install all the packages in ~/R/allpackages,
# to ~/R/allinstall . Should be run from ~/R/Recommend .
#
 for FILE in ~/R/allpackages/*z
 do
    if [ -f $FILE ]
    then
       nice R CMD INSTALL  --library=~/R/allinstall --no-test-load    \
              --no-configure --html --no-libs --no-exec --resave-data $FILE \
                 || echo "Problems encountered during processing of $FILE" &
    fi
 done
#

As you can see, I did spawn the subprocesses with nice!
Why didå nt that work?

Any tips on how to write the script so that it becomes "nice"?

Kjetil





> J.
> --
> As a child I pulled the legs from a spider.
> [Agree]   [Disagree]
>                 <http://www.slowlydownward.com/NODATA/data_enter2.html>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkzvkuoACgkQ+AfZydWK2zmKBgCgnBJX1M4Itlu2C/LdabTScmar
> 0VMAnRpDi+wx3jR2HwNgAYdxieIHtncQ
> =6Xde
> -----END PGP SIGNATURE-----
>
>



-- 
"If you want a picture of the future - imagine a boot stamping on the
human face - forever."

George Orwell (1984)


Reply to: