Dear @mrshenli,forgive me for not being clear,I said it consumes 30GB which means the cache
consumes 30GB.I guess the memory is used to load the disk data.I tried to use a small datasets
which only contains 40 samples(Every sample is 16MB).And in this case,the cache consumption is about 2.5GB.However,the memory problem still exist.You can see this picture:

Now I think the problem is not caused by dataloader.
And you say DDP’s memory footprint should be constant,regardless of how many nodes are used.I test the maximum memory footprint as the nodes expand,it just like this
node-memory1366×401 5.92 KB
The memory footprint does not include the cache consumption.
And when I test the memory footprint about 32 nodes,I found a memory allocated error which indicates the memory has run out.