@@ -18,6 +18,8 @@ pub struct DefaultThreadArgs {
18
18
pub rayon_global_threads : String ,
19
19
pub replay_forks_threads : String ,
20
20
pub replay_transactions_threads : String ,
21
+ pub rocksdb_compaction_threads : String ,
22
+ pub rocksdb_flush_threads : String ,
21
23
pub tvu_receive_threads : String ,
22
24
pub tvu_sigverify_threads : String ,
23
25
}
@@ -36,6 +38,8 @@ impl Default for DefaultThreadArgs {
36
38
replay_forks_threads : ReplayForksThreadsArg :: bounded_default ( ) . to_string ( ) ,
37
39
replay_transactions_threads : ReplayTransactionsThreadsArg :: bounded_default ( )
38
40
. to_string ( ) ,
41
+ rocksdb_compaction_threads : RocksdbCompactionThreadsArg :: bounded_default ( ) . to_string ( ) ,
42
+ rocksdb_flush_threads : RocksdbFlushThreadsArg :: bounded_default ( ) . to_string ( ) ,
39
43
tvu_receive_threads : TvuReceiveThreadsArg :: bounded_default ( ) . to_string ( ) ,
40
44
tvu_sigverify_threads : TvuShredSigverifyThreadsArg :: bounded_default ( ) . to_string ( ) ,
41
45
}
@@ -52,6 +56,8 @@ pub fn thread_args<'a>(defaults: &DefaultThreadArgs) -> Vec<Arg<'_, 'a>> {
52
56
new_thread_arg:: <RayonGlobalThreadsArg >( & defaults. rayon_global_threads) ,
53
57
new_thread_arg:: <ReplayForksThreadsArg >( & defaults. replay_forks_threads) ,
54
58
new_thread_arg:: <ReplayTransactionsThreadsArg >( & defaults. replay_transactions_threads) ,
59
+ new_thread_arg:: <RocksdbCompactionThreadsArg >( & defaults. rocksdb_compaction_threads) ,
60
+ new_thread_arg:: <RocksdbFlushThreadsArg >( & defaults. rocksdb_flush_threads) ,
55
61
new_thread_arg:: <TvuReceiveThreadsArg >( & defaults. tvu_receive_threads) ,
56
62
new_thread_arg:: <TvuShredSigverifyThreadsArg >( & defaults. tvu_sigverify_threads) ,
57
63
]
@@ -77,6 +83,8 @@ pub struct NumThreadConfig {
77
83
pub rayon_global_threads : NonZeroUsize ,
78
84
pub replay_forks_threads : NonZeroUsize ,
79
85
pub replay_transactions_threads : NonZeroUsize ,
86
+ pub rocksdb_compaction_threads : NonZeroUsize ,
87
+ pub rocksdb_flush_threads : NonZeroUsize ,
80
88
pub tvu_receive_threads : NonZeroUsize ,
81
89
pub tvu_sigverify_threads : NonZeroUsize ,
82
90
}
@@ -119,6 +127,16 @@ pub fn parse_num_threads_args(matches: &ArgMatches) -> NumThreadConfig {
119
127
ReplayTransactionsThreadsArg :: NAME ,
120
128
NonZeroUsize
121
129
) ,
130
+ rocksdb_compaction_threads : value_t_or_exit ! (
131
+ matches,
132
+ RocksdbCompactionThreadsArg :: NAME ,
133
+ NonZeroUsize
134
+ ) ,
135
+ rocksdb_flush_threads : value_t_or_exit ! (
136
+ matches,
137
+ RocksdbFlushThreadsArg :: NAME ,
138
+ NonZeroUsize
139
+ ) ,
122
140
tvu_receive_threads : value_t_or_exit ! ( matches, TvuReceiveThreadsArg :: NAME , NonZeroUsize ) ,
123
141
tvu_sigverify_threads : value_t_or_exit ! (
124
142
matches,
@@ -257,6 +275,28 @@ impl ThreadArg for ReplayTransactionsThreadsArg {
257
275
}
258
276
}
259
277
278
+ struct RocksdbCompactionThreadsArg ;
279
+ impl ThreadArg for RocksdbCompactionThreadsArg {
280
+ const NAME : & ' static str = "rocksdb_compaction_threads" ;
281
+ const LONG_NAME : & ' static str = "rocksdb-compaction-threads" ;
282
+ const HELP : & ' static str = "Number of threads to use for rocksdb (Blockstore) compactions" ;
283
+
284
+ fn default ( ) -> usize {
285
+ solana_ledger:: blockstore:: default_num_compaction_threads ( ) . get ( )
286
+ }
287
+ }
288
+
289
+ struct RocksdbFlushThreadsArg ;
290
+ impl ThreadArg for RocksdbFlushThreadsArg {
291
+ const NAME : & ' static str = "rocksdb_flush_threads" ;
292
+ const LONG_NAME : & ' static str = "rocksdb-flush-threads" ;
293
+ const HELP : & ' static str = "Number of threads to use for rocksdb (Blockstore) memtable flushes" ;
294
+
295
+ fn default ( ) -> usize {
296
+ solana_ledger:: blockstore:: default_num_flush_threads ( ) . get ( )
297
+ }
298
+ }
299
+
260
300
struct TvuReceiveThreadsArg ;
261
301
impl ThreadArg for TvuReceiveThreadsArg {
262
302
const NAME : & ' static str = "tvu_receive_threads" ;
0 commit comments