Add in a tunable option for object server threads_per_disk and tune default to recommendations from http://docs.openstack.org/developer/swift/deployment_guide.html#object-server-configuration

This commit is contained in:
Tom Haddon 2014-06-18 11:48:24 +01:00
parent ee219bdd38
commit 89cac18e1f
3 changed files with 11 additions and 0 deletions

View File

@ -55,3 +55,11 @@ options:
description: |
The CPU multiplier to use when configuring worker processes for the
account, container and object server processes.
object-server-threads-per-disk:
default: 4
type: int
description: |
Size of the per-disk thread pool used for performing disk I/O. 0 means
to not use a per-disk thread pool. It is recommended to keep this value
small, as large values can result in high read latencies due to large
queue depths. A good starting point is 4 threads per disk.

View File

@ -69,5 +69,7 @@ class SwiftStorageServerContext(OSContextGenerator):
'container_server_port': config('container-server-port'),
'object_server_port': config('object-server-port'),
'workers': psutil.NUM_CPUS * multiplier,
'object_server_threads_per_disk': config(
'object-server-threads-per-disk'),
}
return ctxt

View File

@ -12,6 +12,7 @@ recon_cache_path = /var/cache/swift
[app:object-server]
use = egg:swift#object
threads_per_disk = {{ object_server_threads_per_disk }}
[object-replicator]