Add object_server_mb_per_sync

The default mb_per_sync value of Swift leads to adding a lot of
latencies when transfering to an object store. This patch adds
the possibility to override this value for object store (it is
less relevant for other backend which rarely will reach the
cache size anyway). According to our tests, a value of 16 MB
is very good in production.

Change-Id: Id379d4221bc7e2a0c16125b97140e39b7726fd02
This commit is contained in:
Thomas Goirand 2020-03-09 14:39:45 +01:00
parent de7eb6fff1
commit 3b4e562faf
3 changed files with 21 additions and 9 deletions

View File

@ -109,6 +109,10 @@
# (optional) Number of account server workers.
# Defaults to $::os_workers.
#
# [*object_server_mb_per_sync*]
# (optional) Number of MB allocated for the cache.
# Defaults to 512, which is the swift default value.
#
# [*splice*]
# (optional) Use splice for zero-copy object GETs. This requires Linux Kernel
# version 3.0 or greater.
@ -141,6 +145,7 @@ class swift::storage::all(
$account_server_workers = $::os_workers,
$container_server_workers = $::os_workers,
$object_server_workers = $::os_workers,
$object_server_mb_per_sync = 512,
$splice = false,
) {
@ -201,14 +206,15 @@ class swift::storage::all(
}
swift::storage::server { $object_port:
type => 'object',
config_file_path => 'object-server.conf',
pipeline => $object_pipeline,
log_facility => $log_facility,
log_requests => $log_requests,
incoming_chmod => $incoming_chmod,
outgoing_chmod => $outgoing_chmod,
workers => $object_server_workers,
splice => $splice,
type => 'object',
config_file_path => 'object-server.conf',
pipeline => $object_pipeline,
log_facility => $log_facility,
log_requests => $log_requests,
incoming_chmod => $incoming_chmod,
outgoing_chmod => $outgoing_chmod,
workers => $object_server_workers,
splice => $splice,
object_server_mb_per_sync => $object_server_mb_per_sync,
}
}

View File

@ -164,6 +164,10 @@
# version 3.0 or greater.
# Defaults to false.
#
# [*object_server_mb_per_sync*]
# (optional) Number of MB allocated for the cache.
# Defaults to 512, which is the swift default value.
#
define swift::storage::server(
$type,
$storage_local_net_ip,
@ -202,6 +206,7 @@ define swift::storage::server(
$disk_chunk_size = 65536,
$auditor_disk_chunk_size = undef,
$splice = false,
$object_server_mb_per_sync = 512,
) {
include swift::deps

View File

@ -38,6 +38,7 @@ set log_level = <%= @log_level %>
set log_requests = <%= @log_requests %>
set log_address = <%= @log_address %>
splice = <%= @splice %>
mb_per_sync = <%= @object_server_mb_per_sync %>
[object-replicator]
concurrency = <%= @replicator_concurrency %>