10.3. Object server configuration
Find an example object server configuration at
etc/object-server.conf-sample
in the source code repository.
The available configuration options are:
Configuration option = Default value | Description |
---|---|
backlog = 4096
|
Maximum number of allowed pending TCP connections |
bind_ip = 0.0.0.0
|
IP Address for server to bind to |
bind_port = 6000
|
Port for server to bind to |
bind_timeout = 30
|
Seconds to attempt bind before giving up |
client_timeout = 60
|
Timeout to read one chunk from a client external services |
conn_timeout = 0.5
|
Connection timeout to external services |
devices = /srv/node
|
Parent directory of where devices are mounted |
disable_fallocate = false
|
Disable "fast fail" fallocate checks if the underlying filesystem does not support it. |
disk_chunk_size = 65536
|
Size of chunks to read/write to disk |
eventlet_debug = false
|
If true, turn on debug logging for eventlet |
expiring_objects_account_name = expiring_objects
|
No help text available for this option. |
expiring_objects_container_divisor = 86400
|
No help text available for this option. |
fallocate_reserve = 0
|
You can set fallocate_reserve to the number of bytes you'd like fallocate to reserve, whether there is space for the given file size or not. This is useful for systems that behave badly when they completely run out of space; you can make the services pretend they're out of space early. server. For most cases, this should be `egg:swift#object`. |
log_address = /dev/log
|
Location where syslog sends the logs to |
log_custom_handlers =
|
Comma-separated list of functions to call to setup custom log handlers. |
log_facility = LOG_LOCAL0
|
Syslog log facility |
log_level = INFO
|
Logging level |
log_max_line_length = 0
|
Caps the length of log lines to the value given; no limit if set to 0, the default. |
log_name = swift
|
Label used when logging |
log_statsd_default_sample_rate = 1.0
|
Defines the probability of sending a sample for any given event or timing measurement. |
log_statsd_host = localhost
|
If not set, the StatsD feature is disabled. |
log_statsd_metric_prefix =
|
Value will be prepended to every metric sent to the StatsD server. |
log_statsd_port = 8125
|
Port value for the StatsD server. |
log_statsd_sample_rate_factor = 1.0
|
Not recommended to set this to a value less than 1.0, if frequency of logging is too high, tune the log_statsd_default_sample_rate instead. |
log_udp_host =
|
If not set, the UDP receiver for syslog is disabled. |
log_udp_port = 514
|
Port value for UDP receiver, if enabled. |
max_clients = 1024
|
Maximum number of clients one worker can process simultaneously Lowering the number of clients handled per worker, and raising the number of workers can lessen the impact that a CPU intensive, or blocking, request can have on other requests served by the same worker. If the maximum number of clients is set to one, then a given worker will not perform another call while processing, allowing other workers a chance to process it. |
mount_check = true
|
Whether or not check if the devices are mounted to prevent accidentally writing to the root device |
network_chunk_size = 65536
|
Size of chunks to read/write over the network |
node_timeout = 3
|
Request timeout to external services |
swift_dir = /etc/swift
|
Swift configuration directory |
user = swift
|
User to run as |
workers = auto
|
a much higher value, one can reduce the impact of slow file system operations in one request from negatively impacting other requests. |
Configuration option = Default value | Description |
---|---|
allowed_headers = Content-Disposition, Content-Encoding, X-Delete-At, X-Object-Manifest, X-Static-Large-Object
|
Comma-separated list of headers that can be set in metadata of an object |
auto_create_account_prefix = .
|
Prefix to use when automatically creating accounts |
keep_cache_private = false
|
Allow non-public objects to stay in kernel's buffer cache |
keep_cache_size = 5242880
|
Largest object size to keep in buffer cache |
max_upload_time = 86400
|
Maximum time allowed to upload an object |
mb_per_sync = 512
|
On PUT requests, sync file every n MB |
replication_concurrency = 4
|
Set to restrict the number of concurrent incoming REPLICATION requests; set to 0 for unlimited |
replication_failure_ratio = 1.0
|
If the value of failures / successes of REPLICATION subrequests exceeds this ratio, the overall REPLICATION request will be aborted |
replication_failure_threshold = 100
|
The number of subrequest failures before the replication_failure_ratio is checked |
replication_lock_timeout = 15
|
Number of seconds to wait for an existing replication device lock before giving up. |
replication_one_per_device = True
|
Restricts incoming REPLICATION requests to one per device, replication_currency above allowing. This can help control I/O to each device, but you may wish to set this to False to allow multiple REPLICATION requests (up to the above replication_concurrency setting) per device. |
replication_server = false
|
If defined, tells server how to handle replication verbs in requests. When set to True (or 1), only replication verbs will be accepted. When set to False, replication verbs will be rejected. When undefined, server will accept any verb in the request. |
set log_address = /dev/log
|
Location where syslog sends the logs to |
set log_facility = LOG_LOCAL0
|
Syslog log facility |
set log_level = INFO
|
Log level |
set log_name = object-server
|
Label to use when logging |
set log_requests = true
|
Whether or not to log requests |
slow = 0
|
If > 0, Minimum time in seconds for a PUT or DELETE request to complete |
splice = no
|
No help text available for this option. |
threads_per_disk = 0
|
Size of the per-disk thread pool used for performing disk I/O. The default of 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. |
use = egg:swift#object
|
Entry point of paste.deploy in the server |
Configuration option = Default value | Description |
---|---|
pipeline = healthcheck recon object-server
|
No help text available for this option. |
Configuration option = Default value | Description |
---|---|
concurrency = 1
|
Number of replication workers to spawn |
daemonize = on
|
Whether or not to run replication as a daemon |
handoff_delete = auto
|
By default handoff partitions will be removed when it has successfully replicated to all the canonical nodes. If set to an integer n, it will remove the partition if it is successfully replicated to n nodes. The default setting should not be changed, except for extremem situations. This uses what's set here, or what's set in the DEFAULT section, or 10 (though other sections use 3 as the final default). |
handoffs_first = False
|
If set to True, partitions that are not supposed to be on the node will be replicated first. The default setting should not be changed, except for extreme situations. |
http_timeout = 60
|
Maximum duration for an HTTP request |
lockup_timeout = 1800
|
Attempts to kill all workers if nothing replications for lockup_timeout seconds |
log_address = /dev/log
|
Location where syslog sends the logs to |
log_facility = LOG_LOCAL0
|
Syslog log facility |
log_level = INFO
|
Logging level |
log_name = object-replicator
|
Label used when logging |
node_timeout = <whatever's in the DEFAULT section or 10>
|
Request timeout to external services |
reclaim_age = 604800
|
Time elapsed in seconds before an object can be reclaimed |
recon_cache_path = /var/cache/swift
|
Directory where stats for a few items will be stored |
ring_check_interval = 15
|
How often (in seconds) to check the ring |
rsync_bwlimit = 0
|
No help text available for this option. |
rsync_error_log_line_length = 0
|
No help text available for this option. |
rsync_io_timeout = 30
|
Passed to rsync for a max duration (seconds) of an I/O op |
rsync_timeout = 900
|
Max duration (seconds) of a partition rsync |
run_pause = 30
|
Time in seconds to wait between replication passes |
stats_interval = 300
|
Interval in seconds between logging replication statistics |
sync_method = rsync
|
No help text available for this option. |
vm_test_mode = no
|
Indicates that you are using a VM environment |
Configuration option = Default value | Description |
---|---|
concurrency = 1
|
Number of replication workers to spawn |
interval = 300
|
Minimum time for a pass to take |
log_address = /dev/log
|
Location where syslog sends the logs to |
log_facility = LOG_LOCAL0
|
Syslog log facility |
log_level = INFO
|
Logging level |
log_name = object-updater
|
Label used when logging |
node_timeout = <whatever's in the DEFAULT section or 10>
|
Request timeout to external services |
recon_cache_path = /var/cache/swift
|
Directory where stats for a few items will be stored |
slowdown = 0.01
|
Time in seconds to wait between objects |
Configuration option = Default value | Description |
---|---|
bytes_per_second = 10000000
|
Maximum bytes audited per second. Should be tuned according to individual system specs. 0 is unlimited. mounted to prevent accidentally writing to the root device process simultaneously (it will actually accept(2) N + 1). Setting this to one (1) will only handle one request at a time, without accepting another request concurrently. By increasing the number of workers to a much higher value, one can reduce the impact of slow file system operations in one request from negatively impacting other requests. underlying filesystem does not support it. to setup custom log handlers. bytes you'd like fallocate to reserve, whether there is space for the given file size or not. This is useful for systems that behave badly when they completely run out of space; you can make the services pretend they're out of space early. container server. For most cases, this should be `egg:swift#container`. |
concurrency = 1
|
Number of replication workers to spawn |
disk_chunk_size = 65536
|
Size of chunks to read/write to disk |
files_per_second = 20
|
Maximum files audited per second. Should be tuned according to individual system specs. 0 is unlimited. |
log_address = /dev/log
|
Location where syslog sends the logs to |
log_facility = LOG_LOCAL0
|
Syslog log facility |
log_level = INFO
|
Logging level |
log_name = object-auditor
|
Label used when logging |
log_time = 3600
|
Frequency of status logs in seconds. |
object_size_stats =
|
No help text available for this option. |
recon_cache_path = /var/cache/swift
|
Directory where stats for a few items will be stored |
zero_byte_files_per_second = 50
|
Maximum zero byte files audited per second. |
Configuration option = Default value | Description |
---|---|
disable_path =
|
No help text available for this option. |
use = egg:swift#healthcheck
|
Entry point of paste.deploy in the server |
Configuration option = Default value | Description |
---|---|
recon_cache_path = /var/cache/swift
|
Directory where stats for a few items will be stored |
recon_lock_path = /var/lock
|
No help text available for this option. |
use = egg:swift#recon
|
Entry point of paste.deploy in the server |
Configuration option = Default value | Description |
---|---|
dump_interval = 5.0
|
No help text available for this option. |
dump_timestamp = false
|
No help text available for this option. |
flush_at_shutdown = false
|
No help text available for this option. |
log_filename_prefix = /tmp/log/swift/profile/default.profile
|
No help text available for this option. |
path = /__profile__
|
No help text available for this option. |
profile_module = eventlet.green.profile
|
No help text available for this option. |
unwind = false
|
No help text available for this option. |
use = egg:swift#xprofile
|
Entry point of paste.deploy in the server |
10.3.1. Sample object server configuration file
[DEFAULT] # bind_ip = 0.0.0.0 bind_port = 6000 # bind_timeout = 30 # backlog = 4096 # user = swift # swift_dir = /etc/swift # devices = /srv/node # mount_check = true # disable_fallocate = false # expiring_objects_container_divisor = 86400 # expiring_objects_account_name = expiring_objects # # Use an integer to override the number of pre-forked processes that will # accept connections. # workers = auto # # Maximum concurrent requests per worker # max_clients = 1024 # # You can specify default log routing here if you want: # log_name = swift # log_facility = LOG_LOCAL0 # log_level = INFO # log_address = /dev/log # The following caps the length of log lines to the value given; no limit if # set to 0, the default. # log_max_line_length = 0 # # comma separated list of functions to call to setup custom log handlers. # functions get passed: conf, name, log_to_console, log_route, fmt, logger, # adapted_logger # log_custom_handlers = # # If set, log_udp_host will override log_address # log_udp_host = # log_udp_port = 514 # # You can enable StatsD logging here: # log_statsd_host = localhost # log_statsd_port = 8125 # log_statsd_default_sample_rate = 1.0 # log_statsd_sample_rate_factor = 1.0 # log_statsd_metric_prefix = # # eventlet_debug = false # # You can set fallocate_reserve to the number of bytes you'd like fallocate to # reserve, whether there is space for the given file size or not. # fallocate_reserve = 0 # # Time to wait while attempting to connect to another backend node. # conn_timeout = 0.5 # Time to wait while sending each chunk of data to another backend node. # node_timeout = 3 # Time to wait while receiving each chunk of data from a client or another # backend node. # client_timeout = 60 # # network_chunk_size = 65536 # disk_chunk_size = 65536 [pipeline:main] pipeline = healthcheck recon object-server [app:object-server] use = egg:swift#object # You can override the default log routing for this app here: # set log_name = object-server # set log_facility = LOG_LOCAL0 # set log_level = INFO # set log_requests = true # set log_address = /dev/log # # max_upload_time = 86400 # slow = 0 # # Objects smaller than this are not evicted from the buffercache once read # keep_cache_size = 5242880 # # If true, objects for authenticated GET requests may be kept in buffer cache # if small enough # keep_cache_private = false # # on PUTs, sync data every n MB # mb_per_sync = 512 # # Comma separated list of headers that can be set in metadata on an object. # This list is in addition to X-Object-Meta-* headers and cannot include # Content-Type, etag, Content-Length, or deleted # allowed_headers = Content-Disposition, Content-Encoding, X-Delete-At, X-Object-Manifest, X-Static-Large-Object # # auto_create_account_prefix = . # # A value of 0 means "don't use thread pools". A reasonable starting point is # 4. # threads_per_disk = 0 # # Configure parameter for creating specific server # To handle all verbs, including replication verbs, do not specify # "replication_server" (this is the default). To only handle replication, # set to a True value (e.g. "True" or "1"). To handle only non-replication # verbs, set to "False". Unless you have a separate replication network, you # should not specify any value for "replication_server". # replication_server = false # # Set to restrict the number of concurrent incoming REPLICATION requests # Set to 0 for unlimited # Note that REPLICATION is currently an ssync only item # replication_concurrency = 4 # # Restricts incoming REPLICATION requests to one per device, # replication_currency above allowing. This can help control I/O to each # device, but you may wish to set this to False to allow multiple REPLICATION # requests (up to the above replication_concurrency setting) per device. # replication_one_per_device = True # # Number of seconds to wait for an existing replication device lock before # giving up. # replication_lock_timeout = 15 # # These next two settings control when the REPLICATION subrequest handler will # abort an incoming REPLICATION attempt. An abort will occur if there are at # least threshold number of failures and the value of failures / successes # exceeds the ratio. The defaults of 100 and 1.0 means that at least 100 # failures have to occur and there have to be more failures than successes for # an abort to occur. # replication_failure_threshold = 100 # replication_failure_ratio = 1.0 # # Use splice() for zero-copy object GETs. This requires Linux kernel # version 3.0 or greater. If you set "splice = yes" but the kernel # does not support it, error messages will appear in the object server # logs at startup, but your object servers should continue to function. # # splice = no [filter:healthcheck] use = egg:swift#healthcheck # An optional filesystem path, which if present, will cause the healthcheck # URL to return "503 Service Unavailable" with a body of "DISABLED BY FILE" # disable_path = [filter:recon] use = egg:swift#recon #recon_cache_path = /var/cache/swift #recon_lock_path = /var/lock [object-replicator] # You can override the default log routing for this app here (don't use set!): # log_name = object-replicator # log_facility = LOG_LOCAL0 # log_level = INFO # log_address = /dev/log # # vm_test_mode = no # daemonize = on # run_pause = 30 # concurrency = 1 # stats_interval = 300 # # The sync method to use; default is rsync but you can use ssync to try the # EXPERIMENTAL all-swift-code-no-rsync-callouts method. Once ssync is verified # as having performance comparable to, or better than, rsync, we plan to # deprecate rsync so we can move on with more features for replication. # sync_method = rsync # # max duration of a partition rsync # rsync_timeout = 900 # # bandwidth limit for rsync in kB/s. 0 means unlimited # rsync_bwlimit = 0 # # passed to rsync for io op timeout # rsync_io_timeout = 30 # # node_timeout = <whatever's in the DEFAULT section or 10> # max duration of an http request; this is for REPLICATE finalization calls and # so should be longer than node_timeout # http_timeout = 60 # # attempts to kill all workers if nothing replicates for lockup_timeout seconds # lockup_timeout = 1800 # # The replicator also performs reclamation # reclaim_age = 604800 # # ring_check_interval = 15 # recon_cache_path = /var/cache/swift # # limits how long rsync error log lines are # 0 means to log the entire line # rsync_error_log_line_length = 0 # # handoffs_first and handoff_delete are options for a special case # such as disk full in the cluster. These two options SHOULD NOT BE # CHANGED, except for such an extreme situations. (e.g. disks filled up # or are about to fill up. Anyway, DO NOT let your drives fill up) # handoffs_first is the flag to replicate handoffs prior to canonical # partitions. It allows to force syncing and deleting handoffs quickly. # If set to a True value(e.g. "True" or "1"), partitions # that are not supposed to be on the node will be replicated first. # handoffs_first = False # # handoff_delete is the number of replicas which are ensured in swift. # If the number less than the number of replicas is set, object-replicator # could delete local handoffs even if all replicas are not ensured in the # cluster. Object-replicator would remove local handoff partition directories # after syncing partition when the number of successful responses is greater # than or equal to this number. By default(auto), handoff partitions will be # removed when it has successfully replicated to all the canonical nodes. # handoff_delete = auto [object-reconstructor] # You can override the default log routing for this app here (don't use set!): # Unless otherwise noted, each setting below has the same meaning as described # in the [object-replicator] section, however these settings apply to the EC # reconstructor # # log_name = object-reconstructor # log_facility = LOG_LOCAL0 # log_level = INFO # log_address = /dev/log # # daemonize = on # run_pause = 30 # concurrency = 1 # stats_interval = 300 # node_timeout = 10 # http_timeout = 60 # lockup_timeout = 1800 # reclaim_age = 604800 # ring_check_interval = 15 # recon_cache_path = /var/cache/swift # handoffs_first = False [object-updater] # You can override the default log routing for this app here (don't use set!): # log_name = object-updater # log_facility = LOG_LOCAL0 # log_level = INFO # log_address = /dev/log # # interval = 300 # concurrency = 1 # node_timeout = <whatever's in the DEFAULT section or 10> # slowdown will sleep that amount between objects # slowdown = 0.01 # # recon_cache_path = /var/cache/swift [object-auditor] # You can override the default log routing for this app here (don't use set!): # log_name = object-auditor # log_facility = LOG_LOCAL0 # log_level = INFO # log_address = /dev/log # # You can set the disk chunk size that the auditor uses making it larger if # you like for more efficient local auditing of larger objects # disk_chunk_size = 65536 # files_per_second = 20 # concurrency = 1 # bytes_per_second = 10000000 # log_time = 3600 # zero_byte_files_per_second = 50 # recon_cache_path = /var/cache/swift # Takes a comma separated list of ints. If set, the object auditor will # increment a counter for every object whose size is <= to the given break # points and report the result after a full scan. # object_size_stats = # Note: Put it at the beginning of the pipleline to profile all middleware. But # it is safer to put this after healthcheck. [filter:xprofile] use = egg:swift#xprofile # This option enable you to switch profilers which should inherit from python # standard profiler. Currently the supported value can be 'cProfile', # 'eventlet.green.profile' etc. # profile_module = eventlet.green.profile # # This prefix will be used to combine process ID and timestamp to name the # profile data file. Make sure the executing user has permission to write # into this path (missing path segments will be created, if necessary). # If you enable profiling in more than one type of daemon, you must override # it with an unique value like: /var/log/swift/profile/object.profile # log_filename_prefix = /tmp/log/swift/profile/default.profile # # the profile data will be dumped to local disk based on above naming rule # in this interval. # dump_interval = 5.0 # # Be careful, this option will enable profiler to dump data into the file with # time stamp which means there will be lots of files piled up in the directory. # dump_timestamp = false # # This is the path of the URL to access the mini web UI. # path = /__profile__ # # Clear the data when the wsgi server shutdown. # flush_at_shutdown = false # # unwind the iterator of applications # unwind = false