From 8a62cbc074b711275cfd57b372bfb35f6a017833 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Mon, 28 Nov 2016 14:16:22 +0100 Subject: [PATCH] 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 --- systemd/ceph-disk@.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.3