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

Issue #2242 load checkpoints as stream #2243

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rrw-zilliqa
Copy link
Contributor

Fix #2242

Copy link
Contributor

github-actions bot commented Jan 29, 2025

🐰 Bencher Report

Branchusers/richard/2242_load_checkpoints_as_stream
Testbedself-hosted
Click to view all benchmark results
BenchmarkLatencyBenchmark 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%)
🐰 View full continuous benchmarking report in Bencher

@rrw-zilliqa rrw-zilliqa enabled auto-merge January 29, 2025 15:19
Copy link
Contributor

@JamesHinshelwood JamesHinshelwood left a 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/benches/it.rs Show resolved Hide resolved
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)?);
Copy link
Contributor

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?

Suggested change
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

Copy link
Contributor Author

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 :-)

@rrw-zilliqa rrw-zilliqa force-pushed the users/richard/2242_load_checkpoints_as_stream branch from 1c7f3b7 to 5522a8d Compare February 6, 2025 12:37
@rrw-zilliqa rrw-zilliqa force-pushed the users/richard/2242_load_checkpoints_as_stream branch from 5522a8d to b4b7a60 Compare February 8, 2025 16:45
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.

Stream decompress checkpoints
2 participants