Skip to content

Commit

Permalink
Revert "thread tuning"
Browse files Browse the repository at this point in the history
This reverts commit 474f6c1.
  • Loading branch information
sitalkedia committed Sep 22, 2023
1 parent 474f6c1 commit f56bc1a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion aptos-move/aptos-vm/src/aptos_vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ impl AptosVM {
/// Sets the # of async proof reading threads.
pub fn set_num_proof_reading_threads_once(mut num_threads: usize) {
// TODO(grao): Do more analysis to tune this magic number.
num_threads = min(num_threads, 16);
num_threads = min(num_threads, 256);
// Only the first call succeeds, due to OnceCell semantics.
NUM_PROOF_READING_THREADS.set(num_threads).ok();
}
Expand Down
3 changes: 1 addition & 2 deletions aptos-move/aptos-vm/src/block_executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,9 @@ pub struct BlockAptosVM();

impl BlockAptosVM {
fn verify_transactions(transactions: Vec<Transaction>) -> Vec<PreprocessedTransaction> {
let len = transactions.len();
transactions
.into_par_iter()
.with_min_len(len / 64)
.with_min_len(25)
.map(preprocess_transaction::<AptosVM>)
.collect()
}
Expand Down
2 changes: 1 addition & 1 deletion config/src/config/execution_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl Default for ExecutionConfig {
genesis_file_location: PathBuf::new(),
// Parallel execution by default.
concurrency_level: 8,
num_proof_reading_threads: 16,
num_proof_reading_threads: 32,
paranoid_type_verification: true,
paranoid_hot_potato_verification: true,
processed_transactions_detailed_counters: false,
Expand Down
3 changes: 1 addition & 2 deletions storage/aptosdb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,10 +1071,9 @@ impl AptosDB {
.with_label_values(&["commit_events"])
.start_timer();
let batch = SchemaBatch::new();
let len = txns_to_commit.len();
txns_to_commit
.par_iter()
.with_min_len(len / 64)
.with_min_len(128)
.enumerate()
.try_for_each(|(i, txn_to_commit)| -> Result<()> {
self.event_store.put_events(
Expand Down

0 comments on commit f56bc1a

Please sign in to comment.