I notice a slowdown in my server when using ImageMagick to resize some photos. Doing a
ImageMagick 6.7.9-6 2012-09-18
Version: ImageMagick 6.7.9-6 2012-09-18 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
To debug this, one needs more details.
"... several similar convert commands at the same time...": how many is 'several' exactly?!
How many CPU (cores) does this system have?
How 'similar' exactly, what are the differences within this similarity?!
What are the parent:child relationships between these similar commands?! (
How big is your typical input image?!
Please also report the full output of
This seems to be a web service, guessing from the input JPEG's directory that can be seen in the screenshot. *Are you sure that there are not several convert commands started by the web service for every upload? -- Are you sure that the web service isn't contacted multiple times by the web client for every image to be converted?*
convert -version reports as one feature
OpenMP, then your ImageMagick is multi-threaded, enabling it to simultaneously run multiple threads to process one large image. This can increase efficiency very greatly when it comes to process large image files. (But it can slow down overall performance greatly too, if you process many small files...)
My guess is that you don't see multiple (16) concurrent processes in the
htop output, but multiple (16) concurrent execution threads.
For the typical use case of processing small files, you should try it with automatic multi-threading disabled, by setting this environment variable:
You can also benchmark your ImageMagick command to get closer to the optimal number of threads to be used. Adding
-bench iterations prints the elapsed time and efficiency for one or more threads of the specific command:
convert \ -bench 40 \ /home/photos/public_html/2012/0926/some.jpg \ -resize 300 \ null:
Your ImageMagick 6.7.9 is able to apply progressive threading while benchmarking a command. (It doesn't make much sense to test with
-bench in non-OpenMP installations...)