Page 1 of 1

ImageMagick and CPU

Posted: 2019-03-25T06:32:27-07:00
by Galajas
why imagemagick don't use all CPU?
In Task Manager i see max 3% all CPU use.
Win 7 - ImageMagick-7.0.8-Q16

Code: Select all

Resource limits:
  Width: 214.748M
  Height: 214.748
  List length: -1
  Area: 8.56778GP
  Memory: 3.98968
  Map: 7.97936GiB
  Disk: unlimited
  File: 1536
  Thread: 12
  Throttle: 0
  Time: unlimited
Its posible do something, that ImageMagick use more CPU, becouse i work with big size PGM raw and TIFF images.

Re: ImageMagick and CPU

Posted: 2019-03-25T09:52:37-07:00
by snibgo
What is your IM command?

I suppose you have 12 processors. Some IM operations (eg "-blur") will multi-thread, but some will not. In general, reading and writing files is single-threaded.

Re: ImageMagick and CPU

Posted: 2019-03-25T10:03:53-07:00
by fmw42
This post is not about PAID Consulting, so I have moved it from the Consulting forum to the User's forum.

Re: ImageMagick and CPU

Posted: 2019-03-26T01:21:31-07:00
by Galajas
Hello,
I am take PDF and with GhostScript i convert in to PGMraw, and then with IM make these changes.

Code: Select all

start /wait "" "magick" "%~p1%~n1_converted.pgm" -threshold 84%% -bordercolor white -border 944x944 -negate -resize 99.75%% -density 2400 -units PixelsPerInch "%~p1%~n1_converted.tiff"
It is even possible, make IM take more CPU not just 1-5%?

Re: ImageMagick and CPU

Posted: 2019-03-26T07:33:19-07:00
by snibgo
How large is your input, in pixels? Perhaps you don't have enough memory, so IM has to store the pixel caches on disk, so most of the time is spent reading/writing the disk, so the CPU is mostly waiting for disk.

Re: ImageMagick and CPU

Posted: 2019-03-26T09:02:21-07:00
by Galajas
my PGM one of size input is 46048 x 22612px.
Maybe i can make somewhere to unlimited all these resources?

Re: ImageMagick and CPU

Posted: 2019-03-26T09:29:00-07:00
by snibgo
That needs about 8 GB memory just to read the image, before doing any processing. Your "-list resource" is truncated, but it seems you don't have enough memory.