This add chunk_size related parameters for proxy-server and object-server.
New parameters for proxy class are object_chunk_size and client_chunk_size, and for storage class: network_chunk_size, disk_chunk_size and auditor_disk_chunk_size. Change-Id: If2bbc9cea1f6e0959fd67d2e004b607a8e40beee
This commit is contained in:
@@ -65,6 +65,14 @@
|
|||||||
# (optional) If True, the proxy will log whenever it has to failover to a handoff node
|
# (optional) If True, the proxy will log whenever it has to failover to a handoff node
|
||||||
# Defaults to true.
|
# Defaults to true.
|
||||||
#
|
#
|
||||||
|
# [*object_chunk_size*]
|
||||||
|
# (optional) Chunk size to read from object servers.
|
||||||
|
# Default to 65536.
|
||||||
|
#
|
||||||
|
# [*client_chunk_size*]
|
||||||
|
# (optional) Chunk size to read from clients.
|
||||||
|
# Default to 65536.
|
||||||
|
#
|
||||||
# [*max_containers_per_account*]
|
# [*max_containers_per_account*]
|
||||||
# (optional) If set to a positive value, will limit container number per account.
|
# (optional) If set to a positive value, will limit container number per account.
|
||||||
# Default to 0.
|
# Default to 0.
|
||||||
@@ -158,6 +166,8 @@ class swift::proxy(
|
|||||||
$log_name = 'proxy-server',
|
$log_name = 'proxy-server',
|
||||||
$cors_allow_origin = undef,
|
$cors_allow_origin = undef,
|
||||||
$strict_cors_mode = true,
|
$strict_cors_mode = true,
|
||||||
|
$object_chunk_size = 65536,
|
||||||
|
$client_chunk_size = 65536,
|
||||||
$max_containers_per_account = 0,
|
$max_containers_per_account = 0,
|
||||||
$max_containers_whitelist = $::os_service_default,
|
$max_containers_whitelist = $::os_service_default,
|
||||||
$read_affinity = undef,
|
$read_affinity = undef,
|
||||||
@@ -235,6 +245,8 @@ class swift::proxy(
|
|||||||
'app:proxy-server/set log_level': value => $log_level;
|
'app:proxy-server/set log_level': value => $log_level;
|
||||||
'app:proxy-server/set log_address': value => $log_address;
|
'app:proxy-server/set log_address': value => $log_address;
|
||||||
'app:proxy-server/log_handoffs': value => $log_handoffs;
|
'app:proxy-server/log_handoffs': value => $log_handoffs;
|
||||||
|
'app:proxy-server/object_chunk_size': value => $object_chunk_size;
|
||||||
|
'app:proxy-server/client_chunk_size': value => $client_chunk_size;
|
||||||
'app:proxy-server/allow_account_management': value => $allow_account_management;
|
'app:proxy-server/allow_account_management': value => $allow_account_management;
|
||||||
'app:proxy-server/account_autocreate': value => $account_autocreate;
|
'app:proxy-server/account_autocreate': value => $account_autocreate;
|
||||||
'app:proxy-server/max_containers_per_account': value => $max_containers_per_account;
|
'app:proxy-server/max_containers_per_account': value => $max_containers_per_account;
|
||||||
|
@@ -143,6 +143,18 @@
|
|||||||
# (optional) Prefix for data being sent to statsd.
|
# (optional) Prefix for data being sent to statsd.
|
||||||
# Defaults to ''
|
# Defaults to ''
|
||||||
#
|
#
|
||||||
|
# [*network_chunk_size*]
|
||||||
|
# (optional) Size of chunks to read/write over the network.
|
||||||
|
# Defaults to 65536.
|
||||||
|
#
|
||||||
|
# [*disk_chunk_size*]
|
||||||
|
# (optional) Size of chunks to read/write to disk.
|
||||||
|
# Defaults to 65536.
|
||||||
|
#
|
||||||
|
# [*auditor_disk_chunk_size*]
|
||||||
|
# (optional) Object-auditor size of chunks to read/write to disk.
|
||||||
|
# Defaults to undef.
|
||||||
|
#
|
||||||
# [*splice*]
|
# [*splice*]
|
||||||
# (optional) Use splice for zero-copy object GETs. This requires Linux Kernel
|
# (optional) Use splice for zero-copy object GETs. This requires Linux Kernel
|
||||||
# version 3.0 or greater.
|
# version 3.0 or greater.
|
||||||
@@ -181,6 +193,9 @@ define swift::storage::server(
|
|||||||
$log_statsd_default_sample_rate = '1.0',
|
$log_statsd_default_sample_rate = '1.0',
|
||||||
$log_statsd_sample_rate_factor = '1.0',
|
$log_statsd_sample_rate_factor = '1.0',
|
||||||
$log_statsd_metric_prefix = '',
|
$log_statsd_metric_prefix = '',
|
||||||
|
$network_chunk_size = 65536,
|
||||||
|
$disk_chunk_size = 65536,
|
||||||
|
$auditor_disk_chunk_size = undef,
|
||||||
$splice = false,
|
$splice = false,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
On proxy class, added two new parameters object_chunk_size and
|
||||||
|
client_chunk_size, that can be used to configure chunk size to
|
||||||
|
read from object servers and from clients side.
|
||||||
|
On storage::server class, added three new parameters network_chunk_size,
|
||||||
|
disk_chunk_size and auditor_disk_chunk_size, that can be used to
|
||||||
|
configure chunk size to read/write over the network and to the disk.
|
@@ -63,6 +63,8 @@ describe 'swift::proxy' do
|
|||||||
it { should contain_swift_proxy_config('app:proxy-server/set log_level').with_value('INFO') }
|
it { should contain_swift_proxy_config('app:proxy-server/set log_level').with_value('INFO') }
|
||||||
it { should contain_swift_proxy_config('app:proxy-server/set log_address').with_value('/dev/log') }
|
it { should contain_swift_proxy_config('app:proxy-server/set log_address').with_value('/dev/log') }
|
||||||
it { should contain_swift_proxy_config('app:proxy-server/log_handoffs').with_value('true') }
|
it { should contain_swift_proxy_config('app:proxy-server/log_handoffs').with_value('true') }
|
||||||
|
it { should contain_swift_proxy_config('app:proxy-server/object_chunk_size').with_value('65536') }
|
||||||
|
it { should contain_swift_proxy_config('app:proxy-server/client_chunk_size').with_value('65536') }
|
||||||
it { should contain_swift_proxy_config('app:proxy-server/allow_account_management').with_value('true') }
|
it { should contain_swift_proxy_config('app:proxy-server/allow_account_management').with_value('true') }
|
||||||
it { should contain_swift_proxy_config('app:proxy-server/account_autocreate').with_value('true') }
|
it { should contain_swift_proxy_config('app:proxy-server/account_autocreate').with_value('true') }
|
||||||
it { should contain_swift_proxy_config('app:proxy-server/max_containers_per_account').with_value(0) }
|
it { should contain_swift_proxy_config('app:proxy-server/max_containers_per_account').with_value(0) }
|
||||||
@@ -106,6 +108,8 @@ describe 'swift::proxy' do
|
|||||||
:account_autocreate => false,
|
:account_autocreate => false,
|
||||||
:log_level => 'DEBUG',
|
:log_level => 'DEBUG',
|
||||||
:log_name => 'swift-proxy-server',
|
:log_name => 'swift-proxy-server',
|
||||||
|
:object_chunk_size => '8192',
|
||||||
|
:client_chunk_size => '8192',
|
||||||
:max_containers_per_account => 10,
|
:max_containers_per_account => 10,
|
||||||
:max_containers_whitelist => 'project1,project2',
|
:max_containers_whitelist => 'project1,project2',
|
||||||
:read_affinity => 'r1z1=100, r1=200',
|
:read_affinity => 'r1z1=100, r1=200',
|
||||||
@@ -136,6 +140,8 @@ describe 'swift::proxy' do
|
|||||||
it { should contain_swift_proxy_config('app:proxy-server/set log_level').with_value('DEBUG') }
|
it { should contain_swift_proxy_config('app:proxy-server/set log_level').with_value('DEBUG') }
|
||||||
it { should contain_swift_proxy_config('app:proxy-server/set log_address').with_value('/dev/log') }
|
it { should contain_swift_proxy_config('app:proxy-server/set log_address').with_value('/dev/log') }
|
||||||
it { should contain_swift_proxy_config('app:proxy-server/log_handoffs').with_value('true') }
|
it { should contain_swift_proxy_config('app:proxy-server/log_handoffs').with_value('true') }
|
||||||
|
it { should contain_swift_proxy_config('app:proxy-server/object_chunk_size').with_value('8192') }
|
||||||
|
it { should contain_swift_proxy_config('app:proxy-server/client_chunk_size').with_value('8192') }
|
||||||
it { should contain_swift_proxy_config('app:proxy-server/allow_account_management').with_value('false') }
|
it { should contain_swift_proxy_config('app:proxy-server/allow_account_management').with_value('false') }
|
||||||
it { should contain_swift_proxy_config('app:proxy-server/account_autocreate').with_value('false') }
|
it { should contain_swift_proxy_config('app:proxy-server/account_autocreate').with_value('false') }
|
||||||
it { should contain_swift_proxy_config('app:proxy-server/max_containers_per_account').with_value(10) }
|
it { should contain_swift_proxy_config('app:proxy-server/max_containers_per_account').with_value(10) }
|
||||||
|
@@ -17,13 +17,15 @@ log_udp_host = <%= @log_udp_host -%>
|
|||||||
log_udp_port = <%= @log_udp_port -%>
|
log_udp_port = <%= @log_udp_port -%>
|
||||||
<% end %>
|
<% end %>
|
||||||
workers = <%= @workers %>
|
workers = <%= @workers %>
|
||||||
<%- if @statsd_enabled -%>
|
<% if @statsd_enabled -%>
|
||||||
log_statsd_host = <%=@log_statsd_host%>
|
log_statsd_host = <%=@log_statsd_host%>
|
||||||
log_statsd_port = <%=@log_statsd_port%>
|
log_statsd_port = <%=@log_statsd_port%>
|
||||||
log_statsd_default_sample_rate = <%=@log_statsd_default_sample_rate%>
|
log_statsd_default_sample_rate = <%=@log_statsd_default_sample_rate%>
|
||||||
log_statsd_sample_rate_factor = <%=@log_statsd_sample_rate_factor%>
|
log_statsd_sample_rate_factor = <%=@log_statsd_sample_rate_factor%>
|
||||||
log_statsd_metric_prefix = <%=@log_statsd_metric_prefix%>
|
log_statsd_metric_prefix = <%=@log_statsd_metric_prefix%>
|
||||||
<%- end -%>
|
<% end -%>
|
||||||
|
network_chunk_size = <%= @network_chunk_size%>
|
||||||
|
disk_chunk_size = <%= @disk_chunk_size%>
|
||||||
|
|
||||||
[pipeline:main]
|
[pipeline:main]
|
||||||
pipeline = <%= @pipeline.to_a.join(' ') %>
|
pipeline = <%= @pipeline.to_a.join(' ') %>
|
||||||
@@ -44,5 +46,8 @@ concurrency = <%= @replicator_concurrency %>
|
|||||||
concurrency = <%= @updater_concurrency %>
|
concurrency = <%= @updater_concurrency %>
|
||||||
|
|
||||||
[object-auditor]
|
[object-auditor]
|
||||||
|
<% if @auditor_disk_chunk_size -%>
|
||||||
|
disk_chunk_size = <%= @auditor_disk_chunk_size %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
[object-reconstructor]
|
[object-reconstructor]
|
||||||
|
Reference in New Issue
Block a user