my imagemagick 's efficiency
Posted: 2011-08-13T20:37:40-07:00
I have a question in the efficiency of imagemagick between the system precomiled rpm package and the version established from source code . Same system , rhel 5, x86_64. can anyone help me ?
My file size
4.0K ./107.gif
SERVER A, the Imagemagick version: ImagImageMagick-6.2.8.0-4.rpm
SERVER B , the Imagemagick version ImageMagick-6.7.1-0.tar.gz .
Then ,i replaced the SERVERB 's imagemagick with ImageMagick-6.2.8.0-4.el5_1.1.rpm
My compile option
./configure && make && make install
On SERVERB, i reinstall the imagicmagic under the /opt dir(./configure --prefix=/opt --with-quantum-depth=16 --disable-dependency-tracking --with-x=yes --without-perl ), when i strace the convert,
i got
ON SERVERA,the rpm version ,
starce result,i got
there are lots of open system call 'open' in source install version, and the first search location doesn't exist. is it the cause?
thx,
My file size
4.0K ./107.gif
SERVER A, the Imagemagick version: ImagImageMagick-6.2.8.0-4.rpm
Code: Select all
[root@SERVERA]# time convert 107.gif -resize 100 100.gif
real 0m0.676s
user 0m0.667s
sys 0m0.009s
Code: Select all
[root@SERVERB]# time convert 107.gif -resize 100 100.gif
real 0m2.724s
user 0m12.075s
sys 0m1.294s
Then ,i replaced the SERVERB 's imagemagick with ImageMagick-6.2.8.0-4.el5_1.1.rpm
Code: Select all
[root@SERVERB]# time convert 107.gif -resize 100 100.gif
real 0m0.981s
user 0m0.968s
sys 0m0.014s
./configure && make && make install
On SERVERB, i reinstall the imagicmagic under the /opt dir(./configure --prefix=/opt --with-quantum-depth=16 --disable-dependency-tracking --with-x=yes --without-perl ), when i strace the convert,
i got
Code: Select all
30217 execve("/opt/bin/convert", ["/opt/bin/convert", "107.gif", "-resize", "101", "2e.gif"], [/* 23 vars */]) = 0
30217 brk(0) = 0x7ba000
30217 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b7c527ec000
30217 uname({sys="Linux", node="smscp", ...}) = 0
30217 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
30217 open("/opt/lib/tls/x86_64/libMagick.so.10", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 stat("/opt/lib/tls/x86_64", 0x7fff582ba060) = -1 ENOENT (No such file or directory)
30217 open("/opt/lib/tls/libMagick.so.10", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 stat("/opt/lib/tls", 0x7fff582ba060) = -1 ENOENT (No such file or directory)
30217 open("/opt/lib/x86_64/libMagick.so.10", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 stat("/opt/lib/x86_64", 0x7fff582ba060) = -1 ENOENT (No such file or directory)
30217 open("/opt/lib/libMagick.so.10", O_RDONLY) = 3
30217 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\252\1\0\0\0\0\0"..., 832) = 832
30217 fstat(3, {st_mode=S_IFREG|0755, st_size=3223353, ...}) = 0
30217 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b7c527ed000
30217 mmap(NULL, 3235720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b7c527ee000
30217 mprotect(0x2b7c528fa000, 2097152, PROT_NONE) = 0
30217 mmap(0x2b7c52afa000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10c000) = 0x2b7c52afa000
30217 close(3) = 0
30217 open("/opt/lib/libWand.so.10", O_RDONLY) = 3
30217 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360?\1\0\0\0\0\0"..., 832) = 832
30217 fstat(3, {st_mode=S_IFREG|0755, st_size=1358187, ...}) = 0
30217 mmap(NULL, 2706392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b7c52b04000
30217 mprotect(0x2b7c52b96000, 2097152, PROT_NONE) = 0
30217 mmap(0x2b7c52d96000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x92000) = 0x2b7c52d96000
30217 close(3) = 0
30217 open("/opt/lib/libjpeg.so.62", O_RDONLY) = -1 ENOENT (No such file or directory)
starce result,i got
Code: Select all
18373 execve("/usr/bin/convert", ["convert", "107.gif", "-resize", "101", "2.gif"], [/* 21 vars */]) = 0
18373 brk(0) = 0x610d000
18373 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2af3abaa4000
18373 uname({sys="Linux", node="smscp", ...}) = 0
18373 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
18373 open("/etc/ld.so.cache", O_RDONLY) = 3
18373 fstat(3, {st_mode=S_IFREG|0644, st_size=74331, ...}) = 0
18373 mmap(NULL, 74331, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2af3abaa5000
18373 close(3) = 0
18373 open("/usr/lib64/libMagick.so.10", O_RDONLY) = 3
18373 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\225\302\2144\0\0\0"..., 832) = 832
18373 fstat(3, {st_mode=S_IFREG|0755, st_size=1791992, ...}) = 0
18373 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2af3abab8000
18373 mmap(0x348cc00000, 3985032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x348cc00000
18373 mprotect(0x348cd69000, 2093056, PROT_NONE) = 0
18373 mmap(0x348cf68000, 315392, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x168000) = 0x348cf68000
18373 mmap(0x348cfb5000, 97928, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x348cfb5000
18373 close(3) = 0
18373 open("/usr/lib64/libWand.so.10", O_RDONLY) = 3
18373 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`@\201\2144\0\0\0"..., 832) = 832
18373 fstat(3, {st_mode=S_IFREG|0755, st_size=699672, ...}) = 0
18373 mmap(0x348c800000, 2792088, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x348c800000
18373 mprotect(0x348c8a7000, 2097152, PROT_NONE) = 0
18373 mmap(0x348caa7000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa7000) = 0x348caa7000
18373 close(3) = 0
18373 open("/usr/lib64/liblcms.so.1", O_RDONLY) = 3
18373 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0q\300\2131\0\0\0"..., 832) = 832
there are lots of open system call 'open' in source install version, and the first search location doesn't exist. is it the cause?
Code: Select all
[root@SERVERB] sed '/open/!d' e1.out
30217 open("/opt/lib/tls/x86_64/libMagick.so.10", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/opt/lib/tls/libMagick.so.10", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/opt/lib/x86_64/libMagick.so.10", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/opt/lib/libMagick.so.10", O_RDONLY) = 3
30217 open("/opt/lib/libWand.so.10", O_RDONLY) = 3
30217 open("/opt/lib/libjpeg.so.62", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/etc/ld.so.cache", O_RDONLY) = 3
30217 open("/usr/lib64/libjpeg.so.62", O_RDONLY) = 3
30217 open("/opt/lib/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/usr/lib64/libz.so.1", O_RDONLY) = 3
30217 open("/opt/lib/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/lib64/libpthread.so.0", O_RDONLY) = 3
30217 open("/opt/lib/libfreetype.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/usr/lib64/libfreetype.so.6", O_RDONLY) = 3
30217 open("/opt/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/lib64/libdl.so.2", O_RDONLY) = 3
30217 open("/opt/lib/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/lib64/libm.so.6", O_RDONLY) = 3
30217 open("/opt/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/lib64/libc.so.6", O_RDONLY) = 3
30217 open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
30217 open("/proc/meminfo", O_RDONLY) = 3
30217 open("/opt/lib/ImageMagick-6.2.8/config/coder.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/opt/share/ImageMagick-6.2.8/config/coder.xml", O_RDONLY) = 3
30217 open("/opt/share/doc/ImageMagick-6.2.8/coder.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/opt/share/ImageMagick-6.2.8/coder.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/home/wangzhiqian/.magick/coder.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("coder.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/opt/lib/ImageMagick-6.2.8/modules-Q16/coders/gif.la", O_RDONLY) = 3
30217 open("/opt/lib/gif.a", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/etc/ld.so.cache", O_RDONLY) = 3
30217 open("/lib64/tls/x86_64/gif.a", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/lib64/tls/gif.a", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/lib64/x86_64/gif.a", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/lib64/gif.a", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/usr/lib64/tls/x86_64/gif.a", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/usr/lib64/tls/gif.a", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/usr/lib64/x86_64/gif.a", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/usr/lib64/gif.a", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/usr/share/locale/locale.alias", O_RDONLY) = 3
30217 open("/usr/share/locale/zh_CN.GBK/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/usr/share/locale/zh_CN.gbk/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/usr/share/locale/zh_CN/LC_MESSAGES/libc.mo", O_RDONLY) = 3
30217 open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
30217 open("/usr/lib64/gconv/GBGBK.so", O_RDONLY) = 3
30217 open("/usr/lib64/gconv/GBK.so", O_RDONLY) = 3
30217 open("/opt/lib/ImageMagick-6.2.8/modules-Q16/coders/gif.so", O_RDONLY) = 3
30217 open("/usr/share/locale/zh.GBK/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/usr/share/locale/zh/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("107.gif", O_RDONLY) = 3
30217 open("/opt/lib/ImageMagick-6.2.8/config/magic.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/opt/share/ImageMagick-6.2.8/config/magic.xml", O_RDONLY) = 3
30217 open("/opt/share/doc/ImageMagick-6.2.8/magic.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/opt/share/ImageMagick-6.2.8/magic.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("/home/wangzhiqian/.magick/magic.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("magic.xml", O_RDONLY) = -1 ENOENT (No such file or directory)
30217 open("107.gif", O_RDONLY) = 3
30217 open("2e.gif", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
thx,