diff options
| author | Kevin Vigor <kvigor@fb.com> | 2017-03-16 10:35:25 -0700 |
|---|---|---|
| committer | Kevin Vigor <kvigor@fb.com> | 2017-03-16 10:35:25 -0700 |
| commit | ae361e8339cc51966ebd222d7fb9046e936d56f5 (patch) | |
| tree | 9c893ed88dc4086238e90e59c6ab37aee6cd308a /extras | |
| parent | 35cfc2853a617a8ee8ed499b6c989b5bed41b2b7 (diff) | |
| parent | 68d5c0ef243a9f27939128d1d12d519167ad988a (diff) | |
Merge remote-tracking branch 'origin/release-3.8' into merge-3.8
Change-Id: Ib336c2ada491c2d2fcbbbe6865f9eb975a405b36
Diffstat (limited to 'extras')
| -rw-r--r-- | extras/group-virt.example | 9 | ||||
| -rwxr-xr-x | extras/rebalance.py | 10 |
2 files changed, 16 insertions, 3 deletions
diff --git a/extras/group-virt.example b/extras/group-virt.example index 4fe3760be2c..6361f1b72bc 100644 --- a/extras/group-virt.example +++ b/extras/group-virt.example @@ -2,9 +2,14 @@ performance.quick-read=off performance.read-ahead=off performance.io-cache=off performance.stat-prefetch=off -cluster.eager-lock=enable +performance.low-prio-threads=32 network.remote-dio=enable +cluster.eager-lock=enable cluster.quorum-type=auto cluster.server-quorum-type=server -features.shard=on cluster.data-self-heal-algorithm=full +cluster.locking-scheme=granular +cluster.shd-max-threads=8 +cluster.shd-wait-qlength=10000 +features.shard=on +user.cifs=off diff --git a/extras/rebalance.py b/extras/rebalance.py index 80c614c5dfe..9579e5616ad 100755 --- a/extras/rebalance.py +++ b/extras/rebalance.py @@ -11,6 +11,7 @@ import subprocess import sys import tempfile import volfilter +import platform # It's just more convenient to have named fields. class Brick: @@ -218,12 +219,19 @@ if __name__ == "__main__": total = 0 for b in bricks: info = os.statvfs(b.path) + # On FreeBSD f_bsize (info[0]) contains the optimal I/O size, + # not the block size as it's found on Linux. In this case we + # use f_frsize (info[1]). + if platform.system() == 'FreeBSD': + bsize = info[1] + else: + bsize = info[0] # We want a standard unit even if different bricks use # different block sizes. The size is chosen to avoid overflows # for very large bricks with very small block sizes, but also # accommodate filesystems which use very large block sizes to # cheat on benchmarks. - blocksper100mb = 104857600 / info[0] + blocksper100mb = 104857600 / bsize if options.free_space: size = info[3] / blocksper100mb else: |
