Image Conversion Time

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
void

Image Conversion Time

Post by void »

I am going through a server refresh where I work.

Code: Select all

Server 1:

CPU Number = 4
Physical Memory = 16 GB
Virtual Memory = 25 GB
OS = Solaris 8
ImageMagick Version = 6.0.8
libtiff = 3.6.1 w/ lzw 1.5 compression kit
ldd libMagick.so
        libtiff.so =>    /usr/local/lib/libtiff.so
        libfreetype.so.6 =>      /usr/local/lib/libfreetype.so.6
        libXext.so.0 =>  /usr/lib/libXext.so.0
        libXt.so.4 =>    /usr/lib/libXt.so.4
        libSM.so.6 =>    /usr/lib/libSM.so.6
        libICE.so.6 =>   /usr/lib/libICE.so.6
        libX11.so.4 =>   /usr/lib/libX11.so.4
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libxml2.so.2 =>  /usr/lib/libxml2.so.2
        libz.so =>       /usr/local/lib/libz.so
        libm.so.1 =>     /usr/lib/libm.so.1
        libpthread.so.1 =>       /usr/lib/libpthread.so.1
        libltdl.so.3 =>  /usr/local/lib/libltdl.so.3
        libc.so.1 =>     /usr/lib/libc.so.1
        libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
        libucb.so.1 =>   /usr/ucblib/libucb.so.1
        libresolv.so.2 =>        /usr/lib/libresolv.so.2
        libelf.so.1 =>   /usr/lib/libelf.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        libz.so.1 (SUNW_1.1) =>  (version not found)
        libthread.so.1 =>        /usr/lib/libthread.so.1
        /usr/platform/SUNW,Sun-Fire-480R/lib/libc_psr.so.1



Server 2:
CPU Number = 44 (20% faster)
Physical Memory = 256 GB
Virtual Memory = 2 GB
OS = Solaris 10 (Virtual Zone, no restrictions on CPU/Memory usage in this zone.)
ImageMagick Version = 10.0.8
libtiff Version = 3.8.2
ldd libMagick.so
        liblcms.so.1 =>  /usr/local/lib/liblcms.so.1
        libtiff.so.3 =>  /usr/lib/libtiff.so.3
        libjpeg.so.62 =>         /usr/lib/libjpeg.so.62
        libfontconfig.so.1 =>    /usr/lib/libfontconfig.so.1
        libXext.so.0 =>  /usr/lib/libXext.so.0
        libSM.so.6 =>    /usr/lib/libSM.so.6
        libICE.so.6 =>   /usr/lib/libICE.so.6
        libX11.so.4 =>   /usr/lib/libX11.so.4
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libXt.so.4 =>    /usr/lib/libXt.so.4
        libbz2.so.1 =>   /usr/lib/libbz2.so.1
        libm.so.2 =>     /usr/lib/libm.so.2
        libpthread.so.1 =>       /usr/lib/libpthread.so.1
        libfreetype.so.6 =>      /usr/local/lib/libfreetype.so.6
        libz.so =>       /usr/lib/libz.so
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
        libfreetype.so.6 =>      /usr/sfw/lib/libfreetype.so.6
        libexpat.so.0 =>         /usr/sfw/lib/libexpat.so.0
        libmp.so.2 =>    /usr/lib/libmp.so.2
        libmd5.so.1 =>   /usr/lib/libmd5.so.1
        libscf.so.1 =>   /usr/lib/libscf.so.1
        libdoor.so.1 =>  /usr/lib/libdoor.so.1
        libuutil.so.1 =>         /usr/lib/libuutil.so.1
        /platform/SUNW,Sun-Fire-15000/lib/libc_psr.so.1
        /platform/SUNW,Sun-Fire-15000/lib/libmd5_psr.so.1
On server 1, it takes about 10 seconds per image conversion, whereas on server 2, it is taking anywhere from 30 - 60 seconds per image. I am at a loss to explain the difference with this process. Any help or direction on what to check would be most helpful. Any additional information that is needed, please ask and I can provide.

- Thanks in advance.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Image Conversion Time

Post by magick »

Server 2 is most likely caching pixels to disk. Add -debug cache to your command line and see if the image conversion takes place in memory or on disk. If you can install/run the latest ImageMagick release, 6.3.7-9.
void

Re: Image Conversion Time

Post by void »

magick wrote: Server 2 is most likely caching pixels to disk. Add -debug cache to your command line and see if the image conversion takes place in memory or on disk. If you can install/run the latest ImageMagick release, 6.3.7-9.

Code: Select all

Server 1:

convert -debug cache test.tif
16:40:48 0:01 0.010u 6.0.8 convert[12629]: cache.c/DestroyCacheInfo/1209/Cache
  destroy
16:40:48 0:01 0.020u 6.0.8 convert[12629]: cache.c/DestroyCacheInfo/1209/Cache
  destroy
16:40:48 0:01 0.020u 6.0.8 convert[12629]: cache.c/OpenCache/2389/Cache
  open test.tif[0] (memory, 6.2mb)
16:40:48 0:01 0.130u 6.0.8 convert[12629]: cache.c/DestroyCacheInfo/1209/Cache
  destroy test.tif[0]



Server 2:
convert -debug cache test.tif
2008-01-07T16:40:22-05:00 0:01 0.010u 6.3.4 Cache convert[27153]: cache.c/unknown/2009/Cache
  destroy
2008-01-07T16:40:23-05:00 0:01 0.020u 6.3.4 Cache convert[27153]: cache.c/unknown/2009/Cache
  destroy
2008-01-07T16:40:23-05:00 0:01 0.020u 6.3.4 Cache convert[27153]: cache.c/unknown/3397/Cache
  open test.tif[0] (anonymous memory, 759x858 9.93686mb)
2008-01-07T16:40:49-05:00 0:28 26.480u 6.3.4 Cache convert[27153]: cache.c/unknown/3397/Cache
  open test.gif[0] (anonymous memory, 759x858 12.4211mb)
2008-01-07T16:40:49-05:00 0:28 26.480u 6.3.4 Cache convert[27153]: cache.c/unknown/1779/Cache
  memory => memory
2008-01-07T16:40:56-05:00 0:35 33.710u 6.3.4 Cache convert[27153]: cache.c/unknown/2009/Cache
  destroy test.gif[0]

I have been unable to get the latest version of ImageMagick to compile on Solaris 10. I will look into that version further, but for now, here are the results.
Post Reply