New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
temp2 file should not be copied if final dir on same volume #8847
Comments
I'd be happy to contribute a fix for this, but I'm having trouble finding where this copying is happening. Searching the code for "Copied" or "final file" has unexpectedly failed me. |
The current design is issuing a copy, if the folder is not the exact same for both tmp2 and destination, even if on the same volume - you could point tmp2 to the destination instead of a tmp folder to circumvent the final copy - it would then do a rename instead Ive labelled is as an enhancement request |
Thank you for the detail @loppefaaret Two questions, (1) is writing to tmp2 done any time other than writing what will be the final file? I could do as you suggest and set it to the final dir, but am curious if there is other writing to tmp2 during plotting, or just that final file. |
tmp2 is used for the resulting .plot file, it is build during phase 3 and indexed in phase 4 - no, no writing other than the resulting data takes place to tmp2 |
Thank you. If someone could direct me to where that existing decision is made, copy or rename (if in final directory already), I will work on a PR that will rename any plots that can be renamed instead of copied. |
please dont rip my head off if this is not the place, im not a dev, just support: chia-blockchain/chia/plotting/create_plots.py Line 144 in 8f3ea9c
|
Thanks. Looks right. But, looking there, I see the actual logic I want to change is in chiapos. So, I'll take this up over there. Thanks. |
Fix for this is in PR Chia-Network/chiapos#314 - if you know someone who can approve the workflows there @loppefaaret please do. |
This issue has not been updated in 14 days and is now flagged as stale. If this issue is still affecting you and in need of further review, please comment on it with an update to keep it from auto closing in 7 days. |
This issue was automatically closed because it has been flagged as stale, and subsequently passed 7 days with no further activity from the submitter or watchers. |
Discussed in #8846
Originally posted by cross October 16, 2021
In the less common case where temp dir, or at least temp2, is on the same filesystem as the final dir, rename should be used instead of copy. Using chia 1.2.7 on linux, I started a plot as follows:
On my system,
/data
is a large RAID array, so accepting the spindle contention, it's all on the same device. But at the end of this plot, I see:Unless I'm mistaken, the 1952 seconds spent copying the final file should've been a
rename
operation, which would also eliminate the removal of the temp2 file.The text was updated successfully, but these errors were encountered: