From: David Disseldorp Date: Mon, 28 Nov 2016 13:16:22 +0000 (+0100) Subject: systemd/ceph-disk: reduce ceph-disk flock contention X-Git-Tag: v11.1.0~131^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F12200%2Fhead;p=ceph.git systemd/ceph-disk: reduce ceph-disk flock contention "ceph-disk trigger" invocation is currently performed in a mutually exclusive fashion, with each call first taking an flock on the path /var/lock/ceph-disk. On systems with a lot of osds, this leads to a large amount of lock contention during boot-up, and can cause some service instances to trip the 120 second timeout. Take an flock on a device specific path instead of /var/lock/ceph-disk, so that concurrent "ceph-disk trigger" invocations are permitted for independent osds. This greatly reduces lock contention and consequently the chance of service timeout. Per-device concurrency restrictions required for http://tracker.ceph.com/issues/13160 are maintained. Fixes: http://tracker.ceph.com/issues/18049 Signed-off-by: David Disseldorp --- diff --git a/systemd/ceph-disk@.service b/systemd/ceph-disk@.service index 5d1d557dc48c..e85f0dfb908b 100644 --- a/systemd/ceph-disk@.service +++ b/systemd/ceph-disk@.service @@ -6,5 +6,5 @@ Wants=local-fs.target [Service] Type=oneshot KillMode=none -ExecStart=/bin/sh -c 'timeout 120 flock /var/lock/ceph-disk /usr/sbin/ceph-disk --verbose --log-stdout trigger --sync %f' +ExecStart=/bin/sh -c 'timeout 120 flock /var/lock/ceph-disk-$(basename %f) /usr/sbin/ceph-disk --verbose --log-stdout trigger --sync %f' TimeoutSec=0