Skip to content

Reduce RAM usage: remove excess workers#118

Open
nikich340 wants to merge 1 commit into
jaywalnut310:mainfrom
nikich340:pr-dataloader
Open

Reduce RAM usage: remove excess workers#118
nikich340 wants to merge 1 commit into
jaywalnut310:mainfrom
nikich340:pr-dataloader

Conversation

@nikich340

Copy link
Copy Markdown

Leaving 8 workers lead to x8 times more RAM usage when preloading mel spectrograms, when it is not needed for single-process training.

@shivammehta25 shivammehta25 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't be added to the official codebase, generally, people want to benefit from multiprocessing.

@nikich340

Copy link
Copy Markdown
Author

It shouldn't be added to the official codebase, generally, people want to benefit from multiprocessing.

Have you looked into the commit? It changes hardcoded behaviour "I have 8 gpus, use 8 train loaders" to "I have N gpus, use N train loaders".
I am sure most of people using this repo don't have 8 gpus and so much RAM for useless loader copies.

@lexkoro

lexkoro commented Jun 13, 2023

Copy link
Copy Markdown

@nikich340 num_workers has nothing to do with the number of GPUs you have.

@nikich340

nikich340 commented Jun 14, 2023

Copy link
Copy Markdown
Author

@nikich340 num_workers has nothing to do with the number of GPUs you have.

Ok, then there still should be a way to check if user really needs this, when every worker uses 4 gb of ram and it overfits real memory, using swap file give no benefit at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants