Bug 988236

Summary: Large File Sequential I/O: Poor performance from GlusterFS over SMB
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Jose A. Rivera <jarrpa>
Component: sambaAssignee: Poornima G <pgurusid>
Status: CLOSED ERRATA QA Contact: Ben Turner <bturner>
Severity: high Docs Contact:
Priority: high    
Version: 2.1CC: bturner, grajaiya, shaines, vagarwal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-23 22:32:16 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: 956495    

Description Jose A. Rivera 2013-07-25 07:23:31 UTC
This bug was originally found by Tim Wilkinson and Ben England.

When trying to do sequential I/O (reads and writes) on a large file on a GlusterFS-based SMB share, we were getting unusual and unacceptably poor performance. On a lead from Ben regarding some odd locking behaviour, Raghavendra Talur and Anand Avati went digging and discovered a one-line smb.conf fix that seems to dramatically improve the performance in question:

  kernel oplocks = no

Comparing against I/O on a large file on an XFS-based SMB share, we get the following numbers for the VFS/libgfapi Samba configuration (in contrast to the FUSE-based Samba configuration):

WRITES: libgfapi is at ~85% of XFS (while FUSE is ~48%)
READS:  libgfapi is at ~78% of XFS (while FUSE is ~88%)

We recommend implementing this configuration option right away in RHS.

Comment 2 Christopher R. Hertel 2013-08-05 22:00:41 UTC
In the original description, a simple one-line change to the smb.conf file is recommended.  This change should have been handled in another BZ, so the change may already be in place.

Please check to see whether the change is in place.  If not, please add

  kernel oplocks = no

to the smb.conf configuration.  Gluster does not support oplocks, so this is the correct setting.

Comment 3 Poornima G 2013-08-06 06:37:59 UTC
This fix is released as a part of RHS-2.1-20130806.n.0.

Comment 4 Ben Turner 2013-08-07 21:27:19 UTC
Verified on RHS-2.1-20130806.n.2-RHS-x86_64-DVD1.iso, the /etc/samba/smb.conf now has:


# ------------------------ RHS Performance Tunings -------------------------
#
# The following options improve RHS performance in the following respective
# scenarios:
#
# - Large file sequential I/O
# - Small file operations

        kernel oplocks = no
        stat cache = no

#============================ Share Definitions ==============================

Comment 5 Scott Haines 2013-09-23 22:32:16 UTC
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.

http://rhn.redhat.com/errata/RHBA-2013-1262.html