2010-08-20 00:42:38 +00:00
|
|
|
[DEFAULT]
|
2010-07-12 17:03:45 -05:00
|
|
|
# bind_ip = 0.0.0.0
|
|
|
|
# bind_port = 6001
|
2010-10-13 21:24:30 +00:00
|
|
|
# backlog = 4096
|
2010-07-12 17:03:45 -05:00
|
|
|
# workers = 1
|
|
|
|
# user = swift
|
2010-08-20 00:42:38 +00:00
|
|
|
# swift_dir = /etc/swift
|
|
|
|
# devices = /srv/node
|
|
|
|
# mount_check = true
|
2012-08-29 19:57:26 +00:00
|
|
|
# disable_fallocate = false
|
2011-02-24 10:50:00 -08:00
|
|
|
# This is a comma separated list of hosts allowed in the X-Container-Sync-To
|
|
|
|
# field for containers.
|
|
|
|
# allowed_sync_hosts = 127.0.0.1
|
2011-01-23 13:18:28 -08:00
|
|
|
# You can specify default log routing here if you want:
|
|
|
|
# log_name = swift
|
|
|
|
# log_facility = LOG_LOCAL0
|
|
|
|
# log_level = INFO
|
2012-05-17 15:46:38 -07:00
|
|
|
# log_address = /dev/log
|
2012-10-05 15:56:34 -05:00
|
|
|
# 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 =
|
Upating proxy-server StatsD logging.
Removed many StatsD logging calls in proxy-server and added
swift-informant-style catch-all logging in the proxy-logger middleware.
Many errors previously rolled into the "proxy-server.<type>.errors"
counter will now appear broken down by response code and with timing
data at: "proxy-server.<type>.<verb>.<status>.timing". Also, bytes
transferred (sum of in + out) will be at:
"proxy-server.<type>.<verb>.<status>.xfer". The proxy-logging
middleware can get its StatsD config from standard vars in [DEFAULT] or
from access_log_statsd_* config vars in its config section.
Similarly to Swift Informant, request methods ("verbs") are filtered
using the new proxy-logging config var, "log_statsd_valid_http_methods"
which defaults to GET, HEAD, POST, PUT, DELETE, and COPY. Requests with
methods not in this list use "BAD_METHOD" for <verb> in the metric name.
To avoid user error, access_log_statsd_valid_http_methods is also
accepted.
Previously, proxy-server metrics used "Account", "Container", and
"Object" for the <type>, but these are now all lowercase.
Updated the admin guide's StatsD docs to reflect the above changes and
also include the "proxy-server.<type>.handoff_count" and
"proxy-server.<type>.handoff_all_count" metrics.
The proxy server now saves off the original req.method and proxy_logging
will use this if it can (both for request logging and as the "<verb>" in
the statsd timing metric). This fixes bug 1025433.
Removed some stale access_log_* related code in proxy/server.py. Also
removed the BaseApplication/Application distinction as it's no longer
necessary.
Fixed up the sample config files a bit (logging lines, mostly).
Fixed typo in SAIO development guide.
Got proxy_logging.py test coverage to 100%.
Fixed proxy_logging.py for PEP8 v1.3.2.
Enhanced test.unit.FakeLogger to track more calls to enable testing
StatsD metric calls.
Change-Id: I45d94cb76450be96d66fcfab56359bdfdc3a2576
2012-08-19 17:44:43 -07:00
|
|
|
# If set, log_udp_host will override log_address
|
|
|
|
# log_udp_host =
|
|
|
|
# log_udp_port = 514
|
|
|
|
# You can enable StatsD logging here:
|
Adding StatsD logging to Swift.
Documentation, including a list of metrics reported and their semantics,
is in the Admin Guide in a new section, "Reporting Metrics to StatsD".
An optional "metric prefix" may be configured which will be prepended to
every metric name sent to StatsD.
Here is the rationale for doing a deep integration like this versus only
sending metrics to StatsD in middleware. It's the only way to report
some internal activities of Swift in a real-time manner. So to have one
way of reporting to StatsD and one place/style of configuration, even
some things (like, say, timing of PUT requests into the proxy-server)
which could be logged via middleware are consistently logged the same
way (deep integration via the logger delegate methods).
When log_statsd_host is configured, get_logger() injects a
swift.common.utils.StatsdClient object into the logger as
logger.statsd_client. Then a set of delegate methods on LogAdapter
either pass through to the StatsdClient object or become no-ops. This
allows StatsD logging to look like:
self.logger.increment('some.metric.here')
and do the right thing in all cases and with no messy conditional logic.
I wanted to use the pystatsd module for the StatsD client, but the
version on PyPi is lagging the git repo (and is missing both the prefix
functionality and timing_since() method). So I wrote my
swift.common.utils.StatsdClient. The interface is the same as
pystatsd.Client, but the code was written from scratch. It's pretty
simple, and the tests I added cover it. This also frees Swift from an
optional dependency on the pystatsd module, making this feature easier
to enable.
There's test coverage for the new code and all existing tests continue
to pass.
Refactored out _one_audit_pass() method in swift/account/auditor.py and
swift/container/auditor.py.
Fixed some misc. PEP8 violations.
Misc test cleanups and refactorings (particularly the way "fake logging"
is handled).
Change-Id: Ie968a9ae8771f59ee7591e2ae11999c44bfe33b2
2012-04-01 16:47:08 -07:00
|
|
|
# log_statsd_host = localhost
|
|
|
|
# log_statsd_port = 8125
|
|
|
|
# log_statsd_default_sample_rate = 1
|
|
|
|
# log_statsd_metric_prefix =
|
!! Changed db_preallocation to False
Long explanation, but hopefully answers any questions.
We don't like changing the default behavior of Swift unless there's a
really good reason and, up until now, I've tried doing this with this
new db_preallocation setting.
For clusters with dedicated account/container servers that usually
have fewer disks overall but SSD for speed, having db_preallocation
on will gobble up disk space quite quickly and the fragmentation it's
designed to fight isn't that big a speed impact to SSDs anyway.
For clusters with account/container servers spread across all servers
along with object servers usually having standard disks for cost,
having db_preallocation off will cause very fragmented database files
impacting speed, sometimes dramatically.
Weighing these two negatives, it seems the second is the lesser evil.
The first can cause disks to fill up and disable the cluster. The
second will cause performance degradation, but the cluster will still
function.
Furthermore, if just one piece of code that touches all databases
runs with db_preallocation on, it's effectively on for the whole
cluster. We discovered this most recently when we finally configured
everything within the Swift codebase to have db_preallocation off,
only to find out Slogging didn't know about the new setting and so
ran with it on and starting filling up SSDs.
So that's why I'm proposing this change to the default behavior.
We will definitely need to post a prominent notice of this change
with the next release.
Change-Id: I48a43439264cff5d03c14ec8787f718ee44e78ea
2012-05-22 00:30:47 +00:00
|
|
|
# If you don't mind the extra disk space usage in overhead, you can turn this
|
|
|
|
# on to preallocate disk space with SQLite databases to decrease fragmentation.
|
|
|
|
# db_preallocation = off
|
2010-08-20 00:42:38 +00:00
|
|
|
|
|
|
|
[pipeline:main]
|
2012-05-14 18:01:48 -05:00
|
|
|
pipeline = recon container-server
|
2010-08-20 00:42:38 +00:00
|
|
|
|
|
|
|
[app:container-server]
|
|
|
|
use = egg:swift#container
|
2011-01-23 13:18:28 -08:00
|
|
|
# You can override the default log routing for this app here:
|
|
|
|
# set log_name = container-server
|
|
|
|
# set log_facility = LOG_LOCAL0
|
|
|
|
# set log_level = INFO
|
|
|
|
# set log_requests = True
|
2012-05-17 15:46:38 -07:00
|
|
|
# set log_address = /dev/log
|
2010-07-12 17:03:45 -05:00
|
|
|
# node_timeout = 3
|
|
|
|
# conn_timeout = 0.5
|
2011-12-29 11:29:19 -06:00
|
|
|
# allow_versions = False
|
2012-04-28 16:31:00 +10:00
|
|
|
# auto_create_account_prefix = .
|
2010-07-12 17:03:45 -05:00
|
|
|
|
2012-05-14 18:01:48 -05:00
|
|
|
[filter:recon]
|
|
|
|
use = egg:swift#recon
|
|
|
|
#recon_cache_path = /var/cache/swift
|
|
|
|
|
2010-07-12 17:03:45 -05:00
|
|
|
[container-replicator]
|
2011-01-23 13:18:28 -08:00
|
|
|
# You can override the default log routing for this app here (don't use set!):
|
2010-08-24 13:41:58 +00:00
|
|
|
# log_name = container-replicator
|
2011-01-23 13:18:28 -08:00
|
|
|
# log_facility = LOG_LOCAL0
|
|
|
|
# log_level = INFO
|
2012-05-17 15:46:38 -07:00
|
|
|
# log_address = /dev/log
|
2010-08-24 14:10:36 +00:00
|
|
|
# vm_test_mode = no
|
2010-07-12 17:03:45 -05:00
|
|
|
# per_diff = 1000
|
2012-03-06 03:24:16 +00:00
|
|
|
# max_diffs = 100
|
2010-07-12 17:03:45 -05:00
|
|
|
# concurrency = 8
|
2012-03-06 03:24:16 +00:00
|
|
|
# interval = 30
|
2010-07-12 17:03:45 -05:00
|
|
|
# node_timeout = 10
|
|
|
|
# conn_timeout = 0.5
|
|
|
|
# The replicator also performs reclamation
|
|
|
|
# reclaim_age = 604800
|
2012-04-28 16:31:00 +10:00
|
|
|
# Time in seconds to wait between replication passes
|
|
|
|
# run_pause = 30
|
2012-05-14 18:01:48 -05:00
|
|
|
# recon_cache_path = /var/cache/swift
|
2010-07-12 17:03:45 -05:00
|
|
|
|
|
|
|
[container-updater]
|
2011-01-23 13:18:28 -08:00
|
|
|
# You can override the default log routing for this app here (don't use set!):
|
2010-08-24 13:41:58 +00:00
|
|
|
# log_name = container-updater
|
2011-01-23 13:18:28 -08:00
|
|
|
# log_facility = LOG_LOCAL0
|
|
|
|
# log_level = INFO
|
2012-05-17 15:46:38 -07:00
|
|
|
# log_address = /dev/log
|
2010-07-12 17:03:45 -05:00
|
|
|
# interval = 300
|
|
|
|
# concurrency = 4
|
|
|
|
# node_timeout = 3
|
|
|
|
# conn_timeout = 0.5
|
|
|
|
# slowdown will sleep that amount between containers
|
|
|
|
# slowdown = 0.01
|
2011-01-21 12:43:50 -08:00
|
|
|
# Seconds to suppress updating an account that has generated an error
|
|
|
|
# account_suppression_time = 60
|
2012-05-14 18:01:48 -05:00
|
|
|
# recon_cache_path = /var/cache/swift
|
2010-07-12 17:03:45 -05:00
|
|
|
|
|
|
|
[container-auditor]
|
2011-01-23 13:18:28 -08:00
|
|
|
# You can override the default log routing for this app here (don't use set!):
|
2010-08-24 13:41:58 +00:00
|
|
|
# log_name = container-auditor
|
2011-01-23 13:18:28 -08:00
|
|
|
# log_facility = LOG_LOCAL0
|
|
|
|
# log_level = INFO
|
2012-05-17 15:46:38 -07:00
|
|
|
# log_address = /dev/log
|
2010-07-12 17:03:45 -05:00
|
|
|
# Will audit, at most, 1 container per device per interval
|
|
|
|
# interval = 1800
|
2012-05-14 18:01:48 -05:00
|
|
|
# recon_cache_path = /var/cache/swift
|
2011-02-23 23:26:05 -08:00
|
|
|
|
|
|
|
[container-sync]
|
|
|
|
# You can override the default log routing for this app here (don't use set!):
|
|
|
|
# log_name = container-sync
|
|
|
|
# log_facility = LOG_LOCAL0
|
|
|
|
# log_level = INFO
|
2012-05-17 15:46:38 -07:00
|
|
|
# log_address = /dev/log
|
2011-06-06 16:12:54 +00:00
|
|
|
# If you need to use an HTTP Proxy, set it here; defaults to no proxy.
|
|
|
|
# sync_proxy = http://127.0.0.1:8888
|
2011-02-23 23:26:05 -08:00
|
|
|
# Will sync, at most, each container once per interval
|
|
|
|
# interval = 300
|
2011-06-22 15:05:23 +00:00
|
|
|
# Maximum amount of time to spend syncing each container per pass
|
2011-02-23 23:26:05 -08:00
|
|
|
# container_time = 60
|