Performance issues after 100+ convert commands
Posted: 2014-05-29T01:39:35-07:00
Hello everybody,
I have a question regarding the performance of ImageMagick.
The system (a VPS from Amazon Web Services) I am running (the latest) ImageMagick on is: 1 Xeon E5-2650 CPU, 615MB Ram
I have created a batch file, which runs this command:
FOR /l %%x IN (0, 1, 255) DO FOR /l %%y IN (0, 1, 255) DO convert xc:rgb(0,%%x,%%y) -profile AdobeRGB1998.icc -profile CoatedFOGRA39.icc -colorspace CMYK -precision 3 -format "%%[fx:round(100*c)],%%[fx:round(100*y)],%%[fx:round(100*m)],%%[fx:round(100*k)]\n" info: >> cmyk0.txt
This gives me appropriate color conversion from rgb to cmyk (the discussion about the formula is in this post: viewtopic.php?f=1&t=25600)
The problem I ran into is that after running the command about 100-140 times (so upon reaching rgb(0,0,150) approximately) the speed of it all breaks down to *horrendously slow*.
The benchmark for this command gave me a result of 38sec to run 256 times.
So expanding the calculation would mean that converting 256*256 colors (rgb(0.0,0) -> rgb(0,255,255)) means 38sec * 256 = 2.7h
The server has been up and running the command for over a day now and imagemagick only reached rgb(0,150,50).
Things I have tried so far: setting the variable MAGICK_THREAD_LIMIT=1 (even though IM already only used 1 thread since it's a single core VPS).
Running IM in the powershell instead of cmd.
Halting the script and resuming at that point.
Does anybody have an idea for me, what to do? If the speed of IM was constant at 38sec / 256 converts, the whole thing (16.7m colors) should be done in less than 2 days.
With the current speed I am looking at a months-long process
Thanks for any ideas
Tricon
Edit: I should add this: sometimes, as I am monitoring all servers running the 1 batch file each, one of the scripts speeds up to initial speed, but only for about 30-40 converts. After that it breaks down to super-slow again. Which script/server that is, is always random. Sometimes the speed increase happens, when the script switches to the next G value of the rgb code (so from rgb(0,13,255) to rgb(0,14,0)) - but as I have observed, this seems also very random).
I have a question regarding the performance of ImageMagick.
The system (a VPS from Amazon Web Services) I am running (the latest) ImageMagick on is: 1 Xeon E5-2650 CPU, 615MB Ram
I have created a batch file, which runs this command:
FOR /l %%x IN (0, 1, 255) DO FOR /l %%y IN (0, 1, 255) DO convert xc:rgb(0,%%x,%%y) -profile AdobeRGB1998.icc -profile CoatedFOGRA39.icc -colorspace CMYK -precision 3 -format "%%[fx:round(100*c)],%%[fx:round(100*y)],%%[fx:round(100*m)],%%[fx:round(100*k)]\n" info: >> cmyk0.txt
This gives me appropriate color conversion from rgb to cmyk (the discussion about the formula is in this post: viewtopic.php?f=1&t=25600)
The problem I ran into is that after running the command about 100-140 times (so upon reaching rgb(0,0,150) approximately) the speed of it all breaks down to *horrendously slow*.
The benchmark for this command gave me a result of 38sec to run 256 times.
So expanding the calculation would mean that converting 256*256 colors (rgb(0.0,0) -> rgb(0,255,255)) means 38sec * 256 = 2.7h
The server has been up and running the command for over a day now and imagemagick only reached rgb(0,150,50).
Things I have tried so far: setting the variable MAGICK_THREAD_LIMIT=1 (even though IM already only used 1 thread since it's a single core VPS).
Running IM in the powershell instead of cmd.
Halting the script and resuming at that point.
Does anybody have an idea for me, what to do? If the speed of IM was constant at 38sec / 256 converts, the whole thing (16.7m colors) should be done in less than 2 days.
With the current speed I am looking at a months-long process
Thanks for any ideas
Tricon
Edit: I should add this: sometimes, as I am monitoring all servers running the 1 batch file each, one of the scripts speeds up to initial speed, but only for about 30-40 converts. After that it breaks down to super-slow again. Which script/server that is, is always random. Sometimes the speed increase happens, when the script switches to the next G value of the rgb code (so from rgb(0,13,255) to rgb(0,14,0)) - but as I have observed, this seems also very random).