object auditor creates high amount of writes on nearly empty clusters

Bug #1631352 reported by Christian Schwede
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
High
Christian Schwede

Bug Description

Let's assume the following: you have a nearly empty cluster, with a high amount of partitions per disk. Each partition might store a small object; it's fast to audit.
The auditor will write a new status file after each partition, and this will also update the journal on disk. However, each partition will only take a few milliseconds to audit, so you're writing out a few KB every few milliseconds, plus updating the journal every time.

This can create quite some I/O load, at least every 30 seconds.

You can easily simulate this when doing the following test on a SAIO:

- upload 1000 empty objects
- set the auditor interval to 0
- run iostat -dx 2

There are always write requests, and depending on the amount of partitions and small objects this might be quite a few MB/s per disk.

I propose to update the auditor status file only once a minute at max, and will submit a patch for this.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/383707
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=77f5b201248c0684d87289540d3f94873f5c5e38
Submitter: Jenkins
Branch: master

commit 77f5b201248c0684d87289540d3f94873f5c5e38
Author: Christian Schwede <email address hidden>
Date: Fri Oct 7 12:17:08 2016 +0000

    Throttle update_auditor_status calls

    If there are quite a few nearly empty partitions per disk you might see
    some write load even if your cluster is unused. The auditor will update
    the status file after every partition, and this might happen multiple
    times within a second if there is not much data stored yet.

    This patch throttles updates, and will only write out an updated status
    if the file was last updated more than a minute ago.

    Closes-Bug: 1631352
    Change-Id: Ib61ec9cd945e6b2d28756f6ca47801674a7e6060

Changed in swift:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/385779

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (stable/newton)

Reviewed: https://review.openstack.org/385779
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=5941f26ceac9c62c54f3b5bb52f0bb53feddd355
Submitter: Jenkins
Branch: stable/newton

commit 5941f26ceac9c62c54f3b5bb52f0bb53feddd355
Author: Christian Schwede <email address hidden>
Date: Fri Oct 7 12:17:08 2016 +0000

    Throttle update_auditor_status calls

    If there are quite a few nearly empty partitions per disk you might see
    some write load even if your cluster is unused. The auditor will update
    the status file after every partition, and this might happen multiple
    times within a second if there is not much data stored yet.

    This patch throttles updates, and will only write out an updated status
    if the file was last updated more than a minute ago.

    Cherry-picked from master/77f5b201248c0684d87289540d3f94873f5c5e38.

    Closes-Bug: 1631352
    Change-Id: Ib61ec9cd945e6b2d28756f6ca47801674a7e6060

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/swift 2.11.0

This issue was fixed in the openstack/swift 2.11.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (feature/hummingbird)

Fix proposed to branch: feature/hummingbird
Review: https://review.openstack.org/400985

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (feature/hummingbird)
Download full text (78.0 KiB)

Reviewed: https://review.openstack.org/400985
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=0c3f8f87104af8717115c5badffd243dbaa1c430
Submitter: Jenkins
Branch: feature/hummingbird

commit 2d25fe6ad3573b2a06b6b3e5e66493d7b0c55693
Author: Tim Burke <email address hidden>
Date: Mon Jul 25 15:06:23 2016 -0700

    Reduce backend requests for SLO If-Match / HEAD requests

    ... by storing SLO Etag and size in sysmeta.

    Previously, we had to GET the manifest for every HEAD or conditional
    request to an SLO. Worse, since SLO PUTs require that we HEAD every
    segment, we'd GET all included sub-SLO manifests. This was necessary so
    we could recompute the large object's Etag and content-length.

    Since we already know both of those during PUT, we'll now store it in
    object sysmeta. This allows us to:

     * satisfy HEAD requests based purely off of the manifest's HEAD
       response, and
     * perform the If-(None-)Match comparison on the object server, without
       any additional subrequests.

    Note that the large object content-length can't just be parsed from
    content-type -- with fast-POST enabled, the content-type coming out of
    the object-server won't necessarily include swift_bytes.

    Also note that we must still fall back to GETting the manifest if the
    sysmeta headers were not found. Otherwise, we'd break existing large
    objects.

    Change-Id: Ia6ad32354105515560b005cea750aa64a88c96f9

commit ae7dddd801e28217d7dc46bd45cd6b621f29340c
Author: Ondřej Nový <email address hidden>
Date: Mon Nov 21 22:13:11 2016 +0100

    Added comment for "user" option in drive-audit config

    Change-Id: I24362826bee85ac3304e9b63504c9465da673014

commit c3e1d847f4b9d6cc6212aae4dc1b1e6dff45fb40
Author: Thiago da Silva <email address hidden>
Date: Thu Nov 17 17:17:00 2016 -0500

    breaking down tests.py into smaller pieces

    tests.py is currently at ~5500 lines of code, it's
    time to break it down into smaller files.

    I started with an easy middleware set of tests
    (i.e., versioned writes, ~600 lines of code ) so I can get
    some feedback. There are more complicated tests that cover
    multiple middlewares for example, it is not so clear where
    those should go.

    Change-Id: I2aa6c18ee5b68d0aae73cc6add8cac6fbf7f33da
    Signed-off-by: Thiago da Silva <email address hidden>

commit 5d7a3a4172f0f11ab870252eec784cf24b247dea
Author: Ondřej Nový <email address hidden>
Date: Sat Nov 19 23:24:30 2016 +0100

    Removed "in-process-" from func env tox name

    This shorten shebang in infra, because we are hitting 128 bytes limit.

    Change-Id: I02477d81b836df71780942189d37d616944c4dce

commit 9ea340256996a03c8c744201297b47a0e91fe65b
Author: Kota Tsuyuzaki <email address hidden>
Date: Fri Nov 18 01:50:11 2016 -0800

    Don't overwrite built-in 'id'

    This is a follow up for https://review.openstack.org/#/c/399237

    'id' is assigned as a builtin function so that we should not use 'id'
    for the local variable name.

    Change-Id: Ic27460d49e68f6cd50bda1d5b3810e01ccb07a37

commit bf...

tags: added: in-feature-hummingbird
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/swift 2.10.1

This issue was fixed in the openstack/swift 2.10.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.