IM 6.2.6 dies with no mem when 2 GB is avail for 60M of PNGs
Posted: 2006-07-14T10:01:38-07:00
mtodorov@domac:~$ convert -version
Version: ImageMagick 6.2.6 03/15/06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
Images are model-0000.png ... model-0999.png, where size is from 20K to 120 K per frame.
% du -sk .
59244 .
% convert -delay 4 -deconstruct model-*.png ~/public_html/tesla/fly-1.02.gif
Top gives memory size in run (huuuge for 58 MB of PNGs) ...
top - 18:15:28 up 12 days, 21:27, 7 users, load average: 0.60, 0.48, 0.47
Tasks: 176 total, 4 running, 172 sleeping, 0 stopped, 0 zombie
Cpu(s): 50.4% user, 1.6% system, 0.2% nice, 47.9% idle
Mem: 2068864k total, 1439308k used, 629556k free, 16220k buffers
Swap: 1574328k total, 289320k used, 1285008k free, 1143224k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19130 mtodorov 18 0 945m 945m 901m R 99.9 46.8 0:39.10 convert
3615 mtodorov 11 0 2000 2000 1704 R 1.9 0.1 0:00.40 top
17926 root 5 -10 93436 35m 13m S 1.2 1.8 1018:47 XFree86
11964 mtodorov 19 19 3568 3564 2328 R 0.4 0.2 5:55.05 vermiculate
1 root 9 0 816 784 752 S 0.0 0.0 0:11.84 init
2 root 9 0 0 0 0 S 0.0 0.0 0:01.22 keventd
3 root 19 19 0 0 0 S 0.0 0.0 0:00.03 ksoftirqd_CPU0
.
.
.
Mem: 2068864k total, 1930376k used, 138488k free, 17248k buffers
Swap: 1574328k total, 286968k used, 1287360k free, 1169148k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19130 mtodorov 9 0 1402m 1.4g 902m S 0.0 69.4 1:01.32 convert
17926 root 5 -10 93520 35m 13m S 0.4 1.8 1018:48 XFree86
convert grows to 1.4g and then dies, with message:
convert: MemoryAllocationFailed `model-0724.png'.
model-0724.png doesn't seem very special:
mtodorov@domac:~/grc/fly1.02$ ls -l model-0724.png
-rw-r--r-- 1 mtodorov users 42454 Jul 14 16:50 model-0724.png
I wish there could be a way that otherwise excellent ImageMagick mmap()s images into memory, instead of inefficiently loading them in. this could save swap space and gratuitously page in only neded pages, while the pages processed will be eventually swapped out, by kernel.
Is it possible to have this builtin? Or is it a clear bug, since other animation with similar amount of data passed without problems?
Is there a workaround?
Thanks,
Mirsad
Version: ImageMagick 6.2.6 03/15/06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
Images are model-0000.png ... model-0999.png, where size is from 20K to 120 K per frame.
% du -sk .
59244 .
% convert -delay 4 -deconstruct model-*.png ~/public_html/tesla/fly-1.02.gif
Top gives memory size in run (huuuge for 58 MB of PNGs) ...
top - 18:15:28 up 12 days, 21:27, 7 users, load average: 0.60, 0.48, 0.47
Tasks: 176 total, 4 running, 172 sleeping, 0 stopped, 0 zombie
Cpu(s): 50.4% user, 1.6% system, 0.2% nice, 47.9% idle
Mem: 2068864k total, 1439308k used, 629556k free, 16220k buffers
Swap: 1574328k total, 289320k used, 1285008k free, 1143224k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19130 mtodorov 18 0 945m 945m 901m R 99.9 46.8 0:39.10 convert
3615 mtodorov 11 0 2000 2000 1704 R 1.9 0.1 0:00.40 top
17926 root 5 -10 93436 35m 13m S 1.2 1.8 1018:47 XFree86
11964 mtodorov 19 19 3568 3564 2328 R 0.4 0.2 5:55.05 vermiculate
1 root 9 0 816 784 752 S 0.0 0.0 0:11.84 init
2 root 9 0 0 0 0 S 0.0 0.0 0:01.22 keventd
3 root 19 19 0 0 0 S 0.0 0.0 0:00.03 ksoftirqd_CPU0
.
.
.
Mem: 2068864k total, 1930376k used, 138488k free, 17248k buffers
Swap: 1574328k total, 286968k used, 1287360k free, 1169148k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19130 mtodorov 9 0 1402m 1.4g 902m S 0.0 69.4 1:01.32 convert
17926 root 5 -10 93520 35m 13m S 0.4 1.8 1018:48 XFree86
convert grows to 1.4g and then dies, with message:
convert: MemoryAllocationFailed `model-0724.png'.
model-0724.png doesn't seem very special:
mtodorov@domac:~/grc/fly1.02$ ls -l model-0724.png
-rw-r--r-- 1 mtodorov users 42454 Jul 14 16:50 model-0724.png
I wish there could be a way that otherwise excellent ImageMagick mmap()s images into memory, instead of inefficiently loading them in. this could save swap space and gratuitously page in only neded pages, while the pages processed will be eventually swapped out, by kernel.
Is it possible to have this builtin? Or is it a clear bug, since other animation with similar amount of data passed without problems?
Is there a workaround?
Thanks,
Mirsad