Novel idea for compressing existing Plots (Linux with fallocate/collapse_range) #14382
Replies: 3 comments 10 replies
-
The problem with trying to recompress existing plots is that all of Phase 3 needs to be re-run. It's not simple loading those tables and you're done. You have to decompress (speaking of FSE compression here) all of the tables, and re-compute all of them the same way you would do Phase 3. This makes it a very unattractive task as there's not much a gain to maintain a new partial-plotter codebase or modifying an existing one just for this, which is not a big win. I think time is best spent in a tool that makes it extremely easy for the user to replot their existing plots. |
Beta Was this translation helpful? Give feedback.
-
why would you compress already compressed? I have tried to compress plots, and it comes larger than the original plot thanks to compression algo overhead. |
Beta Was this translation helpful? Give feedback.
-
but that is not "compression" - they call it "bit dropping". They're basically shifting proofs to RAM/CPU. The question is whether there is any advantage for old farmers. Not to mention, converting/reploting of thousands of plots. |
Beta Was this translation helpful? Give feedback.
-
For my PB farm I would prefer to compress my existing plots and would like to present this novel idea, which would save time and energy.
Prerequisite: Plots stored on Linux using a filesystem capable of fallocate/ collapse_range, e.g. ext4 and XFS, perhaps others too. Google for "man fallocate"
Theory of operation
a) Read Table 1 in RAM (14GB)
b) Now read Table2 and overwrite it in place using the (compressed) bits from Table 1
-> Read 14GB and Write 14GB chunkwise
c) Call fallocate() so the filesystem gets rid of diskspace for Table 1, the plot file then starts with Table 2
d) Read and Write parts of C1,C2 and C3 to rearrange absolute file pointers as needed. The read/writes should be marginal
e) Finished
That would use marginal CPU power and 28GB Read + 14GB Write per Plot
Please let me know what you think about this idea?
Beta Was this translation helpful? Give feedback.
All reactions