increase default db pool worker count for large systems
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
513236b3ce
commit
c2d97aaa5e
2 changed files with 5 additions and 3 deletions
|
@ -1341,7 +1341,8 @@
|
||||||
# Sets the number of worker threads in the frontend-pool of the database.
|
# Sets the number of worker threads in the frontend-pool of the database.
|
||||||
# This number should reflect the I/O capabilities of the system,
|
# This number should reflect the I/O capabilities of the system,
|
||||||
# specifically the queue-depth or the number of simultaneous requests in
|
# specifically the queue-depth or the number of simultaneous requests in
|
||||||
# flight. Defaults to 32 or number of CPU cores, whichever is greater.
|
# flight. Defaults to 32 or four times the number of CPU cores, whichever
|
||||||
|
# is greater.
|
||||||
#
|
#
|
||||||
#db_pool_workers = 32
|
#db_pool_workers = 32
|
||||||
|
|
||||||
|
|
|
@ -1503,7 +1503,8 @@ pub struct Config {
|
||||||
/// Sets the number of worker threads in the frontend-pool of the database.
|
/// Sets the number of worker threads in the frontend-pool of the database.
|
||||||
/// This number should reflect the I/O capabilities of the system,
|
/// This number should reflect the I/O capabilities of the system,
|
||||||
/// specifically the queue-depth or the number of simultaneous requests in
|
/// specifically the queue-depth or the number of simultaneous requests in
|
||||||
/// flight. Defaults to 32 or number of CPU cores, whichever is greater.
|
/// flight. Defaults to 32 or four times the number of CPU cores, whichever
|
||||||
|
/// is greater.
|
||||||
/// default: 32
|
/// default: 32
|
||||||
#[serde(default = "default_db_pool_workers")]
|
#[serde(default = "default_db_pool_workers")]
|
||||||
pub db_pool_workers: usize,
|
pub db_pool_workers: usize,
|
||||||
|
@ -2280,6 +2281,6 @@ fn parallelism_scaled(val: usize) -> usize { val.saturating_mul(sys::available_p
|
||||||
|
|
||||||
fn default_trusted_server_batch_size() -> usize { 256 }
|
fn default_trusted_server_batch_size() -> usize { 256 }
|
||||||
|
|
||||||
fn default_db_pool_workers() -> usize { sys::available_parallelism().max(32) }
|
fn default_db_pool_workers() -> usize { sys::available_parallelism().saturating_mul(4).max(32) }
|
||||||
|
|
||||||
fn default_db_pool_queue_size() -> usize { sys::available_parallelism().saturating_mul(8).max(256) }
|
fn default_db_pool_queue_size() -> usize { sys::available_parallelism().saturating_mul(8).max(256) }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue