container-server.conf(5)
π container-server.conf(5) π
ok bestie, gather round π«Ά this is container-server.conf(5) β the manual for the config file of the OpenStack Swift container server. it's long, it's giving main character energy, and we're doing it in three parts. part 1 starts now. no cap.
β¨ NAME β¨
container-server.conf β the configuration file for the OpenStack Swift container server π
π SYNOPSIS π
container-server.conf
π¦ DESCRIPTION π¦
This is the config file that the container server reads, and also all the container background services that tag along with it: the replicator, the updater, the auditor and sync. one file, many jobs, very versatile of it honestly β¨
The file follows python-pastedeploy syntax. Translation: it's split into sections, and sections get wrapped in square brackets. Each section holds a certain number of key/value parameters, and we're gonna describe every single one below β yes, all of them, we do not skip π
Any line that begins with a # symbol is ignored. that's your comment escape hatch, use it, it's free πΈ
You can find more information about python-pastedeploy configuration format at https://docs.pylonsproject.org/projects/pastedeploy/en/latest/#config-format
π GLOBAL SECTION π
This one is the section named [DEFAULT]. Below are the parameters that are acceptable within this section. sit down, there's a lot, we love a long list π
bind_ipβ the IP address the container server should bind to. the default is0.0.0.0, which means it binds to all the available addresses. it's giving "I'll take them all, thanks" πbind_portβ the TCP port the container server should bind to. the default is6201.keep_idleβ the value to set for socketTCP_KEEPIDLE. the default value is600.bind_timeoutβ timeout for binding the socket. the default is30.backlogβ TCP backlog. that's the maximum number of allowed pending connections. the default value is4096. queue 'em up bestie π«Άworkersβ the number of pre-forked processes that will accept connections. zero means no fork. the default isauto, which makes the server try to match the number of effective cpu cores if python multiprocessing is available (it's included with most python distributions>= 2.6) or fall back to one. also worth noting: individual workers will use many eventlet co-routines to service multiple concurrent requests. multitasking icon πmax_clientsβ the maximum number of clients one worker can process simultaneously (it will actuallyaccept(2)N + 1). setting this to one (1) will only handle one request at a time, without accepting another request concurrently. the default is1024.allowed_sync_hostsβ a comma separated list of hosts allowed in theX-Container-Sync-Tofield for containers. this is the old-style way of doing container sync. it is strongly recommended that you use the new style instead β a separatecontainer-sync-realms.conf, seecontainer-sync-realms.conf-sample. the sample value here isallowed_sync_hosts = 127.0.0.1userβ the system user that the container server will run as. the default isswift.swift_dirβ the Swift configuration directory. the default is/etc/swift.devicesβ the parent directory of where devices are mounted. the default is/srv/node.mount_checkβ whether or not to check if the devices are mounted, so you don't accidentally write to the root device π (that would be a vibe check fail of epic proportions). the default is set totrue.disable_fallocateβ disable pre-allocating disk space for a file. the default isfalse.log_nameβ the label used when logging. the default isswift.log_facilityβ the syslog log facility. the default isLOG_LOCAL0.log_levelβ the logging level. the default isINFO.log_addressβ the logging address. the default is/dev/log.log_max_line_lengthβ this caps the length of log lines to the value given; there's no limit if it's set to0, which is the default.log_custom_handlersβ a comma separated list of functions to call to set up custom log handlers. the functions get passed:conf,name,log_to_console,log_route,fmt,logger,adapted_logger. the default is empty.log_udp_hostβ if set,log_udp_hostwill overridelog_address.log_udp_portβ the UDP log port. the default is514.log_statsd_hostβ the StatsD server. IPv4/IPv6 addresses and hostnames are supported. if a hostname resolves to both an IPv4 and an IPv6 address, the IPv4 address will be used.log_statsd_portβ the default is8125.log_statsd_default_sample_rateβ the default is1.log_statsd_sample_rate_factorβ the default is1.log_statsd_metric_prefixβ the default is empty.db_preallocationβ if you don't mind the extra disk space usage in overhead, you can turn this on to preallocate disk space with SQLite databases, which decreases fragmentation. the default isfalse. tradeoffs, bestie, it's always tradeoffs πeventlet_debugβ debug mode for the eventlet library. the default isfalse.fallocate_reserveβ you can setfallocate_reserveto the number of bytes or the percentage of disk space you'd like fallocate to reserve, whether there's space for the given file size or not. a percentage will be used if the value ends with a'%'. the default is1%.nice_priorityβ modify the scheduling priority of server processes. niceness values range from-20(most favorable to the process) to19(least favorable to the process). the default does not modify priority.ionice_classβ modify the I/O scheduling class of server processes. the I/O niceness class values areIOPRIO_CLASS_RT(realtime),IOPRIO_CLASS_BE(best-effort) andIOPRIO_CLASS_IDLE(idle). the default does not modify class and priority. it only works together withionice_priority.ionice_priorityβ modify the I/O scheduling priority of server processes. the I/O niceness priority is a number which goes from0to7. the higher the value, the lower the I/O priority of the process. it only works together withionice_class. it's ignored ifIOPRIO_CLASS_IDLEis set.
π PIPELINE SECTION π
This one is the section named [pipeline:main]. below are the parameters that are acceptable within this section.
pipelineβ used when you need to apply a number of filters. it's a list of filters, ended by an application. the normal pipeline is"healthcheck recon container-server". that's the classic lineup, the holy trinity π
β APP SECTION β
This one is the section named [app:container-server]. below are the parameters that are acceptable within this section.
useβ the entry point for paste.deploy for the container server. this is the reference to the installed python egg. it's normallyegg:swift#container.set log_nameβ the label used when logging. the default iscontainer-server.set log_facilityβ the syslog log facility. the default isLOG_LOCAL0.set log_levelβ the logging level. the default isINFO.set log_requestsβ enables request logging. the default isTrue.set log_addressβ the logging address. the default is/dev/log.node_timeoutβ the request timeout to external services. the default is3seconds.conn_timeoutβ the connection timeout to external services. the default is0.5seconds.allow_versionsβ the default isfalse.replication_serverβ the configure parameter for creating a specific server. to handle all verbs, including replication verbs, do not specify"replication_server"(this is the default). to only handle replication, set it to a True value (e.g."True"or"1"). to handle only non-replication verbs, set it to"False". unless you have a separate replication network, you should not specify any value for"replication_server". read that one twice, bestie, it's the tricky one π«Άnice_priorityβ modify the scheduling priority of server processes. niceness values range from-20(most favorable to the process) to19(least favorable to the process). the default does not modify priority.ionice_classβ modify the I/O scheduling class of server processes. the I/O niceness class values areIOPRIO_CLASS_RT(realtime),IOPRIO_CLASS_BE(best-effort) andIOPRIO_CLASS_IDLE(idle). the default does not modify class and priority. it only works together withionice_priority.ionice_priorityβ modify the I/O scheduling priority of server processes. the I/O niceness priority is a number which goes from0to7. the higher the value, the lower the I/O priority of the process. it only works together withionice_class. it's ignored ifIOPRIO_CLASS_IDLEis set.
β¨ FILTER SECTION β¨
ok so any section whose name has filter: slapped on the front is a filter section, bestie π
. Filters are how you set up config parameters for specific swift middlewares. Below are the filters you can use and the parameters each one accepts π«Ά.
π [filter:healthcheck]
useβ this is the paste.deploy entry point for the healthcheck middleware. It's basically the reference to the installed python egg. Normally it'segg:swift#healthcheckβ¨.disable_pathβ an optional filesystem path, and the way it works is: if that path is present, the healthcheck URL will return"503 Service Unavailable"with a body of"DISABLED BY FILE". Like, the file existing is the switch π.
πΈ [filter:recon]
useβ the paste.deploy entry point for the recon middleware. Again, it's the reference to the installed python egg. Normallyegg:swift#reconπ.recon_cache_pathβ this one just sets the directory where stats for a few items get stored. Depending on how you deployed, you might have to create this directory yourself and make sure swift has read/write on it. Default is/var/cache/swiftπ¦.
π§ [filter:xprofile]
useβ the paste.deploy entry point for the xprofile middleware. Yes, it's the reference to the installed python egg again. Normallyegg:swift#xprofileβ.profile_moduleβ this option lets you switch profilers, and whatever you pick needs to inherit from the python standard profiler. Currently the supported value can be'cProfile','eventlet.green.profile'etc. πlog_filename_prefixβ this prefix gets combined with the process ID and a 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, so don't stress about that part). And heads up: if you enable profiling in more than one type of daemon, you must override it with a unique value, like... just make it unique, okay? The default is/var/log/swift/profile/account.profileπ.dump_intervalβ the profile data gets dumped to local disk based on that naming rule above, in this interval. Default is5.0β±οΈ.
π¨ be careful with this next one, bestie...
dump_timestampβ careful, this option makes the profiler dump data into the file with a time stamp, which means there will be lots of files piling up in the directory. Like, a LOT. Default isfalseπ.pathβ this is the path of the URL you use to access the mini web UI. Default is__profile__π.flush_at_shutdownβ clears the data when the wsgi server shuts down. Default isfalseπ§Ή.unwindβ unwinds the iterator of applications. Default isfalseπ₯.
β¨ ADDITIONAL SECTIONS β¨
okay so these next blocks are the side-character sections β they don't belong to the main container server, but the other swift-container girlies read them: the replicator, the updater, the auditor, and the sync service. each one gets its own little config block, and lowkey they all start with the same four logging keys because of course they do π
π [container-replicator]
log_nameβ the label it uses when logging. default iscontainer-replicator.log_facilityβ the syslog log facility. default isLOG_LOCAL0.log_levelβ logging level. default isINFO.log_addressβ logging address. default is/dev/log.per_diffβ the max number of database rows that get sync'd in one single HTTP replication request. default is1000.max_diffsβ this one caps how long the replicator will spend trying to sync a given database per pass, so the other databases don't get starved and start acting neglected π default is100.concurrencyβ how many replication workers to spawn. default is8.run_pause[deprecated] β time in seconds to wait between replication passes. default is30.intervalβ replacesrun_pausewith the more standard "interval", which means the replicator won't pause unless it takes less than the interval you set. default is30.node_timeoutβ request timeout to external services. default is10seconds.conn_timeoutβ connection timeout to external services. default is0.5seconds.reclaim_ageβ time elapsed in seconds before an container can be reclaimed. default is604800seconds.rsync_compressβ lets rsync compress the data it transmits to the destination node during sync. however, this only applies when the destination node is in a different region than the local one. default isfalse.rsync_moduleβ format of the rsync module where the replicator will send data. seeetc/rsyncd.conf-samplefor some usage examples.recon_cache_pathβ path to the recon cache directory. default is/var/cache/swift.nice_priorityβ modify the scheduling priority of server processes. niceness values range from-20(most favorable to the process) to19(least favorable to the process). the default does not modify priority.ionice_classβ modify the I/O scheduling class of server processes. the I/O niceness class values areIOPRIO_CLASS_RT(realtime),IOPRIO_CLASS_BE(best-effort) andIOPRIO_CLASS_IDLE(idle). the default does not modify class and priority. work only withionice_priority.ionice_priorityβ modify the I/O scheduling priority of server processes. I/O niceness priority is a number that goes from0to7. the higher the value, the lower the I/O priority of the process. work only withionice_class. ignored ifIOPRIO_CLASS_IDLEis set.
π [container-updater]
log_nameβ the label used when logging. default iscontainer-updater.log_facilityβ syslog log facility. default isLOG_LOCAL0.log_levelβ logging level. default isINFO.log_addressβ logging address. default is/dev/log.intervalβ minimum time for a pass to take. default is300seconds.concurrencyβ number of updater workers to spawn. default is4.node_timeoutβ request timeout to external services. default is3seconds.conn_timeoutβ connection timeout to external services. default is0.5seconds.containers_per_secondβ max containers updated per second. should be tuned according to your individual system specs, bestie, no copy-paste energy.0is unlimited. default is50.slowdown[deprecated] β slowdown will sleep that amount between containers. default is0.01seconds. deprecated in favor ofcontainers_per_second.account_suppression_timeβ seconds to suppress updating an account that has generated an error. default is60seconds.recon_cache_pathβ path to the recon cache directory. default is/var/cache/swift.nice_priorityβ modify the scheduling priority of server processes. niceness values range from-20(most favorable to the process) to19(least favorable to the process). the default does not modify priority.ionice_classβ modify the I/O scheduling class of server processes. the I/O niceness class values areIOPRIO_CLASS_RT(realtime),IOPRIO_CLASS_BE(best-effort) andIOPRIO_CLASS_IDLE(idle). the default does not modify class and priority. work only withionice_priority.ionice_priorityβ modify the I/O scheduling priority of server processes. I/O niceness priority is a number that goes from0to7. the higher the value, the lower the I/O priority of the process. work only withionice_class. ignored ifIOPRIO_CLASS_IDLEis set.
π [container-auditor]
log_nameβ the label used when logging. default iscontainer-auditor.log_facilityβ syslog log facility. default isLOG_LOCAL0.log_levelβ logging level. default isINFO.log_addressβ logging address. default is/dev/log.intervalβ will audit, at most,1container per device per interval. default is1800seconds.containers_per_secondβ max containers audited per second. should be tuned according to your individual system specs.0is unlimited. default is200.recon_cache_pathβ path to the recon cache directory. default is/var/cache/swift.nice_priorityβ modify the scheduling priority of server processes. niceness values range from-20(most favorable to the process) to19(least favorable to the process). the default does not modify priority.ionice_classβ modify the I/O scheduling class of server processes. the I/O niceness class values areIOPRIO_CLASS_RT(realtime),IOPRIO_CLASS_BE(best-effort) andIOPRIO_CLASS_IDLE(idle). the default does not modify class and priority. work only withionice_priority.ionice_priorityβ modify the I/O scheduling priority of server processes. I/O niceness priority is a number that goes from0to7. the higher the value, the lower the I/O priority of the process. work only withionice_class. ignored ifIOPRIO_CLASS_IDLEis set.
π¦ [container-sync]
log_nameβ the label used when logging. default iscontainer-sync.log_facilityβ syslog log facility. default isLOG_LOCAL0.log_levelβ logging level. default isINFO.log_addressβ logging address. default is/dev/log.sync_proxyβ if you need to use an HTTP proxy, set it here; defaults to no proxy.intervalβ will audit, at most, each container once per interval. default is300seconds.container_timeβ maximum amount of time to spend syncing each container per pass. default is60seconds.conn_timeoutβ connection timeout to external services. default is5seconds.request_triesβ server errors from requests will be retried by default. default is3.internal_client_conf_pathβ internal client config file path.nice_priorityβ modify the scheduling priority of server processes. niceness values range from-20(most favorable to the process) to19(least favorable to the process). the default does not modify priority.ionice_classβ modify the I/O scheduling class of server processes. the I/O niceness class values areIOPRIO_CLASS_RT(realtime),IOPRIO_CLASS_BE(best-effort) andIOPRIO_CLASS_IDLE(idle). the default does not modify class and priority. work only withionice_priority.ionice_priorityβ modify the I/O scheduling priority of server processes. I/O niceness priority is a number that goes from0to7. the higher the value, the lower the I/O priority of the process. work only withionice_class. ignored ifIOPRIO_CLASS_IDLEis set.
π DOCUMENTATION π
more in-depth documentation about the swift-container-server and also OpenStack Swift as a whole can be found at https://docs.openstack.org/swift/latest/admin_guide.html and https://docs.openstack.org/swift/latest/ β go read it, it's giving study session but make it cute π«Ά
π SEE ALSO π
and that's the whole page, bestie, you made it to the end π this one's from the Linux fam, dated 8/26/2011, and it lives in section 5 as container-server.conf(5) β go forth and configure responsibly, no cap π
β¨
π¦ where this page comes from
- debian trixie: swift-container 2.35.1-0+deb13u3 Β· Apache-2
- debian trixie: swift-container 2.35.1-0+deb13u4 Β· Apache-2
- nixos 26.05: python3.13-swift 2.37.1
- nixos 26.05: python3.14-swift 2.37.1
- nixpkgs unstable: python3.13-swift 2.38.3
- nixpkgs unstable: python3.14-swift 2.38.3
- ubuntu noble: swift-container 2.33.0-0ubuntu1 Β· Apache-2
- ubuntu noble: swift-container 2.33.0-0ubuntu1.1 Β· Apache-2
- ubuntu questing: swift-container 2.36.0-0ubuntu1
- ubuntu questing: swift-container 2.36.0-0ubuntu1.1
- ubuntu resolute: swift-container 2.37.1-0ubuntu2 Β· Apache-2
- ubuntu resolute: swift-container 2.37.1-0ubuntu2.1 Β· Apache-2
- ubuntu stonking: swift-container 2.38.2-0ubuntu1 Β· Apache-2
- Copyright (c) 2010-2012 OpenStack Foundation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms