maded2 / plotng

PlotNG - plotting utility for Chia.Net
Apache License 2.0
128 stars 24 forks source link

TempDirectory concurrency limits #44

Closed ayebear closed 3 years ago

ayebear commented 3 years ago

Currently, it seems that plotng round-robins the specified temp directories for each new plot process. Since the temp directories might be on drives with different amounts of free space, this can lead to incorrect numbers of parallel plots per drive. One possible solution is to have a parallel array in the config:

...
"NumberOfParallelPlots": 10,
"TempDirectory": ["/mnt/2tb", "/mnt/1tb"],
"TempDirectoryLimits": [7, 3],
...

Or, re-structure the config similar to how plotman allows specifying tmp_overrides options. I can help make these changes but want to make sure you like the design/config structure first.

Edit: MaxActivePlotPerTemp seems like a good start, but this still requires all the temp dirs to have the same free space.

maded2 commented 3 years ago

My recommendation is to create subdirs in each drive to reflect on the number of plots you want for that drive. Then set the MaxActivePlotPerTemp = 1. In your example, I would do this.

Create sub directories

/mnt/2tb/1
/mnt/2tb/2
/mnt/2tb/3
/mnt/2tb/4
/mnt/2tb/5
/mnt/2tb/6
/mnt/2tb/7
/mnt/1tb/1
/mnt/1tb/2
/mnt/1tb/3