<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
CC Raghavendra G, who maintains performance translators to explain
how io-cache works.<br>
<br>
Pranith<br>
<div class="moz-cite-prefix">On 08/22/2014 09:14 PM, Juan José
Pavlik Salles wrote:<br>
</div>
<blockquote
cite="mid:CAKCETkeN01m6E-+GSOveca7PFQLoVDLP_Mh-cyZN56EoQF9TSg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Ben, I also thought of that, but look at this:
<div><br>
</div>
<div>
<div>[root@gluster-client-1 gluster_vol]# echo 3 >
/proc/sys/vm/drop_caches; dd if=/mnt/gluster_vol/128
of=/dev/null bs=1M; </div>
<div>
128+0 records in</div>
<div>128+0 records out</div>
<div>134217728 bytes (134 MB) copied, 6,70874 s, 20,0 MB/s</div>
<div>[root@gluster-client-1 gluster_vol]# echo 3 >
/proc/sys/vm/drop_caches; dd if=/mnt/gluster_vol/128
of=/dev/null bs=1M; </div>
<div>128+0 records in</div>
<div>128+0 records out</div>
<div>134217728 bytes (134 MB) copied, 0,160485 s, 836 MB/s</div>
<div>[root@gluster-client-1 gluster_vol]# echo 3 >
/proc/sys/vm/drop_caches; dd if=/mnt/gluster_vol/128
of=/dev/null bs=1M; </div>
<div>128+0 records in</div>
<div>128+0 records out</div>
<div>134217728 bytes (134 MB) copied, 0,148219 s, 906 MB/s</div>
<div>[root@gluster-client-1 gluster_vol]# </div>
</div>
<div><br>
</div>
<div>even dropping kernel caches I get a really fast answer. I
think that this is io-cache translator working on the client
side for sure.</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2014-08-22 12:27 GMT-03:00 Ben Turner <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:bturner@redhat.com" target="_blank">bturner@redhat.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb">
<div class="h5">----- Original Message -----<br>
> From: "Juan José Pavlik Salles" <<a
moz-do-not-send="true"
href="mailto:jjpavlik@gmail.com">jjpavlik@gmail.com</a>><br>
> To: <a moz-do-not-send="true"
href="mailto:gluster-users@gluster.org">gluster-users@gluster.org</a><br>
> Sent: Thursday, August 21, 2014 4:07:28 PM<br>
> Subject: [Gluster-users] Gluster 3.5.2 gluster, how
does cache work?<br>
><br>
> Hi guys, I've been reading a bit about caching in
gluster volumes, but I<br>
> still don't get a few things. I set up a gluster
replica 2 volume like this:<br>
><br>
> [root@gluster-test-1 ~]# gluster vol info vol_rep<br>
> Volume Name: vol_rep<br>
> Type: Replicate<br>
> Volume ID: b77db06d-2686-46c7-951f-e43bde21d8ec<br>
> Status: Started<br>
> Number of Bricks: 1 x 2 = 2<br>
> Transport-type: tcp<br>
> Bricks:<br>
> Brick1: gluster-test-1:/ladrillos/l1/l<br>
> Brick2: gluster-test-2:/ladrillos/l1/l<br>
> Options Reconfigured:<br>
> performance.cache-min-file-size: 90MB<br>
> performance.cache-max-file-size: 256MB<br>
> performance.cache-refresh-timeout: 60<br>
> performance.cache-size: 256MB<br>
> [root@gluster-test-1 ~]#<br>
><br>
> Then I mounted the volume with gluster client on
another machine. I created<br>
> an 80Mbytes file called 80, and here you have the
reading test:<br>
><br>
> [root@gluster-client-1 gluster_vol]# dd
if=/mnt/gluster_vol/80 of=/dev/null<br>
> bs=1M<br>
> 80+0 records in<br>
> 80+0 records out<br>
> 83886080 bytes (84 MB) copied, 1,34145 s, 62,5 MB/s<br>
> [root@gluster-client-1 gluster_vol]# dd
if=/mnt/gluster_vol/80 of=/dev/null<br>
> bs=1M<br>
> 80+0 records in<br>
> 80+0 records out<br>
> 83886080 bytes (84 MB) copied, 0,0246918 s, 3,4
GB/s<br>
> [root@gluster-client-1 gluster_vol]# dd
if=/mnt/gluster_vol/80 of=/dev/null<br>
> bs=1M<br>
> 80+0 records in<br>
> 80+0 records out<br>
> 83886080 bytes (84 MB) copied, 0,0195678 s, 4,3
GB/s<br>
> [root@gluster-client-1 gluster_vol]#<br>
<br>
</div>
</div>
You are seeing the effect of client side kernel caching. If
you want to see the actual throughput for reads run:<br>
<br>
sync; echo 3 > /proc/sys/vm/drop_caches; dd blah<br>
<br>
Kernel caching happens on both the client and server side,
when I want to see uncached performance I drop caches on
both clients and servers:<br>
<br>
run_drop_cache()<br>
{<br>
for host in $MASTERNODE $NODE $CLIENT<br>
do<br>
ssh -i /root/.ssh/my_id root@${host} echo "Dropping
cache on $host"<br>
ssh -i /root/.ssh/my_id root@${host} sync<br>
ssh -i /root/.ssh/my_id root@${host} "echo 3 >
/proc/sys/vm/drop_caches"<br>
done<br>
}<br>
<br>
HTH!<br>
<span class="HOEnZb"><font color="#888888"><br>
-b<br>
</font></span>
<div class="im HOEnZb"><br>
> Cache is working flawlessly, (even though that 80
Mbytes is smaller than the<br>
> min-file-size value, but I don't care about it right
now) what I don't get<br>
> is where cache is being stored. Is it stored on the
client side or on the<br>
> server side? According to documentation, the io-cache
translator could be<br>
> loaded on both sides (client and server), how can I
know where it is being<br>
> loeaded? It looks like as it was being stored locally
because of the speed,<br>
> but I'd like to be sure.<br>
><br>
> Thanks!<br>
><br>
> --<br>
> Pavlik Salles Juan José<br>
> Blog - <a moz-do-not-send="true"
href="http://viviendolared.blogspot.com" target="_blank">http://viviendolared.blogspot.com</a><br>
><br>
</div>
<div class="HOEnZb">
<div class="h5">>
_______________________________________________<br>
> Gluster-users mailing list<br>
> <a moz-do-not-send="true"
href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
> <a moz-do-not-send="true"
href="http://supercolony.gluster.org/mailman/listinfo/gluster-users"
target="_blank">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">Pavlik Salles Juan José
<div>Blog - <a moz-do-not-send="true"
href="http://viviendolared.blogspot.com" target="_blank">http://viviendolared.blogspot.com</a></div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Gluster-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a>
<a class="moz-txt-link-freetext" href="http://supercolony.gluster.org/mailman/listinfo/gluster-users">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a></pre>
</blockquote>
<br>
</body>
</html>