<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Tahoma" size="2"><span style="font-size:10pt;">
<div><font color="#1F497D">Sorry for the wrong incomplete message sent by mistake earlier.</font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;">Hi Sussant,</span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;">Extremely sorry for the belated reply. Thanks for your input. We will try having rebalance then create a set of small files with a random pattern generation and check where it
falls in by DM_TYPE DHT.</span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;">I have one short query:</span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;">We were also thinking to use (in case we need ) <b>Translators/cluster/unify</b><b> </b>along with <b>NUFA or ALU scheduler</b>. However we noticed <b>Translators/cluster/unify
</b>became<b> obsolete/legacy</b><b> </b>in gluster site , does it mean automatically<b> ALU, NUFA,rr scheduler also became obsolete</b><b> </b><b>or </b><b>not support</b><b>ed</b><b> ?</b><b> Can you please clarify ?</b></span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"><b>Is the Translators/cluster/unify</b><b> is supported in 3.3.2 ( we are </b><b>currently </b><b>using) and following configuration would work ?</b><b> </b></span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"><b>If not c</b><b>an you please suggest you how to use ALU</b><b>/</b><b>NUFA </b><b>scheduler</b><b> </b><b>with 3.3.2 if there is any specific mechanism</b><b>?</b></span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;">volume unify</span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"> type cluster/unify</span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"> subvolumes brick1 brick2 brick3 brick4</span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"> option namespace brick-ns # should be a node which is not present in 'subvolumes'</span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"> option scheduler NUFA/ALU/rr # NUFA/ALU or Simple round-robin scheduler</span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;">end-volume</span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;">Thanks again for your time and advice.</span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2" color="#1F497D"><span style="font-size:11pt;">Regards,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">-----Original Message-----<br>
From: Susant Palai [<a href="mailto:spalai@redhat.com">mailto:spalai@redhat.com</a>]
<br>
Sent: Thursday, May 21, 2015 6:17 PM<br>
To: Subrata Ghosh<br>
Cc: gluster-devel@gluster.org; gluster-users@gluster.org; Nobin Mathew; Vijay Bellur<br>
Subject: Re: Regarding the issues gluster DHT and Layouts of bricks</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Commets inline.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">----- Original Message -----</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> From: "Subrata Ghosh" <<a href="mailto:subrata.ghosh@ericsson.com">subrata.ghosh@ericsson.com</a>></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> To: <a href="mailto:gluster-devel@gluster.org">gluster-devel@gluster.org</a>, <a href="mailto:gluster-users@gluster.org">gluster-users@gluster.org</a></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Cc: "Nobin Mathew" <<a href="mailto:nobin.mathew@ericsson.com">nobin.mathew@ericsson.com</a>>, "Susant Palai" <<a href="mailto:spalai@redhat.com">spalai@redhat.com</a>>, "Vijay Bellur"</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> <<a href="mailto:vbellur@redhat.com">vbellur@redhat.com</a>></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Sent: Thursday, 21 May, 2015 4:26:05 PM</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Subject: Regarding the issues gluster DHT and Layouts of bricks</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Hi All,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Could you please guide us to solve the following DHT and brick layout </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> problem we are dealing with ? Questions are marked bold.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Problem statement :</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> 1. We have a requirement to achieve maximum write and read performance</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> and we have to meet some committed performance metrics.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Our goal is to place each file into different bricks to get</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> optimal performance and also observer the nature of the</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> throughput , hence need to have a mechanism to generate</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> different hash using gluster glusterfs.gf_dm_hashfn, </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> (assuming number of files are : N , Number of Bricks :N) to place </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> spate bricks.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> - How to make sure each file has different hash and falls to</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> different bricks ?</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> - Other way to put the question if I know the range of the brick</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> layout or more precisely if I know the hex value of the desired hash </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> ( so that it will be placed desired brick) that we need to generate </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> from Davis-Meyer algorithm used in gluster, Can we create a file name </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> such that, that also solve our problem to some extent?</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> 2. We tried to experiment to see how a file in gluster is decided to be</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> placed in a particular brick following gluster glusterfs.gf_dm_hashfn </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> and took some idea from</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> some articles like</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> <a href="http://gluster.readthedocs.org/en/latest/Features/dht/">http://gluster.readthedocs.org/en/latest/Features/dht/</a> ,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> <a href="https://joejulian.name/blog/dht-misses-are-expensive/">https://joejulian.name/blog/dht-misses-are-expensive/</a> page which</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> describes layout for that brick and calculate a hash for the file.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> To minimize collisions or generating different hash in such way to</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> place each file in different bricks ( file 1 => brick A, file 2 =></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Brick B, file 3=> Brick C, file 4 => brick D)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> We use kind of similar script to get the hash value for </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> a file</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> def gf_dm_hashfn(filename):</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> return ctypes.c_uint32(glusterfs.gf_dm_hashfn(</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> filename,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> len(filendame)))</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> if __name__ == "__main__":</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> print hex(gf_dm_hashfn(sys.argv[1]).value)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> We can then calculate the hash for a filename:</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> # python gf_dm_hash.py file1</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> 0x99d1b6fL</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Extended attribute is fetch to check the range and try to match the </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> above generated hash value.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> getfattr -n trusted.glusterfs.dht -e hex file1</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> However we are not able to exactly follow till this point , how the</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> hash value matched to one of the layout assignments, to yield what we</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> call a hashed location.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> - My question is if I know the range of brick lay out ( say</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> 0xc0000000 to 0xffffffff, is range select a hash 0xc0070000 ) where </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> to be placed the next file can we generate the name ( kind of reverse </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> of gluster</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> glusterfs.gf_dm_hashfn) ?</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">I am not aware of any such mechanism. You will have to generate file names manually and run them through your script to check whether it falls in the brick range.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> PS : Susant : Can you throw some light or suggest a method we are </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> trying to solve.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Thanks for your time.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Best Regards,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Subrata Ghosh</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Regards,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Susant</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
</span></font>
</body>
</html>