gettxoutsetinfo giving two different disksize #14921

issue NicolasDorier opened this issue on December 11, 2018
  1. NicolasDorier commented at 11:06 AM on December 11, 2018: contributor

    I got surprised to see that the disk size of the txoutsetinfo on two different machine is different, is it normal?

    Node1:

    {
      "height": 553392,
      "bestblock": "000000000000000000296776e029f7f080f7fb5a6add661fa2833dee72e3ab5f",
      "transactions": 26313045,
      "txouts": 50178355,
      "bogosize": 3782162613,
      "hash_serialized_2": "a086c7291271916e2959d6efc107d5ea896df03d3f78ac83223c23d2909b8317",
      "disk_size": 2946125043,
      "total_amount": 17417229.82774740
    }
    

    Node2:

    {
      "height": 553392,
      "bestblock": "000000000000000000296776e029f7f080f7fb5a6add661fa2833dee72e3ab5f",
      "transactions": 26313045,
      "txouts": 50178355,
      "bogosize": 3782162613,
      "hash_serialized_2": "a086c7291271916e2959d6efc107d5ea896df03d3f78ac83223c23d2909b8317",
      "disk_size": 3048699532,
      "total_amount": 17417229.82774740
    }
    
  2. promag commented at 3:24 PM on December 11, 2018: member

    Internally this calls leveldb GetApproximateSizes, and from https://stackoverflow.com/a/19614759 looks like it doesn't account memory only keys.

  3. sipa commented at 8:01 PM on December 11, 2018: member

    Yes, it depends on various factors like exactly when flushes happened, when LevelDB decides to compact the database, configuration settings like dbcache.

    If you want a consistent number for size, look at the bogosize field (which has a well-defined meaning in function of the sizes of keys and values in the database, and is independent from actual disk usage).

  4. NicolasDorier closed this on Dec 12, 2018

  5. NicolasDorier commented at 4:11 AM on December 12, 2018: contributor

    Thanks

  6. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-24 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me