Author

Topic: [SOLVED] How to minimize size of blocks on disk in Linux (Read 469 times)

full member
Activity: 190
Merit: 100
do this by making soft (symbolic) links of the certain amount of oldest blocks

This worked beautifully. Thanks!
sr. member
Activity: 490
Merit: 389
Do not trust the government
I run Bitcoin-QT on an Ubuntu that's installed to a small SSD, & the blocks folder is on a larger HDD.

It's blocks folder is over 145GB & I'd like to be able to reduce that somehow. At first I looked into there being a way to compress individual folders like Windows can on NTFS, but brief Googling told me that's not a thing in linux.

Any tricks to do this?

There is no real way to efficiently compress it and used it as such, since if you do compress it, you will be spending some CPU power whenever you need to access it anyway, but the previous reply is also right, it won't compress much.

Are you asking this so you can fit the blockchain on the SSD?
If so, you could try instead of pruning it, to maybe put the older blocks on the HDD and newer ones on the SSD. That should speed things up for the most requested blocks. You could probably do this by making soft (symbolic) links of the certain amount of oldest blocks until you are comfortable with the amount of free space you have left on the SSD.

You can see more about creating symbolic links here https://en.wikipedia.org/wiki/Symbolic_link#POSIX_and_Unix-like_operating_systems
full member
Activity: 190
Merit: 100
The easiest thing to do is prune(.) You won't be contributing to the network as much since you will no longer be able to seed new nodes, but it depends on what you want to run your own node for.

Thanks for letting me know of that function. However I don't believe I'll be using it, as the whole point of running a node is to simply contribute a bit. If it gets considerably larger I'll either upgrade the size of the disk or just stop running it & delete the blocks.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
The blockchain doesn't compress very well so I'd advise against trying to compress the directory. The easiest thing to do is prune your blockchain which gives you a fixed size blockchain of only the latest blocks that fit into the size you specify. The smallest you can set it to is 550MB. You won't be contributing to the network as much since you will no longer be able to seed new nodes, but it depends on what you want to run your own node for. If it's only for your own security and wallet then you won't lose anything by pruning it. Set prune= in your bitcoin.conf to the size you want.
full member
Activity: 190
Merit: 100
I run Bitcoin-QT on an Ubuntu that's installed to a small SSD, & the blocks folder is on a larger HDD.

It's blocks folder is over 145GB & I'd like to be able to reduce that somehow. At first I looked into there being a way to compress individual folders like Windows can on NTFS, but brief Googling told me that's not a thing in linux.

Any tricks to do this?
Jump to: