How to optimize ImageMagick
Re: How to optimize ImageMagick
We profiled (timing + gprof) against ImageMagick 6.6.0, the current release, and 6.2.8 an older release, and we got identical results when converting 6 320x240 GIF images to GIF. The memory requirements for version 6.6.0 was slightly less than 6.2.8. We're not sure what is causing an increased load average on your computer. Color reduction was on average 0.05 seconds slower with ImageMagick 6.6.0.
Re: How to optimize ImageMagick
You've tested the memory consumption. What about CPU load? Especially, when you're using several (5-10-15) "convert"-proccesses at the same time.
Re: How to optimize ImageMagick
We ran two convert processes in a loop. One resizes the logo 50% and the other appends 6 GIF images into one GIF animation. The loop iterated 2000 times. The 5 minute load average peaked at 4.18 and sustained about 4.1 for ImageMagick 6.2.8. ImageMagick 6.6.0 peaked at 4.01 and sustained at 3.85.
As mentioned, color reduction is more sophisticated in 6.6.0 so it takes a bit longer. For 200 iterations of resizing, color reduction, and generating a GIF image sequence, version 6.2.8 took 32 seconds elapsed, whereas 6.6.0 took 41. If we eliminate color reduction, 6.2.8 iterates 200 times at 8.3 seconds elasped, whereas ImageMagick 6.6.0 takes 6.4 seconds.
As mentioned, color reduction is more sophisticated in 6.6.0 so it takes a bit longer. For 200 iterations of resizing, color reduction, and generating a GIF image sequence, version 6.2.8 took 32 seconds elapsed, whereas 6.6.0 took 41. If we eliminate color reduction, 6.2.8 iterates 200 times at 8.3 seconds elasped, whereas ImageMagick 6.6.0 takes 6.4 seconds.
-
- Posts: 37
- Joined: 2010-10-12T12:42:53-07:00
- Authentication code: 8675308
NEED help urgent
Hello,
I need URGENT help,
My old server was dual xeon 5660 (24 cores) and I had no problem with imagemagick 6.6.6-4
I got a new server dual xeon 5670 (24 cores) + 12 GB RAM with same version of imagemagick
Now I ran a small loadtest
The old server load 4.35 &
new server load 888..48
And ultimately became unstable and I had to reboot
I am not linux guy, and I am having someone else to manage my server, but they are and even the datacenter guys are unable to solve the problem.
Is it possible for you to log in to my server and solve the issue? I understand this would take your time and am ready to compensate it.
Thank you very much
I need URGENT help,
My old server was dual xeon 5660 (24 cores) and I had no problem with imagemagick 6.6.6-4
I got a new server dual xeon 5670 (24 cores) + 12 GB RAM with same version of imagemagick
Now I ran a small loadtest
The old server load 4.35 &
new server load 888..48
And ultimately became unstable and I had to reboot
I am not linux guy, and I am having someone else to manage my server, but they are and even the datacenter guys are unable to solve the problem.
Is it possible for you to log in to my server and solve the issue? I understand this would take your time and am ready to compensate it.
Thank you very much
Re: How to optimize ImageMagick
Does your instance of ImageMagick include support for OpenMP? Type
You might consider bumping up to ImageMagick version 6.6.7-4, the latest release.
- convert -version
- <policy domain="resource" name="thread" value="2"/>
You might consider bumping up to ImageMagick version 6.6.7-4, the latest release.
-
- Posts: 37
- Joined: 2010-10-12T12:42:53-07:00
- Authentication code: 8675308
Re: How to optimize ImageMagick
Thanx for your help, I have forwarded this to Server guys..
OpenMP was supported, but I asked them to disable and see if it helps, but there was no difference. I will have it enable again and have reinstall the latest release as well.
BTW, name="thread" value="2" .. you mean if server load decreases, we can trying increasing the value? say value="10" etc?
Thanx again. I will update this thread with the results
OpenMP was supported, but I asked them to disable and see if it helps, but there was no difference. I will have it enable again and have reinstall the latest release as well.
BTW, name="thread" value="2" .. you mean if server load decreases, we can trying increasing the value? say value="10" etc?
Thanx again. I will update this thread with the results
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How to optimize ImageMagick
Some basic and simple methods of speeding up IM is listed in
API & Scripting -- Making IM Faster (in general)
http://www.imagemagick.org/Usage/api/#speed
One of the methods for example is in stopping IM from reading some of its large configuration files.
Im by default will not read these unless it has to so using a color has rather than a color name will give a speed up.
API & Scripting -- Making IM Faster (in general)
http://www.imagemagick.org/Usage/api/#speed
One of the methods for example is in stopping IM from reading some of its large configuration files.
Im by default will not read these unless it has to so using a color has rather than a color name will give a speed up.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
-
- Posts: 37
- Joined: 2010-10-12T12:42:53-07:00
- Authentication code: 8675308
Re: How to optimize ImageMagick
Unfortunately Nothing helped..
Here is the Screenshot I took from WHM showing processes, and you can see the CPU load for these processes.

I was just wondering, if there are any additional libraries affecting imagemagick causing this heavy server load?
Is problem somewhere else? cause this is brand new server and the first thing we did is install imagemagick and I started doing this test.
Here is the Screenshot I took from WHM showing processes, and you can see the CPU load for these processes.

I was just wondering, if there are any additional libraries affecting imagemagick causing this heavy server load?
Is problem somewhere else? cause this is brand new server and the first thing we did is install imagemagick and I started doing this test.
-
- Posts: 37
- Joined: 2010-10-12T12:42:53-07:00
- Authentication code: 8675308
Re: How to optimize ImageMagick
Sorry, I am new to this forum.... but I guess it would be better to continue in its own thread here. so created one here
viewtopic.php?f=1&t=17981
Thank you for your help
viewtopic.php?f=1&t=17981
Thank you for your help
-
- Posts: 1
- Joined: 2012-07-25T16:34:16-07:00
- Authentication code: 15
Re: How to optimize ImageMagick
We are running FocusOpen Digital Asset Manager, which uses ImageMagick for image processing.
ImageMagick-6.6.3-1-Q16-windows-dll.exe is the version in use.
We're maxing CPU at 100% when we try to process even 5 small jpgs at a time. Since we're not running this from the command line, b/c FocusOpen is making the call to ImageMagick, we cannot request the 8bit version via command line.
What do you recommend?
BTW- if we put in a high-end video card, will IM offload image processing to the video card RAM instead of to the CPU?
ImageMagick-6.6.3-1-Q16-windows-dll.exe is the version in use.
We're maxing CPU at 100% when we try to process even 5 small jpgs at a time. Since we're not running this from the command line, b/c FocusOpen is making the call to ImageMagick, we cannot request the 8bit version via command line.
What do you recommend?
BTW- if we put in a high-end video card, will IM offload image processing to the video card RAM instead of to the CPU?