NEXRAD preview PNGs are 12200 x 5400 pixels. This takes over 650 MB of RAM to load each frame.
Normally, you should be able to control ImageMagick use of RAM with environment variables:
MAGICK_MEMORY_LIMITAmount of RAM heap to use
MAGICK_MAP_LIMITAmount of RAM to use before paging to disk
MAGICK_DISK_LIMITA very slow last resort, before crashing.
I tried commands like
but they still paged to disk, taking 1000x longer even with SSD and wearing out the SSD with writes.
MAGICK_DISK_LIMIT=100MB mogrify -scale 10% "*.png"
would give error message as expected.
I filed an ImageMagick bug report.
For Linux, there is a RAM drive available at
/run/shm, which is
on Windows, even with Cygwin or Windows Subsystem for Linux.
I force ImageMagick to use RAM drive, which gave me 1000x speedup by:
MAGICK_TEMPORARY_PATH=/run/shm mogrify -scale 10% "*.png"