High CPU load when converting images
Posted: 2017-03-10T09:56:37-07:00
We are using version 6.7.2-7 of ImageMagick and are experiencing HIGH CPU loads very randomly. Happening about once per day over the course of a few thousand convert operations happening.
Version: ImageMagick 6.7.2-7 2016-06-16 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
The article in the link (http://www.daniloaz.com/en/high-cpu-loa ... agemagick/) describes our exact problem but since it was posted several years ago I would have thought this bug may have been addressed by now. Is this still an issue with version 6.7 ? Is the solution of limiting ImageMagic to a single core the best approach to resolve?
[Notes from Linked Article]
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The way to force ImageMagick to use a single processor or core when performing an image conversion is using the environment variable MAGICK_THREAD_LIMIT. This variable should be set to 1 and be available in the runtime environment of the convert command. So edit the /etc/environment file and add the line MAGICK_THREAD_LIMIT=1 as shown below:
# cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
LANG="es_ES.UTF-8"
LANGUAGE="es_ES.UTF-8"
MAGICK_THREAD_LIMIT=1
Then open a new command shell, since the current one will not load such environment variable until we log into the system again.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Any current experience by others with High CPU loads using version 6.7 ?
Thanks,
Bill
Version: ImageMagick 6.7.2-7 2016-06-16 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
The article in the link (http://www.daniloaz.com/en/high-cpu-loa ... agemagick/) describes our exact problem but since it was posted several years ago I would have thought this bug may have been addressed by now. Is this still an issue with version 6.7 ? Is the solution of limiting ImageMagic to a single core the best approach to resolve?
[Notes from Linked Article]
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The way to force ImageMagick to use a single processor or core when performing an image conversion is using the environment variable MAGICK_THREAD_LIMIT. This variable should be set to 1 and be available in the runtime environment of the convert command. So edit the /etc/environment file and add the line MAGICK_THREAD_LIMIT=1 as shown below:
# cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
LANG="es_ES.UTF-8"
LANGUAGE="es_ES.UTF-8"
MAGICK_THREAD_LIMIT=1
Then open a new command shell, since the current one will not load such environment variable until we log into the system again.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Any current experience by others with High CPU loads using version 6.7 ?
Thanks,
Bill