Tuning the DRBD Knockout Count Setting for DRBD Proxy
This article will explain how you should tune the DRBD® knockout count
setting, ko-count
, for use with DRBD Proxy.
One way that you can tune DRBD Proxy performance is to tune the ko-count
or
timeout
settings so that the value of (timeout / 10) * ko-count
is greater
than the amount of time that it takes to flush a full DRBD Proxy buffer. If you
divide the value of timeout by 10 (because it is measured in tenths of a
second), then ko-count
is set to 7 by default, because timeout
is set to 60
by default.
The following inequality comparison should be true:
(timeout/10)s * (ko-count) > (memlimit MB) / (Bandwidth MB/s)
For example, if you had a 10MBps link, and a Proxy buffer 500MB in size, you would start with the following inequality comparison:
(60/10)s * 7 > 500 MB / 10 MB/s
This reduces to:
42s > 50s
…which is not true.
To make the inequality true, you could tune ko-count
up to 9, or timeout
up to 80. It is usually preferred to tune ko-count
over timeout
because the
ko-count
option was designed for this use case. Adjusting timeout
could affect other DRBD behaviors. Adjusting ko-count
up to 9 results
in the following:
(60/10)s * 9 > 500MB / 10MB/s
This reduces to:
54s > 50s
…which is true.
Tuning your ko-count
appropriately will allow DRBD to more gracefully
disconnect from a peer that is having difficulty flushing replicated
writes to disk, which could otherwise cripple performance on the Primary
node.
Reviewed 2020/12/01 – DGT