Adjust pool defaults for many core systems with undetected topologies.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -1987,8 +1987,7 @@ pub struct Config {
|
||||
/// Sets the number of worker threads in the frontend-pool of the database.
|
||||
/// This number should reflect the I/O capabilities of the system,
|
||||
/// such as the queue-depth or the number of simultaneous requests in
|
||||
/// flight. Defaults to 32 or four times the number of CPU cores, whichever
|
||||
/// is greater.
|
||||
/// flight. Defaults to 32 times the number of CPU cores.
|
||||
///
|
||||
/// Note: This value is only used if db_pool_affinity is disabled or not
|
||||
/// detected on the system, otherwise it is determined automatically.
|
||||
|
||||
@@ -69,7 +69,8 @@ pub(super) fn configure(server: &Arc<Server>) -> (Vec<usize>, Vec<usize>, Vec<us
|
||||
// The default worker count is masked-on if we didn't find better information.
|
||||
let default_worker_count = topology_detected
|
||||
.is_false()
|
||||
.then_some(config.db_pool_workers);
|
||||
.then_some(config.db_pool_workers)
|
||||
.map(|workers| workers.saturating_mul(num_cores));
|
||||
|
||||
// Sum the total number of possible tags. When no hardware detected this will
|
||||
// default to the default_worker_count. Note well that the thread-worker model
|
||||
|
||||
Reference in New Issue
Block a user