diff options
| author | Shreyas Siravara <sshreyas@fb.com> | 2016-03-30 15:35:15 -0700 |
|---|---|---|
| committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-09-12 15:28:24 +0000 |
| commit | 4e880ed12b989b36387ea79179b5f14d8cee9491 (patch) | |
| tree | 46315bedb250d1b360a1102cc8319239ffa05adf /tests/basic | |
| parent | 14e24da1eb59a85fe99c22bafd8641ca2b75a923 (diff) | |
nfs: Enable multi-core epoll support in gNFSd
Summary:
- Enables multi-core epoll support in the nfs daemon.
- Option can be turned on using:
gluster volume set <volname> nfs.event-threads <numthreads>
Test Plan: Prove test!
Reviewers: kvigor, rwareing
Reviewed By: rwareing
Subscribers: dld, moox, dph
Differential Revision: https://phabricator.fb.com/D3117966
Change-Id: Ie8a7b1ba04b0e83f5ec7a09f9d181fe59be479ca
Signed-off-by: Jeff Darcy <jdarcy@fb.com>
Reviewed-on: https://review.gluster.org/18266
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Tested-by: Jeff Darcy <jeff@pl.atyp.us>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'tests/basic')
| -rw-r--r-- | tests/basic/nfs-multicore-epoll.t | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/basic/nfs-multicore-epoll.t b/tests/basic/nfs-multicore-epoll.t new file mode 100644 index 00000000000..28f341521f9 --- /dev/null +++ b/tests/basic/nfs-multicore-epoll.t @@ -0,0 +1,40 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc +. $(dirname $0)/../nfs.rc + +cleanup; + +>/var/log/glusterfs/nfs.log; + +function check_event_thread_log () +{ + local nlines + + nlines=$(grep "$1" /var/log/glusterfs/nfs.log | grep -v G_LOG | wc -l) + if [ "$nlines" != "0" ]; then + echo "Y" + else + echo "N" + fi; +} + +TEST glusterd +TEST pidof glusterd +TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{0,1,2} +TEST $CLI volume set $V0 nfs.disable off +TEST $CLI volume start $V0 + +EXPECT_WITHIN $NFS_EXPORT_TIMEOUT "1" is_nfs_export_available; + +# Make sure its not enabled without the option +EXPECT_WITHIN 10 "N" check_event_thread_log "Started thread with index 3"; + +# Turn it on and check that we spawned the threads +TEST $CLI volume set $V0 nfs.disable on +TEST $CLI volume set $V0 nfs.event-threads 4 +TEST $CLI volume set $V0 nfs.disable off +EXPECT_WITHIN 10 "Y" check_event_thread_log "Started thread with index 4"; + +cleanup; |
