Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase default maximum index size for non-regtest chains #448

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

casey
Copy link
Collaborator

@casey casey commented Sep 2, 2022

The ordinal index, stored in <ORD_DATA_DIR>/index.redb, is a redb
database, which grows dynamically. However, the maximum size that the
database can grow to must be declared up-front, to avoid expensive
region allocation operations on insert. We've been using 10 MiB as the
default index size, which is too small for anything but testing.

This commit changes the default maximum index size to 1 TiB on mainnet,
testnet, and signet, and leaves it at 10 MiB on regtest. 1 TiB is more
than needed, as even the mainnet database is only ~50 GiB, but
allocating a database is fast enough, so it doesn't hurt to over
provision and not have to think about it. For testing though, which is
done with --chain=regtest, we want database allocation is fast, and 10
MiB is more than enough.

The ordinal index, stored in <ORD_DATA_DIR>/index.redb, is a redb
database, which grows dynamically. However, the maximum size that the
database can grow to must be declared up-front, to avoid expensive
region allocation operations on insert. We've been using 10 MiB as the
default index size, which is too small for anything but testing.

This commit changes the default maximum index size to 1 TiB on mainnet,
testnet, and signet, and leaves it at 10 MiB on regtest. 1 TiB is more
than needed, as even the mainnet database is only ~50 GiB, but
allocating a database is fast enough, so it doesn't hurt to over
provision and not have to think about it. For testing though, which is
done with `--chain=regtest`, we want database allocation is fast, and 10
MiB is more than enough.
@casey casey merged commit 3e50a3f into master Sep 2, 2022
@casey casey deleted the increase-non-regtest-max-database-size branch September 2, 2022 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant