[Gluster-devel] Question about random and rr scheduler

Amar S. Tumballi amar at zresearch.com
Tue Mar 4 01:53:41 UTC 2008


On Mon, Mar 3, 2008 at 4:27 PM, Craig Tierney <Craig.Tierney at noaa.gov>
wrote:

> I setting up Gluster (1.3.7) with two servers.  I first
> tried configuring the clients as round-robin (rr). When I try and write
> to the filesystem for the first time, all of the files go
> to the first brick.  Subsequent writes will alternate between
> the two bricks.  When I try random, the first file is always
> created on the first brick.  Subsequent writes always go to
> the first brick (never the second).
>

As the name suggests 'random' scheduler just calls random() and it just does
% with the number of clients. Hence, not much control over it by user side
right now.



>
> What I want is round-robin, or a working random.  However,
> for round-robin to work for me, I need the chosen server to
> be random, not always the first one.
>
> In the long-term, it wouldn't really matter because everything
> would average out.  However, I am creating filesystems that
> will be temporary, so I need the right behavior in the short term.
>
> Should random do what I need?  Should I look in the code
> and see how to get the Round-Robin schedule to start with
> a random index?
>

Just initialize index variable in rr scheduler to start with a random
number. should not be much of a work..


-- 
Amar Tumballi
Gluster/GlusterFS Hacker
[bulde on #gluster/irc.gnu.org]
http://www.zresearch.com - Commoditizing Supercomputing and Superstorage!



More information about the Gluster-devel mailing list