<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 01/22/2016 07:14 AM,
<a class="moz-txt-link-abbreviated" href="mailto:li.ping288@zte.com.cn">li.ping288@zte.com.cn</a> wrote:<br>
</div>
<blockquote
cite="mid:OF4E0D94AB.CD1AFBEA-ON48257F42.00077073-48257F42.00099089@zte.com.cn"
type="cite"><font face="sans-serif" size="2">Hi </font><tt><font
size="2">Pranith</font></tt><font face="sans-serif" size="2">,
it is appreciated for your reply.</font>
<br>
<br>
<tt><font size="2">Pranith Kumar Karampuri
<a class="moz-txt-link-rfc2396E" href="mailto:pkarampu@redhat.com"><pkarampu@redhat.com></a>
写于 2016/01/20 18:51:19:<br>
<br>
> 发件人: Pranith Kumar Karampuri <a class="moz-txt-link-rfc2396E" href="mailto:pkarampu@redhat.com"><pkarampu@redhat.com></a></font></tt>
<br>
<tt><font size="2">> 收件人: <a class="moz-txt-link-abbreviated" href="mailto:li.ping288@zte.com.cn">li.ping288@zte.com.cn</a>,
<a class="moz-txt-link-abbreviated" href="mailto:gluster-devel@gluster.org">gluster-devel@gluster.org</a>,
</font></tt>
<br>
<tt><font size="2">> 日期: 2016/01/20 18:51</font></tt>
<br>
<tt><font size="2">> 主题: Re: [Gluster-devel] Gluster AFR volume
write performance has <br>
> been seriously affected by GLUSTERFS_WRITE_IS_APPEND in
afr_writev</font></tt>
<br>
<tt><font size="2">> <br>
> Sorry for the delay in response.<br>
</font></tt>
<br>
<tt><font size="2">> On 01/15/2016 02:34 PM,
<a class="moz-txt-link-abbreviated" href="mailto:li.ping288@zte.com.cn">li.ping288@zte.com.cn</a>
wrote:</font></tt>
<br>
<tt><font size="2">> GLUSTERFS_WRITE_IS_APPEND Setting in
afr_writev
function at <br>
> glusterfs client end makes the posix_writev in the server
end deal
<br>
> IO write fops from parallel to serial in consequence. <br>
> <br>
> i.e. multiple io-worker threads carrying out IO write
fops are
<br>
> blocked in posix_writev to execute final write fop
pwrite/pwritev
in<br>
> __posix_writev function ONE AFTER ANOTHER. <br>
> <br>
> For example: <br>
> <br>
> thread1: iot_worker -> ... -> posix_writev() |
<br>
> thread2: iot_worker -> ... -> posix_writev() |
<br>
> thread3: iot_worker -> ... -> posix_writev()
->
__posix_writev() <br>
> thread4: iot_worker -> ... -> posix_writev() |
<br>
> <br>
> there are 4 iot_worker thread doing the 128KB IO write
fops as <br>
> above, but only one can execute __posix_writev function
and the <br>
> others have to wait. <br>
> <br>
> however, if the afr volume is configured on with
storage.linux-aio
<br>
> which is off in default, the iot_worker will use
posix_aio_writev
<br>
> instead of posix_writev to write data. <br>
> the posix_aio_writev function won't be affected by <br>
> GLUSTERFS_WRITE_IS_APPEND, and the AFR volume write
performance goes
up. </font></tt>
<br>
<tt><font size="2">> I think this is a bug :-(.</font></tt>
<br>
<br>
<tt><font size="2">Yeah, I agree with you. I suppose the
GLUSTERFS_WRITE_IS_APPEND
is a misuse in afr_writev.</font></tt>
<br>
<tt><font size="2">I checked the original intent of
GLUSTERS_WRITE_IS_APPEND
change at review website:</font></tt>
<br>
<a moz-do-not-send="true"
href="http://review.gluster.org/#/c/5501/"><font color="blue"
size="3"><u>http://review.gluster.org/#/c/5501/</u></font></a><font
size="3">
</font>
<br>
<br>
<tt><font size="2">The initial purpose seems to avoid an
unnecessary
</font></tt><tt><font color="#2f2f2f" size="2">fsync()</font></tt><font
size="3">
</font><tt><font size="2">in </font></tt>
<br>
<tt><font size="2">afr_changelog_post_op_safe function if the
writing
data position </font></tt>
<br>
<tt><font size="2">was currently at the end of the file, detected
by
</font></tt>
<br>
<tt><font size="2">(preop.ia_size == offset || (fd->flags &
O_APPEND))
in posix_writev.</font></tt>
<br>
<br>
<tt><font size="2">In </font></tt><tt><font size="2">comparison
with the
afr write performance loss, I think </font></tt>
<br>
<tt><font size="2">it costs too much. </font></tt>
<br>
<br>
<tt><font size="2">I suggest to make the </font></tt><tt><font
size="2">GLUSTERS_WRITE_IS_APPEND
</font></tt><tt><font size="2">setting configurable</font></tt>
<br>
<tt><font size="2">just as ensure-durability in afr.</font></tt>
<br>
</blockquote>
<br>
You are right, it doesn't make sense to put this option in
dictionary if ensure-durability is off.
<a class="moz-txt-link-freetext" href="http://review.gluster.org/13285">http://review.gluster.org/13285</a> addresses this. Do you want to try
this out?<br>
Thanks for doing most of the work :-). Do let me know if you want to
raise a bug for this. Or I can take that up if you don't have time.<br>
<br>
Pranith<br>
<blockquote
cite="mid:OF4E0D94AB.CD1AFBEA-ON48257F42.00077073-48257F42.00099089@zte.com.cn"
type="cite">
<br>
<tt><font size="2">> <br>
> So, my question is whether AFR volume could work fine
with <br>
> storage.linux-aio configuration which bypass the <br>
> GLUSTERFS_WRITE_IS_APPEND setting in afr_writev, <br>
> and why glusterfs keeps posix_aio_writev different from
posix_writev
? <br>
> <br>
> Any replies to clear my confusion would be grateful, and
thanks in
advance.</font></tt>
<br>
<tt><font size="2">> What is the workload you have? multiple
writers
on same file workloads?</font></tt>
<br>
<br>
<tt><font size="2">I test the afr gluster volume by fio like this:</font></tt>
<br>
<tt><font size="2">fio --filename=/mnt/afr/20G.dat --direct=1
--rw=write
--bs=128k --size=20G --numjobs=8 </font></tt>
<br>
<tt><font size="2">--runtime=60 --group_reporting --name=afr_test
--iodepth=1
--ioengine=libaio</font></tt>
<br>
<br>
<tt><font size="2">The Glusterfs BRICKS are two IBM X3550 M3. </font></tt>
<br>
<br>
<tt><font size="2">The local disk direct write performance of
128KB IO
req block size is about 18MB/s </font></tt>
<br>
<tt><font size="2">in single thread and 80MB/s in 8 multi-threads.</font></tt>
<br>
<br>
<tt><font size="2">If the GLUSTERS_WRITE_IS_APPEND is configed,
the afr
gluster volume write performance is 18MB/s</font></tt>
<br>
<tt><font size="2">as the single thread, and if not, the
performance
is nearby 75MB/s.(network bandwith is enough)</font></tt>
<br>
<tt><font size="2"><br>
> <br>
> Pranith</font></tt>
<br>
<tt><font size="2">> <br>
> <br>
> --------------------------------------------------------<br>
> ZTE Information Security Notice: The information
contained in this
<br>
> mail (and any attachment transmitted herewith) is
privileged and <br>
> confidential and is intended for the exclusive use of the
addressee<br>
> (s). If you are not an intended recipient, any
disclosure, <br>
> reproduction, distribution or other dissemination or use
of the <br>
> information contained is strictly prohibited. If you
have received
<br>
> this mail in error, please delete it and notify us
immediately.<br>
> <br>
</font></tt>
<br>
<tt><font size="2">> <br>
> <br>
</font></tt>
<br>
<tt><font size="2">>
_______________________________________________<br>
> Gluster-devel mailing list<br>
> <a class="moz-txt-link-abbreviated" href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
> </font></tt><a moz-do-not-send="true"
href="http://www.gluster.org/mailman/listinfo/gluster-devel"><tt><font
size="2">http://www.gluster.org/mailman/listinfo/gluster-devel</font></tt></a>
<br>
<pre><font color="blue">
--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited. If you have received this mail in error, please delete it and notify us immediately.
</font></pre>
<br>
</blockquote>
<br>
</body>
</html>