On Mon, 2021-01-11 at 13:57 -0600, Richard Shaw wrote:
So from what I understand once a file is >0 that you can't set
nodatacow.
I'm playing around with cryptocurrency and the current one downloads the
whole blockchain and it's at 65GB and growing. I think the growing part is
the problem. That and it's being stored on /home which is a spinning disk
not an SSD like the system disk.
I'm seeing a lot of IO wait in glances and the system is sluggish even
though CPU and memory usage is relatively low.
Ideas?
You have to copy the file. I've just done something analogous with a
large VM image, following Chris Murphy's helpful suggestion. See the
recent thread on "Compression on Btrfs" (though the method has nothing
to do with compression as such).
If your file is Blockchain and lives in /some/path:
1) chattr +C /some/path ('lsattr -ld /some/path' to check)
2) cp Blockchain Blockchain.new (in my case I had to copy to another
device and back again owing to the size of the file).
3) rm Blockchain
4) mv Blockchain.new Blockchain
There may be a slicker way to do it but this does work.
poc