Bug 1660701 - Use adaptive mutex in rpcsvc_program_register to improve performance
Summary: Use adaptive mutex in rpcsvc_program_register to improve performance
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: rpc
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mohit Agrawal
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-19 02:30 UTC by Mohit Agrawal
Modified: 2023-09-14 04:44 UTC (History)
3 users (show)

Fixed In Version: glusterfs-6.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-25 16:32:47 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 21883 0 None Merged rpc: Use adaptive mutex in rpcsvc_program_register 2018-12-20 16:45:07 UTC

Description Mohit Agrawal 2018-12-19 02:30:18 UTC
Description of problem:
Adaptive mutexes are used to protect critical/shared data items that are held for short periods.
It provides a balance between spin locks and traditional mutex.
We have observed after use adaptive mutex in rpcsvc_program_register got some improvement.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Worker Ant 2018-12-19 02:48:36 UTC
REVIEW: https://review.gluster.org/21883 (rpc: Use adaptive mutex in rpcsvc_program_register) posted (#1) for review on master by MOHIT AGRAWAL

Comment 2 Yaniv Kaul 2018-12-19 15:08:37 UTC
Is there upstream developer documentation on when they should be used and how?

Comment 3 Worker Ant 2018-12-20 16:45:06 UTC
REVIEW: https://review.gluster.org/21883 (rpc: Use adaptive mutex in rpcsvc_program_register) posted (#3) for review on master by Raghavendra G

Comment 4 Raghavendra G 2018-12-20 16:57:31 UTC
(In reply to Yaniv Kaul from comment #2)
> Is there upstream developer documentation on when they should be used and
> how?

Currently I am not aware of one. Even with [1] there was marginal regression due to [1]. Thinking it was due to the mutex controlling access to the request queue, I thought of using spinlocks as I was expecting critical section to be very small (just adding/removing an element to list). However, pthread conditional variables couldn't be used with spinlocks and hence as a second option we tried adaptive mutex. After running perf benchmarks (small file workload [3]) indeed showed adaptive mutex was helpful.

I referred to [4], which led to [5]

[1] https://review.gluster.org/r/I578c3fc67713f4234bd3abbec5d3fbba19059ea5
[2] https://review.gluster.org/17105
[3] https://github.com/distributed-system-analysis/smallfile
[4] https://stackoverflow.com/questions/19863734/what-is-pthread-mutex-adaptive-np
[5] http://lkml.iu.edu/hypermail/linux/kernel/0103.1/0030.html

Comment 5 Shyamsundar 2019-03-25 16:32:47 UTC
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-6.0, please open a new bug report.

glusterfs-6.0 has been announced on the Gluster mailinglists [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] https://lists.gluster.org/pipermail/announce/2019-March/000120.html
[2] https://www.gluster.org/pipermail/gluster-users/

Comment 6 Red Hat Bugzilla 2023-09-14 04:44:00 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.