Description of problem: Users can configure the no. of worker poller threads for a volume via the following volume options. client.event-threads - for GlusterFS native mount, gluster-NFS server and other glusterfs daemons that load the protocol/client translator. server.event-threads - for brick processes Sub-problem 1: -------------- The default for both of the above options is 2. In this release, we can observe that only one poller worker thread is waiting for network events by default. Using the following bash function, we can verify the above claim. It doubles up as a means to verify the fix. /* Returns a line containing "SyS_epoll_wait+0xb5/0xe0" for every epoll thread running in a process. Usage: nepoll <pid> */ function nepoll () { local pid=$1; for i in $(ls /proc/$pid/task); do cat /proc/$pid/task/$i/stack | grep epoll_wait; done } With this helper you can count the no. of epoll threads in a process at any given time, by doing "# nepoll <pid> | wc -l". Sample output: [root@trantor codebase]# nepoll 3685 [<ffffffff81208c25>] SyS_epoll_wait+0xb5/0xe0 Sub-problem 2: -------------- After setting the client.event-threads to 5 (for e.g), volume-reset doesn't bring down the count back to 2 (viz. the default) and instead remains at 5. Sample output: [root@trantor codebase]# nepoll 3685 [<ffffffff81208c25>] SyS_epoll_wait+0xb5/0xe0 [<ffffffff81208c25>] SyS_epoll_wait+0xb5/0xe0 [<ffffffff81208c25>] SyS_epoll_wait+0xb5/0xe0 [<ffffffff81208c25>] SyS_epoll_wait+0xb5/0xe0 [<ffffffff81208c25>] SyS_epoll_wait+0xb5/0xe0 Version-Release number of selected component (if applicable): glusterfs-3.6.0.44-1 How reproducible: Always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
NB Version no. in the description should have been glusterfs-3.6.0.45-1.
By default, server.event-threads and client.event-threads are set to 2. That solves the subproblem-1 as mentioned in comment0 For subproblem-2, as mentioned in comment0, resetting the client.event-threads or server.event-threads doesn't reduce the count of epoll threads to the default value of 2, unless an IO is performed on that mount.
Removing the need-info, as it was set mistakenly
Verified with glusterfs-3.6.0.48-1.el6rhs with the following steps : 1. Create a replicate volume and started it 2. Fuse mounted the volume with RHEL 6.5 3. Executed the script mentioned in comment0 with pid of fuse mount 4. Executed the script mentioned in comment0 with pid of brick process Observed: There are 2 epoll_wait threads, which should be the default. Also executed the test cases in https://tcms.engineering.redhat.com/plan/17096/rhs-glusterfs-epoll-configuration The problem that was found was - resetting the {server,client}.event-threads, doesn't reduce the epoll_thread count to 2, unless IO was performed from the mount. I have raised a seperate bug - https://bugzilla.redhat.com/show_bug.cgi?id=1200679 to track that issue. Marking this bug as VERIFIED based on above observation
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0682.html