-
Notifications
You must be signed in to change notification settings - Fork 0
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
Issue #2242 load checkpoints as stream #2243
base: main
Are you sure you want to change the base?
Conversation
|
Branch | users/richard/2242_load_checkpoints_as_stream |
Testbed | self-hosted |
Click to view all benchmark results
Benchmark | Latency | Benchmark Result milliseconds (ms) (Result Δ%) | Upper Boundary milliseconds (ms) (Limit %) |
---|---|---|---|
full-blocks-erc20-transfers/full-blocks-erc20-transfers | 📈 view plot 🚷 view threshold | 1,066.50 (-11.57%) | 1,594.86 (66.87%) |
full-blocks-evm-transfers/full-blocks-evm-transfers | 📈 view plot 🚷 view threshold | 440.30 (-7.66%) | 676.68 (65.07%) |
full-blocks-zil-transfers/full-blocks-zil-transfers | 📈 view plot 🚷 view threshold | 4,114.00 (+4.22%) | 5,178.23 (79.45%) |
process-empty/process-empty | 📈 view plot 🚷 view threshold | 10.32 (+12.33%) | 11.59 (89.09%) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can we rebase once #2244 is merged? Sorry for letting main break
zilliqa/src/db.rs
Outdated
let input = File::open(&temp_filename)?; | ||
|
||
let mut reader = BufReader::with_capacity(128 * 1024 * 1024, input); // 128 MiB read chunks | ||
let buf_reader: BufReader<File> = BufReader::new(File::open(input_filename)?); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recall @bzawisto deliberately changing the buffer size to 128 MiB at some point in the past. Any reason not to keep it?
let buf_reader: BufReader<File> = BufReader::new(File::open(input_filename)?); | |
let buf_reader = BufReader::with_capacity(128 * 1024 * 1024, File::open(input_filename)?); // 128 MiB read chunks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, though I don't think it's likely to particularly change anything any longer - a big BufReader probably helps when writing the result to disk but I'm not sure it helps much when reading, since the buffer cache will look ahead in any event. I did try to measure it, but restoring a mainnet checkpoint takes so long I gave up ... harmless, anyway, so done :-)
1c7f3b7
to
5522a8d
Compare
5522a8d
to
b4b7a60
Compare
Fix #2242