Bug 910217
| Summary: | Implement a way for dynamically disabling eager-lock based on number of files opened on the inode | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Pranith Kumar K <pkarampu> | ||||
| Component: | replicate | Assignee: | Pranith Kumar K <pkarampu> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | spandura | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | mainline | CC: | gluster-bugs, matt, nsathyan, tstclair | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | glusterfs-3.5.2 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 921231 (view as bug list) | Environment: | |||||
| Last Closed: | 2014-09-16 19:44:09 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 921231 | ||||||
| Attachments: |
|
||||||
REVIEW: http://review.gluster.org/5432 (cluster/afr: Disable eager-lock if open-fd-count > 1) posted (#2) for review on master by Pranith Kumar Karampuri (pkarampu) REVIEW: http://review.gluster.org/5433 (storage/posix: Enable Open-fd-count query in writev) posted (#1) for review on master by Pranith Kumar Karampuri (pkarampu) REVIEW: http://review.gluster.org/5432 (cluster/afr: Disable eager-lock if open-fd-count > 1) posted (#3) for review on master by Pranith Kumar Karampuri (pkarampu) REVIEW: http://review.gluster.org/5433 (storage/posix: Enable Open-fd-count query in writev) posted (#2) for review on master by Pranith Kumar Karampuri (pkarampu) COMMIT: http://review.gluster.org/5433 committed in master by Vijay Bellur (vbellur) ------ commit 423aa0d57a031e865374d18cdcc489273317d785 Author: Pranith Kumar K <pkarampu> Date: Tue Jul 30 12:28:47 2013 +0530 storage/posix: Enable Open-fd-count query in writev Change-Id: I86bdf865730416150c10617dcbad5c037579acde BUG: 910217 Signed-off-by: Pranith Kumar K <pkarampu> Reviewed-on: http://review.gluster.org/5433 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Raghavendra Bhat <raghavendra> Reviewed-by: Vijay Bellur <vbellur> COMMIT: http://review.gluster.org/5432 committed in master by Vijay Bellur (vbellur) ------ commit 36b102645ab66d141dcc831e67caa78966d45419 Author: Pranith Kumar K <pkarampu> Date: Tue Jul 30 18:29:15 2013 +0530 cluster/afr: Disable eager-lock if open-fd-count > 1 Lets say mount1 has eager-lock(full-lock) and after the eager-lock is taken mount2 opened the same file, it won't be able to perform any data operations until mount1 releases eager-lock. To avoid such scenario do not enable eager-lock for transaction if open-fd-count is > 1. Delaying of changelog piggybacking is avoided in this situation. Change-Id: I51b45d6a7c216a78860aff0265a0b8dabc6423a5 BUG: 910217 Signed-off-by: Pranith Kumar K <pkarampu> Reviewed-on: http://review.gluster.org/5432 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: venkatesh somyajulu <vsomyaju> Reviewed-by: Vijay Bellur <vbellur> REVIEW: http://review.gluster.org/5238 (cluster/afr: Have common inode-write-fop cbk) posted (#3) for review on master by Pranith Kumar Karampuri (pkarampu) REVIEW: http://review.gluster.org/5238 (cluster/afr: Have common inode-write-fop cbk) posted (#4) for review on master by Pranith Kumar Karampuri (pkarampu) COMMIT: http://review.gluster.org/5238 committed in master by Anand Avati (avati) ------ commit f86a37bddf0f301c820c2a3ead50a93ce30dd2dc Author: Pranith Kumar K <pkarampu> Date: Sat Feb 23 13:08:37 2013 +0530 cluster/afr: Have common inode-write-fop cbk Change-Id: Ia7b324b86d6a7051d187106d7a060155e77defc5 BUG: 910217 Signed-off-by: Pranith Kumar K <pkarampu> Reviewed-on: http://review.gluster.org/5238 Reviewed-by: Ravishankar N <ravishankar> Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Anand Avati <avati> Since the patch is merged in upstream master a while ago, please verify it in any of the latest master builds, being used for Denali testing. This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.5.2, please reopen this bug report. glusterfs-3.5.2 has been announced on the Gluster Users mailinglist [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] http://supercolony.gluster.org/pipermail/gluster-users/2014-July/041217.html [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user |
Created attachment 696346 [details] Script used to execute the steps in re-creating the bug. Description of problem: When there are multiple fds writing to same file with eager-lock enabled, the fd which acquires the eager-lock waits for post-op-delay secs before doing the unlock. Because of this all other fds opened on the file face extra delay when performing writes. Eager-locking, post-op-delay need to be disabled when there are multiple fds opened on the file. Here is the profile info output for the case above: Execute the following command on the mount point. for n in `seq 1 50` ; do eval "/home/pranithk/workspace/gerrit-repo/append2log.py ./ben.log 10000 0.001 &" ; done ; wait %-latency Avg-latency Min-Latency Max-Latency No. of calls Fop --------- ----------- ----------- ----------- ------------ ---- 0.00 0.00 us 0.00 us 0.00 us 50 RELEASE 0.00 0.00 us 0.00 us 0.00 us 60 RELEASEDIR 0.00 55.00 us 55.00 us 55.00 us 1 GETXATTR 0.00 31.50 us 27.00 us 36.00 us 2 STATFS 0.00 41.00 us 29.00 us 53.00 us 2 ENTRYLK 0.00 198.00 us 198.00 us 198.00 us 1 CREATE 0.00 124.00 us 108.00 us 140.00 us 2 READDIR 0.00 27.04 us 17.00 us 95.00 us 49 OPEN 0.00 74.89 us 13.00 us 206.00 us 47 STAT 0.01 87.02 us 11.00 us 391.00 us 50 FLUSH 0.01 102.43 us 20.00 us 268.00 us 60 OPENDIR 0.02 344.27 us 22.00 us 940.00 us 44 WRITE 0.02 228.80 us 52.00 us 345.00 us 82 FXATTROP 0.03 199.89 us 19.00 us 404.00 us 120 READDIRP 0.05 91.41 us 23.00 us 832.00 us 421 LOOKUP 99.86 632698.45 us 17.00 us 1999724.00 us 126 FINODELK Observe that most of the delay is in FINODELK fop. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: