porespy
porespy copied to clipboard
Memory profile snow2
On our 256GB-memory server, I couldn't do extraction for images larger than 1200^3. Given that a 1200^3 image stored in float64
roughly takes up ~14GB of memory, snow2
is using ~18 times that amount, which is not not an order of magnitude off, but I think could be improved 2-3X.
Here are some ideas:
- Maybe we're using
float64
in some places whereint64
(or evenint32
) could do the job. - I don't think the distance transform needs to be exact down 16 digits, so maybe we could use
float32
or evenfloat16
?
All good points....but I was able to do a 1100 by 1100 by 2800 on that sever earlier this week. I used [2, 2, 8] as the chunk size.
Per the discussion w/ @jgostick, the issue is multiphase extraction. It seems that memory usage builds up.
Try this: https://github.com/plasma-umass/scalene