Bitcoin Forum
November 09, 2024, 05:49:38 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Data directory size vs. blockchain size  (Read 1461 times)
jondo (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
April 13, 2013, 09:40:11 PM
 #1

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?
Kluge
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1015



View Profile
April 13, 2013, 09:52:35 PM
 #2

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.)
PStone
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
April 13, 2013, 10:02:33 PM
 #3

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...
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1036



View Profile WWW
April 13, 2013, 10:52:23 PM
 #4

(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.
Kluge
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1015



View Profile
April 13, 2013, 10:58:38 PM
 #5

(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.
jondo (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
April 14, 2013, 08:59:25 AM
 #6

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!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!