If you are lazily loading the data, only 2*num_workers*batch_size will be loaded into the RAM. The rest will stay on the drive. You can check the shape of a batch size and calculate the needed RAM manually using the data type of your tensors.