Seting up read balancing globaly

Hi everyone! Can someone explane me how to corectly set up read balancing globaly, for all my drbd devices? All existing and all I will create in future. In this article

I read about configuration file - disk section. Is it mean /etc/drbd.d/global_common.conf ? I can’t find this in commented part of disk section. And how I must corectly write this parameter? Maybe some example :wink:

If you want it to apply to every DRBD device, you would put it in the global_common.conf, within the common then disk section.

From the drbd.conf man page:

       read-balancing method
           The supported methods for load balancing of read requests are prefer-local, 
           prefer-remote, round-robin, least-pending, when-congested-remote, 
           32K-striping, 64K-striping, 128K-striping, 256K-striping, 512K-striping and 
           1M-striping.

           The default value of read-balancing is prefer-local. This option is available 
           since 8.4.1.

So something like this could be an example:

common {
...
        disk {
                # size on-io-error fencing disk-barrier disk-flushes
                # disk-drain md-flushes resync-rate resync-after al-extents
                # c-plan-ahead c-delay-target c-fill-target c-max-rate
                # c-min-rate disk-timeout

                read-balancing least-pending;
        }
}
...

If you only wanted it to apply to specific DRBD resources, you would put it within the disk section of that specific resource configuration rather than the global_common.conf

2 Likes

Great!! Thank you so much, thats what I’m looking for.

1 Like