[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Too much memory being used with "find" and parallel
From: |
Martin Møller Skarbiniks Pedersen |
Subject: |
Re: Too much memory being used with "find" and parallel |
Date: |
Thu, 24 Jul 2014 19:05:05 +0200 |
On Jul 24, 2014 4:52 AM, "Nelson A. de Oliveira" <naoliv@gmail.com> wrote:
>
> Hi!
>
> I have about 3 million PNG files across some directories and I would
> like to optimize them.
> I did a shell script with this function:
>
> optimize () {
> pngquant --force --speed 1 --ext .png 16 $1
> optipng -o7 -quiet $1
> }
>
> And I am (trying) to run it against all the PNGs with this:
>
> find $TILEDIR -type f -name "*.png" | \
> parallel --env optimize -j +0 --eta optimize
>
> But there is one problem: parallel starts to eat all my RAM and I just
> can't run it.
try remove the -j +0 parameter.
Regards
Martin