Bug 1314145

Summary: SMB: AIO writes are slower when aio write size = 4096 is enabled.
Product: Red Hat Gluster Storage Reporter: Ben Turner <bturner>
Component: sambaAssignee: rhs-smb <rhs-smb>
Status: CLOSED NOTABUG QA Contact: Ben Turner <bturner>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: ira, nlevinki
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-08 11:26:01 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:

Description Ben Turner 2016-03-03 03:58:09 UTC
Description of problem:

Writes are slower when AIO is enabled:

AIO write 4096 enabled:
[root@gqac006 ~]# dd if=/dev/zero of=/gluster-mount/test.txt bs=1024k count=1000 conv=fdatasync
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 3.30806 s, 317 MB/s

AIO disabled:
[root@gqac006 ~]# dd if=/dev/zero of=/gluster-mount/test.txt bs=1024k count=1000 conv=fdatasync
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 2.78396 s, 377 MB/s

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

[root@gqas001 ~]# rpm -q samba
samba-4.2.4-13.el6rhs.x86_64
[root@gqas001 ~]# rpm -q glusterfs
glusterfs-3.7.5-19.el6rhs.x86_64

How reproducible:

Every way I have tested so far.

Steps to Reproduce:
1.  Enable aio write = 4096 in smb.conf
2.  Run write benchmark with AIO enabled.

Actual results:

Writes are slower with AIO enabled.

Expected results:

Like reads, AIO writes will improve performance.

Additional info:

Comment 2 Ira Cooper 2016-03-08 11:26:01 UTC
AIO is not guaranteed to improve performance.

AIO is an option we expect could slow down SOME workloads, and SMB1 single threaded workloads are among the ones I expect could get hit.  Like your Linux workload.

I'd also expect that any workload without significant parallelism, could be hurt.

A multithreaded write windows workload MIGHT show a benefit.  The workload you show, getting hurt, is no surprise.

The reason it works for reads, is that almost all SMB clients do readahead, so we get a multithreaded workload for read, automatically.

So, the write setting is likely more "tuning" oriented than the read one.

But this is distinctly NOTABUG.