<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi guys,</div>
<div>I have spent many days on debuging read/write performance of glusterfs with samba-gluster-vfs plugin recently. The write performance is okay, but the&nbsp;read speed&nbsp;is always dispirited.</div>
<div>The testing environment is like this:</div>
<div>&nbsp;&nbsp;&nbsp;<strong>&nbsp;OS: </strong>centos 6.4</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;<strong>hosts</strong>: two hosts, one for samba server&nbsp;which&nbsp;glusterfs with samba-glusterfs-vfs&nbsp;runs on it, the other for samba client</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;<strong>glusterfs version</strong>: &nbsp;3.4.2</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;<strong>samba-glusterfs-vfs</strong>:&nbsp; git://forge.gluster.org/samba-glusterfs/samba-glusterfs-vfs.git.</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;<strong>gluster volume type </strong>:&nbsp;Distributed </div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;<strong>smb.conf:&nbsp;</strong><br>&nbsp;&nbsp;&nbsp;&nbsp;large readwrite = yes<br>&nbsp;&nbsp;&nbsp;&nbsp;aio read size = 262144<br>&nbsp;&nbsp;&nbsp;&nbsp;aio write size = 262144<br>&nbsp;&nbsp;&nbsp;&nbsp;aio write behind = true<br>&nbsp;&nbsp;&nbsp;&nbsp;;min receivefile size = 262144<br>&nbsp;&nbsp;&nbsp;&nbsp;;write cache size = 268435456 <br>&nbsp;&nbsp;&nbsp;&nbsp;read raw = yes<br>&nbsp;&nbsp;&nbsp;&nbsp;write raw = yes<br>&nbsp;&nbsp;&nbsp;&nbsp;max xmit = 262144<br>&nbsp;&nbsp;&nbsp;&nbsp;socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=262144 SO_SNDBUF=262144<br>&nbsp;&nbsp;&nbsp;&nbsp;kernel oplocks = no<br>&nbsp;&nbsp;&nbsp;&nbsp;stat cache = no</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;[gluster]<br>&nbsp;&nbsp;&nbsp;&nbsp;vfs objects = glusterfs<br>&nbsp;&nbsp;&nbsp;&nbsp;glusterfs:volume = test<br>&nbsp;&nbsp;&nbsp;&nbsp;glusterfs:volfile_server = localhost <br>&nbsp;&nbsp;&nbsp;&nbsp;browseable = yes<br>&nbsp;&nbsp;&nbsp;&nbsp;guest ok = yes<br>&nbsp;&nbsp;&nbsp;&nbsp;read only = no<br>&nbsp;&nbsp;&nbsp;&nbsp;writable = yes<br>&nbsp;&nbsp;&nbsp;&nbsp;path = /<br>&nbsp;&nbsp;&nbsp;&nbsp;public = yes<br>&nbsp;&nbsp;&nbsp;&nbsp;comment = For samba export of volume test<br>&nbsp;&nbsp;&nbsp;&nbsp;write list = <br>&nbsp;&nbsp;&nbsp;&nbsp;valid users = a2</div>
<div><strong>Firstly, i mount the shared on client with command like this:</strong></div>
<div># mount -t cifs -o username=a2 //192.168.102.189/gluster /mnt</div>
<div><strong>And then test read performance with dd command like this:</strong></div>
<div># dd if=/dev/zero of=/mnt/d1 bs=128k count=10240</div>
<div><strong>the write speed : 350 - 420 MB</strong></div>
<div># dd if=/mnt/d1 of=/dev/null bs=128k count=10240</div>
<div><strong>the read speed : 19 - 20 MB</strong></div>
<div>The read speed is unbelievably slow. </div>
<div>When i modified the smb.conf to exporting glusterfs fuse mount directory directly without using samba-glusterfs-vfs plugin, I got the performance results as follows:</div>
<div>
<div><strong>the write speed :&nbsp;150 -&nbsp;180 MB</strong></div>
<div><strong>the&nbsp;read speed :&nbsp; 62 - 64MB</strong></div>
<div>In&nbsp;contrast with the result&nbsp;with samba-gluster-vfs, it&nbsp;looks like&nbsp;our plugin reduced the read speed through CIFS. </div>
<div>Why is there such a situation?&nbsp; Where is the problem? Any reply will be&nbsp; appreciated.&nbsp;Thanks very much!</div>
<div>with best regards!</div>
<div>lou.chen&nbsp;</div>
<div>&nbsp;</div></div>
<div>&nbsp;</div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>