PetteriAimonen / focus-stack

Fast and easy focus stacking
MIT License
328 stars 48 forks source link

Memory Issues #41

Closed miasinterestinglife closed 1 year ago

miasinterestinglife commented 1 year ago

When running this program under Fedora Linux 38 with 16GB of RAM it crashes (even with lower batch sizes) with the message Killed56 at Build color reassignment map from 8 imag. I am merging 64 images at 32 Megapixels each (about 9.4MB). Am I doing something wrong or does this program just require a ton of memory?

PetteriAimonen commented 1 year ago

While the images may be around 9.4 MB when jpeg-compressed, a 32 megapixel image is 96 MB in uncompressed state in memory. And during processing, several images need to be kept in memory.

With the default settings, the memory needed is about 100MB per one megapixel of image resolution. For 32 megapixel images, 3.2 GB of free RAM should be sufficient.

Can you check how much memory you actually have available (the last column in free -h output)? Also after the Killed message, check if sudo dmesg gives any more information about why it was killed.

Minimal memory use would be with --batchsize=2 --threads=1, though it will also be significantly slower.

miasinterestinglife commented 1 year ago

I am very sorry for the delay, but that seems to have worked perfectly. Thank you very much!