How much extra disk space does txindex=1 require?

4

For example for a 1 MB block, does the extra Tx index database take up another 100 kB on average?

And a follow-up: once my node has completed -reindex after setting txindex=1 can I COPY the blockchain AND the TX index database together to other nodes? I know the blockchain can be copied but I'm not sure if the new node needs to reindex the blockchain itself or if the index database copies over as well.

pinhead

Posted 2016-09-08T20:20:09.723

Reputation: 2 356

Answers

2

The total extra size is around 7GB as of november 2016. You can check by looking at the size of the $DATADIR/blocks/index directory.

If you copy that directory, you'll copy the index with it.

Pieter Wuille

Posted 2016-09-08T20:20:09.723

Reputation: 54 032

Update: 11GB as of may 2017. __ens 2017-05-08T15:25:36.070

Update: 21GB as of 2019-07-16.Vasil Toshkov 2019-07-16T11:12:18.800

1

I just reindexed after setting txindex=1. My data directory increased in size about 3GB, but it seems like it might be saving data in another location since moving the data directory to other nodes is asking me to reindex.

Shadouts

Posted 2016-09-08T20:20:09.723

Reputation: 121