6.7 on Solaris 10, Slow to convert 5MB jpg

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dmcgough
Posts: 2
Joined: 2013-03-28T09:00:17-07:00
Authentication code: 6789

6.7 on Solaris 10, Slow to convert 5MB jpg

Post by dmcgough »

Hi Everyone,

I'm working with ImageMagick 6.7.6 on Solaris 10. When I issue the command:

convert DSC_0283.jpg -resize 1024x768 -quality 100 test.jpg

it takes about 50 seconds to convert the image. The jpg is 5mb in size. When I try smaller jpgs, under 1mb, for instance, the speed is not bad, 2-3 seconds.

On windows by comparison, i can convert the 5mb file in 1-2 seconds. I am using version 6.7.5 on windows.

Any advice on this issue? Does anyone think I will ever get close to the windows mark of 1-2 seconds when running on Solaris 10?

Thanks,
Dave
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 6.7 on Solaris 10, Slow to convert 5MB jpg

Post by magick »

Add -debug cache to your command line. Is it allocating the pixel cache on disk? If so, that's the source of the slow-down.
dmcgough
Posts: 2
Joined: 2013-03-28T09:00:17-07:00
Authentication code: 6789

Re: 6.7 on Solaris 10, Slow to convert 5MB jpg

Post by dmcgough »

magick wrote:Add -debug cache to your command line. Is it allocating the pixel cache on disk? If so, that's the source of the slow-down.
Hi, thanks for your reply. I have added the option to the command. Here is the first few lines of the output. I am not sure how to determine if the pixel cache is going to the disk or not. Looks like it is referencing heap. Thanks for any help you can provide.

Dave

-----

bash-3.00$ convert DSC_0283.jpg -debug cache -resize 1024x768 -quality 100 renditionDSC_0283.jpg
2013-03-28T11:04:38-07:00 0:00.030 0.020u 6.7.6 Cache convert[12785]: cache.c/DestroyPixelCache/1447/Cache
destroy
2013-03-28T11:04:38-07:00 0:00.080 0.070u 6.7.6 Cache convert[12785]: cache.c/OpenPixelCache/4046/Cache
open DSC_0283.jpg[0] (heap memory, 4064x2704 83.84MiB)
2013-03-28T11:04:48-07:00 0:10.090 10.080u 6.7.6 Cache convert[12785]: cache.c/OpenPixelCache/4046/Cache
open DSC_0283.jpg[0] (heap memory, 4064x681 21.11MiB)
2013-03-28T11:05:30-07:00 0:52.340 52.330u 6.7.6 Cache convert[12785]: cache.c/OpenPixelCache/4046/Cache
open DSC_0283.jpg[0] (heap memory, 1024x681 5.32MiB)
2013-03-28T11:05:30-07:00 0:52.340 52.330u 6.7.6 Cache convert[12785]: cache.c/ReadPixelCachePixels/4793/Cache
DSC_0283.jpg[0][14x681+0+0]
2013-03-28T11:05:30-07:00 0:52.350 52.350u 6.7.6 Cache convert[12785]: cache.c/WritePixelCachePixels/5647/Cache
DSC_0283.jpg[0][1x681+0+0]
2013-03-28T11:05:30-07:00 0:52.360 52.350u 6.7.6 Cache convert[12785]: cache.c/ReadPixelCachePixels/4793/Cache
DSC_0283.jpg[0][18x681+0+0]
2013-03-28T11:05:30-07:00 0:52.360 52.360u 6.7.6 Cache convert[12785]: cache.c/WritePixelCachePixels/5647/Cache
DSC_0283.jpg[0][1x681+1+0]
2013-03-28T11:05:30-07:00 0:52.360 52.360u 6.7.6 Cache convert[12785]: cache.c/ReadPixelCachePixels/4793/Cache
DSC_0283.jpg[0][22x681+0+0]
2013-03-28T11:05:30-07:00 0:52.370 52.370u 6.7.6 Cache convert[12785]: cache.c/WritePixelCachePixels/5647/Cache
DSC_0283.jpg[0][1x681+2+0]
2013-03-28T11:05:30-07:00 0:52.380 52.370u 6.7.6 Cache convert[12785]: cache.c/ReadPixelCachePixels/4793/Cache
DSC_0283.jpg[0][24x681+2+0]
2013-03-28T11:05:30-07:00 0:52.390 52.380u 6.7.6 Cache convert[12785]: cache.c/WritePixelCachePixels/5647/Cache
DSC_0283.jpg[0][1x681+3+0]
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 6.7 on Solaris 10, Slow to convert 5MB jpg

Post by magick »

The pixels are in memory, good. If you type 'convert -version' does it list OpenMP as a feature? If so, set the environment variable MAGICK_THREAD_LIMIT to 1. Does your command run any faster? If so, try 2 and 4 until you achieve maximum performance. If all of these fails, try the latest release of ImageMagick. Otherwise we're clueless why its taking so long.
Post Reply