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

[indexer]: backend database alternative #2439

Open
popcnt1 opened this issue Aug 15, 2024 · 1 comment
Open

[indexer]: backend database alternative #2439

popcnt1 opened this issue Aug 15, 2024 · 1 comment
Assignees
Labels
area::ideas Application or Feature ideas feature New feature optimize
Milestone

Comments

@popcnt1
Copy link
Collaborator

popcnt1 commented Aug 15, 2024

Background:

the mainnet data set is huge, in presnet, is about 0.3B items, and cost 180GB space for sqlite. Will sqlite works well with these size of data and continue supprts high qps?

@popcnt1 popcnt1 added optimize feature New feature area::ideas Application or Feature ideas labels Aug 15, 2024
@popcnt1 popcnt1 added this to the Rooch v0.7 milestone Aug 15, 2024
@popcnt1
Copy link
Collaborator Author

popcnt1 commented Aug 15, 2024

For sqlite:

p.s.

in rebuild process, sqlite handles well enough(cost 18000s for 0.3B items import):
rebuild.log

Test Result(After rebuild):

  1. bench1
rooch indexer bench -d ~/moe/rooch_data/indexer_rebuild/ -n main
2024-08-15T13:15:15.869524Z  INFO rooch::commands::indexer::commands::bench: indexer bench started
thread 'main' panicked at crates/rooch/src/commands/indexer/commands/bench.rs:47:10:
called `Result::unwrap()` on an `Err` value: Indexer async read SQLiteDB error: `deadline has elapsed`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

disk iostat:

util: 100% 6k-12k read/s, 300MB/s read

  1. bench2

For indexer built from 10M utxo + 3M inscription(16000029 items,8.5G space):

2024-08-15T20:09:13.320622Z  INFO rooch::commands::indexer::commands::bench: indexer bench started
\2024-08-15T20:09:16.654604Z  INFO rooch::commands::indexer::commands::bench: bench start for tx_order: 0, state_index: 10000140. init query cost: 3.333354632s
query: 8, avg_duration(ms): 2309.25
query: 8, avg_duration(ms): 2309.38
query: 8, avg_duration(ms): 2307.54
query: 8, avg_duration(ms): 2307.81
query: 8, avg_duration(ms): 2307.22
query: 8, avg_duration(ms): 2307.92
query: 8, avg_duration(ms): 2308.43
query: 8, avg_duration(ms): 2308.53
query: 8, avg_duration(ms): 2308.67
query: 8, avg_duration(ms): 2308.97
query: 8, avg_duration(ms): 2308.99
total query: 88, avg_duration(ms): 2308.99,
null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area::ideas Application or Feature ideas feature New feature optimize
Projects
Status: No status
Development

No branches or pull requests

3 participants