How can one fix things so that both tasks run fast?
One way would be to have two differently compiled versions of ImageMagick floating around, using one for each task.
Now, what if three different key tasks have different ideal number of threads?
Dead simple solution
Assuming ImageMagick was compiled with OpenMP support, run the first task prefixing with the environment variable determining the number of threads set so that only 1 is used
Code: Select all
MAGICK_THREAD_LIMIT=1 convert small.png -resize 40x40^ -gravity center -extent 40x40 -quality 75 -sample 2x2 smallthumb.jpg
Code: Select all
MAGICK_THREAD_LIMIT=4 convert big.png -resize 40x40^ -gravity center -extent 40x40 -quality 75 -sample 2x2 bigthumb.jpg