diff options
| author | Jeff Darcy <jdarcy@redhat.com> | 2017-01-31 14:49:45 -0500 |
|---|---|---|
| committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-02-01 19:54:58 -0500 |
| commit | 83803b4b2d70e9e6e16bb050d7ac8e49ba420893 (patch) | |
| tree | 9a6c1f3f9a723bf578f78c624d3ce9f44baac6db /tests/basic/ec | |
| parent | 80b04666ec7019e132f76f734a88559457702f1b (diff) | |
core: run many bricks within one glusterfsd process
This patch adds support for multiple brick translator stacks running in
a single brick server process. This reduces our per-brick memory usage
by approximately 3x, and our appetite for TCP ports even more. It also
creates potential to avoid process/thread thrashing, and to improve QoS
by scheduling more carefully across the bricks, but realizing that
potential will require further work.
Multiplexing is controlled by the "cluster.brick-multiplex" global
option. By default it's off, and bricks are started in separate
processes as before. If multiplexing is enabled, then *compatible*
bricks (mostly those with the same transport options) will be started in
the same process.
Backport of:
> Change-Id: I45059454e51d6f4cbb29a4953359c09a408695cb
> BUG: 1385758
> Reviewed-on: https://review.gluster.org/14763
Change-Id: I4bce9080f6c93d50171823298fdf920258317ee8
BUG: 1418091
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: https://review.gluster.org/16496
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'tests/basic/ec')
| -rw-r--r-- | tests/basic/ec/ec-notify.t | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/basic/ec/ec-notify.t b/tests/basic/ec/ec-notify.t index 586be91bdbe..53290b7c798 100644 --- a/tests/basic/ec/ec-notify.t +++ b/tests/basic/ec/ec-notify.t @@ -5,11 +5,26 @@ # This test checks notify part of ec +# We *know* some of these mounts will succeed but not be actually usable +# (terrible idea IMO), so speed things up and eliminate some noise by +# overriding this function. +_GFS () { + glusterfs "$@" +} + +ec_up_brick_count () { + local bricknum + for bricknum in $(seq 0 2); do + brick_up_status $V0 $H0 $B0/$V0$bricknum + done | grep -E '^1$' | wc -l +} + cleanup TEST glusterd TEST pidof glusterd TEST $CLI volume create $V0 disperse 3 redundancy 1 $H0:$B0/${V0}{0..2} TEST $CLI volume start $V0 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "3" ec_up_brick_count #First time mount tests. # When all the bricks are up, mount should succeed and up-children @@ -33,6 +48,7 @@ EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 TEST $CLI volume start $V0 TEST kill_brick $V0 $H0 $B0/${V0}2 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" ec_up_brick_count TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0; EXPECT_WITHIN $CHILD_UP_TIMEOUT "2" ec_child_up_count $V0 0 TEST stat $M0 @@ -40,6 +56,7 @@ EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 # When only 1 brick is up mount should fail. TEST kill_brick $V0 $H0 $B0/${V0}1 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" ec_up_brick_count TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0; # Wait for 5 seconds even after that up_count should show 1 sleep 5 @@ -51,28 +68,33 @@ EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 # state changes in ec. TEST $CLI volume stop $V0 TEST $CLI volume start $V0 force +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "3" ec_up_brick_count TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0; EXPECT_WITHIN $CHILD_UP_TIMEOUT "3" ec_child_up_count $V0 0 TEST touch $M0/a # kill 1 brick and the up_count should become 2, fops should still succeed TEST kill_brick $V0 $H0 $B0/${V0}1 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" ec_up_brick_count EXPECT_WITHIN $CHILD_UP_TIMEOUT "2" ec_child_up_count $V0 0 TEST touch $M0/b # kill one more brick and the up_count should become 1, fops should fail TEST kill_brick $V0 $H0 $B0/${V0}2 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" ec_up_brick_count EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" ec_child_up_count $V0 0 TEST ! touch $M0/c # kill one more brick and the up_count should become 0, fops should still fail TEST kill_brick $V0 $H0 $B0/${V0}0 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" ec_up_brick_count EXPECT_WITHIN $CHILD_UP_TIMEOUT "0" ec_child_up_count $V0 0 TEST ! touch $M0/c # Bring up all the bricks up and see that up_count is 3 and fops are succeeding # again. TEST $CLI volume start $V0 force +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "3" ec_up_brick_count EXPECT_WITHIN $CHILD_UP_TIMEOUT "3" ec_child_up_count $V0 0 TEST touch $M0/c |
