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

feat: ELECTRS_ROCKSDB_WRITE_BUFFER_SIZE #975

Closed
wants to merge 1 commit into from
Closed

Conversation

dpc
Copy link

@dpc dpc commented Dec 13, 2023

In testing setups large write buffer sizes lead to large db files that potentially waste resources / interfere with CIs limits.

This change adds an ability to overwrite the default behavior

@dpc dpc force-pushed the master branch 3 times, most recently from befa21c to 2d899d9 Compare December 13, 2023 23:44
In testing setups large write buffer sizes lead to large
db files that potentially waste resources / interfere
with CIs limits.

This change adds an ability to overwrite the default behavior
@romanz
Copy link
Owner

romanz commented Dec 20, 2023

Thanks for opening this PR!

However, when testing on a single-block regtest instance:

[2023-12-20T19:49:08.486Z INFO  electrs::server] serving Electrum RPC on 127.0.0.1:60401
[2023-12-20T19:49:08.522Z INFO  electrs::db] "./db/regtest": 0 SST files, 0 GB, 0 Grows
[2023-12-20T19:49:08.527Z INFO  electrs::index] indexing 1 blocks: [1..1]
[2023-12-20T19:49:08.570Z INFO  electrs::chain] chain updated: tip=146494c9b151c581d322916d94a170aa7a1bf3e34f6de4d4cf6405af03f8af61, height=1
[2023-12-20T19:49:08.585Z INFO  electrs::db] starting config compaction
[2023-12-20T19:49:08.586Z INFO  electrs::db] starting headers compaction
[2023-12-20T19:49:08.587Z INFO  electrs::db] starting txid compaction
[2023-12-20T19:49:08.588Z INFO  electrs::db] starting funding compaction
[2023-12-20T19:49:08.589Z INFO  electrs::db] starting spending compaction
[2023-12-20T19:49:08.591Z INFO  electrs::db] finished full compaction

It seems that the existing settings result in a not-too-large DB:

$ du -sh db/regtest/
340K	db/regtest/

@dpc
Copy link
Author

dpc commented Dec 20, 2023

@romanz This is interesting. The behavior might have changed maybe between rocksdb versions? It does help with the esplora electrs fork.

Anyway, closing as it doesn't seem a problem anymore.

@dpc dpc closed this Dec 20, 2023
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.

2 participants