Bitcoin Forum

Other => Beginners & Help => Topic started by: jondo on April 13, 2013, 09:40:11 PM



Title: Data directory size vs. blockchain size
Post by: jondo on April 13, 2013, 09:40:11 PM
Hi forum,

I am currently using bitcoin-qt from bitcoin-0.8.1-linux.tar.gz.
I am wondering why my data directory ".bitcoin" has a size (du -sh) of 9.7G, while the current blockchain size is only 6445 MB, according to http://blockchain.info/charts/blocks-size .

What's the size of your data directory?


Title: Re: Data directory size vs. blockchain size
Post by: Kluge on April 13, 2013, 09:52:35 PM
Old Bitcoin's blockchain format took up more space, I believe after skimming through my Roaming folder. blk1-4 + index in Bitcoin folder = 8.6gB. blk1-5 in "Blocks" folder shows 6.79gB. An additional 879mB is in rev.dat files, 32mB in Bitcoin->blocks->index folder, and 200mB in Bitcoin->chainstate folder. 16.6gB total, but I believe that's because I didn't do a truly clean install. Perhaps you have some of the old mixing with the new?

(sorry to thread-jack -- can I delete blk1-4 + blkindex in Bitcoin folder? I installed .8 on top of .6 without deleting that folder. SSD's down to 12.6gB free space, so removing waste would be nice.)


Title: Re: Data directory size vs. blockchain size
Post by: PStone on April 13, 2013, 10:02:33 PM
Hi forum,

I am currently using bitcoin-qt from bitcoin-0.8.1-linux.tar.gz.
I am wondering why my data directory ".bitcoin" has a size (du -sh) of 9.7G, while the current blockchain size is only 6445 MB, according to http://blockchain.info/charts/blocks-size .

What's the size of your data directory?


about the same...


Title: Re: Data directory size vs. blockchain size
Post by: deepceleron on April 13, 2013, 10:52:23 PM
(sorry to thread-jack -- can I delete blk1-4 + blkindex in Bitcoin folder? I installed .8 on top of .6 without deleting that folder. SSD's down to 12.6gB free space, so removing waste would be nice.)

You can remove blk0001.dat, blk0002.dat, blk0003.dat and blkindex.dat from the root data directory after a reindex is complete and you are caught up with the blockchain (and you don't plan on going back to an older version). Only blkindex should actually be using disk space, as the old BLK000x data are moved upon upgrade, and the blk000x.dat files you see there are hardlinks (shortcuts) on any filesystem that supports hardlinking.

The new database for v0.8.0+ is stored in two subdirectories, "blocks" (block data, with block id database in "blocks/index"), and "chainstate" (unspent output database). Do not mess with files in these subdirectories.

The current size of the blockchain database subdirectories is 7.83 GB, 6.76 GB of which is raw block data.


Title: Re: Data directory size vs. blockchain size
Post by: Kluge on April 13, 2013, 10:58:38 PM
(sorry to thread-jack -- can I delete blk1-4 + blkindex in Bitcoin folder? I installed .8 on top of .6 without deleting that folder. SSD's down to 12.6gB free space, so removing waste would be nice.)

You can remove blk0001.dat, blk0002.dat, blk0003.dat and blkindex.dat from the root data directory after a reindex is complete and you are caught up with the blockchain (and you don't plan on going back to an older version). Only blkindex should actually be using disk space, as the old BLK000x data are moved upon upgrade, and the blk000x.dat files you see there are hardlinks (shortcuts) on any filesystem that supports hardlinking.

The new database for v0.8.0+ is stored in two subdirectories, "blocks" (block data, with block id database in "blocks/index"), and "chainstate" (unspent output database). Do not mess with files in these subdirectories.
Thanks.


Title: Re: Data directory size vs. blockchain size
Post by: jondo on April 14, 2013, 08:59:25 AM
You can remove blk0001.dat, blk0002.dat, blk0003.dat and blkindex.dat from the root data directory after a reindex is complete and you are caught up with the blockchain (and you don't plan on going back to an older version). Only blkindex should actually be using disk space, as the old BLK000x data are moved upon upgrade, and the blk000x.dat files you see there are hardlinks (shortcuts) on any filesystem that supports hardlinking.

This answers my concerns about directory size. Thank you!