Yuxin Wu 12/24/2022

Demystify RAM Usage in Multi-Process Data Loaders

Read Original

This technical article analyzes a common problem in PyTorch where using multi-process data loaders can replicate a dataset's RAM usage up to 40 times. It explains why this happens with in-memory metadata, provides tools to accurately measure RAM usage (USS, PSS), and offers solutions to enable memory sharing across processes to drastically reduce memory footprint. The concepts apply to any Python multiprocessing on Linux.

Demystify RAM Usage in Multi-Process Data Loaders

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week