-
Notifications
You must be signed in to change notification settings - Fork 11.4k
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
[perf] Improve bench, and tweak db options #818
Conversation
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.
Left a few comments.
Are we sure we are not overfitting for a specific AWS instance?
@@ -158,24 +159,23 @@ impl ClientServerBenchmark { | |||
|
|||
let mut opts = Options::default(); | |||
opts.increase_parallelism(self.db_cpus as i32); | |||
let store = Arc::new(AuthorityStore::open(path, None)); | |||
opts.set_write_buffer_size(256 * 1024 * 1024); |
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.
Why these numbers specifically?
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.
The default is 64Mb and even my laptop has way more memory. Since the DB is currently our own store, we allow the memtables to be a little bigger to accommodate spikes.
sui/src/bench.rs
Outdated
let state = AuthorityState::new( | ||
committee.clone(), | ||
public_auth0, | ||
Arc::pin(secret_auth0), | ||
store, | ||
genesis::clone_genesis_compiled_modules(), | ||
&mut genesis::get_genesis_context(), | ||
) | ||
.await; | ||
|
||
state |
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.
let state = AuthorityState::new( | |
committee.clone(), | |
public_auth0, | |
Arc::pin(secret_auth0), | |
store, | |
genesis::clone_genesis_compiled_modules(), | |
&mut genesis::get_genesis_context(), | |
) | |
.await; | |
state | |
AuthorityState::new( | |
committee.clone(), | |
public_auth0, | |
Arc::pin(secret_auth0), | |
store, | |
genesis::clone_genesis_compiled_modules(), | |
&mut genesis::get_genesis_context(), | |
) | |
.await |
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.
Thanks, changed that!
@@ -20,6 +22,8 @@ pub type AuthorityStore = SuiDataStore<true>; | |||
#[allow(dead_code)] | |||
pub type ReplicaStore = SuiDataStore<false>; | |||
|
|||
const NUM_SHARDS: usize = 2048; |
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.
Is this optimised for the m5d.metal AWS machine?
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.
This is also used locally, and we have not optimized it much to be honest. Since we process (on laptop) about 10K-20K per second, I thought I should up this a little to reduce contention.
When possible I will add a benchmark client like this one: https://github.com/asonnino/fastpay/blob/extensions/benchmark_client/src/client.rs |
d5197e9
to
e7821af
Compare
a5f5e4b
to
2b3fbf0
Compare
…s#859 This enacts the reversion of MystenLabs#818
Batch execution with single execution adapter
Batch execution with single execution adapter
This PR contains the reasonable changes I made pre-GDC relating to tweaking the DB and improving the bench and perf:
On this PR on AWS (c5d.metal 48 physical cores) we do:
The
main
branch baseline is:And it is painfully slow to launch since the computation of certs / txs takes much longer than the bench.