---
abstract: |
    In a realistic distributed storage environment, storage nodes are usually placed in racks, a metallic support designed to accommodate electronic equipment. It is known that the communication (bandwidth) cost between nodes within a rack is much lower than the communication (bandwidth) cost between nodes within different racks.

    In this paper, a new model, where the storage nodes are placed in two racks, is proposed and analyzed. In this model, the storage nodes have different repair costs to repair a node depending on the rack where they are placed. A threshold function, which minimizes the amount of stored data per node and the bandwidth needed to regenerate a failed node, is shown. This threshold function generalizes the threshold function from previous distributed storage models. The tradeoff curve obtained from this threshold function is compared with the ones obtained from the previous models, and it is shown that this new model outperforms the previous ones in terms of repair cost.
author:
- |
    Bernat Gastón, Jaume Pujol, and Mercè Villanueva\
    Department of Information and Communications Engineering\
    Universitat Autònoma de Barcelona\
    Cerdanyola del Vallès (Barcelona), Spain\
    `{Bernat.Gaston | Jaume.Pujol | Merce.Villanueva }@uab.cat`\
bibliography:
- 'IEEEabrv.bib'
- 'references.bib'
title: 'A realistic distributed storage system that minimizes data storage and repair bandwidth. '
---

Introduction
============

In a distributed storage environment, where the data is placed in nodes connected through a network, it is likely that one of these nodes fails. It is known that the use of erasure coding improves the fault tolerance and minimizes the amount of stored data [@Rod01], [@We01]. Moreover, the use of regenerating codes not only makes the most of the erasure coding improvements, but also minimizes the amount of data needed to regenerate a failed node [@Di01].

In realistic distributed storage environments for example a storage cloud, the data is placed in storage devices which are connected through a network. These storage devices are usually organized in a rack, a metallic support designed to accommodate electronic equipment. The communication (bandwidth) cost between nodes within a rack is much lower than the communication (bandwidth) cost between nodes within different racks.

In [@Di01], an optimal tradeoff between the amount of stored data per node and the repair bandwidth needed to regenerate a failed node (repair bandwidth) in a distributed storage environment was claimed. This tradeoff was proved by using the mincut on information flow graphs, and it can be represented as a curve, where the two extremal points of the curve are called the Minimum Storage Regenerating (MSR) point and the Minimum Bandwidth Regenerating (MBR) point.

In [@Ak01], another model, where there is a static classification of “cheap bandwidth” and “expensive bandwidth” storage nodes, was introduced. However, this classification is not based on racks, because the nodes in the expensive set are always expensive in terms of repair cost, regardless of the failed node.

This paper is organized as follows. In Section \[sec:1\], we analyze previous distributed storage models. In Section \[rackModel\], we provide a new model, where the storage nodes are placed in two racks. We also provide a general threshold function and we specify the MBR and MSR points in this model. In Section \[sec:3\], we analyze the results of this new model compared to the previous ones. Finally, in Section \[sec:4\], we expose the conclusions of this study.

Previous models {#sec:1}
===============

In this section, we will describe the previous distributed storage models: the basic model and the static cost model introduced in [@Di01] and [@Ak01], respectively.

Basic model {#FirstModel}
-----------

In [@Di01], *Dimakis et al.* introduced a first distributed storage model, where there is the same repair cost between any two storage nodes. Moreover, the fundamental tradeoff between the amount of stored data per node and the repair bandwidth was given from analyzing the mincut of an information flow graph.

Let $C$ be a $[n,k,d]$ regenerating code composed by $n$ storage nodes, each one storing $\alpha$ data units, and such that any $k$ of these $n$ storage nodes contain enough information to recover the file. In order to be able to recover a file of size $M$, it is necessary that $\alpha k \ge M$. When one node fails, $d$ of the remaining $n-1$ storage nodes send $\beta$ data units to the new node which will replace the failed one. The new node is called newcomer, and the set of nodes sending data to the newcomer are called helper nodes. The total amount of bandwidth used per node regeneration is $\gamma= d
\beta$.

=\[circle,fill=black!25,minimum size=18pt,inner sep=0pt, node distance = 0.8cm,font=\] =\[circle\] =\[rectangle, fill=gray!10, inner sep=0.2cm,rounded corners=5mm\]

\(s) [$S$]{};

(vin\_2) [$v_{in}^2$]{}; (vin\_3) [$v_{in}^3$]{}; (vin\_1) [$v_{in}^1$]{}; (vin\_4) [$v_{in}^4$]{};

in [1,2]{} [(s) edge\[bend left=20,font=\] node\[anchor=south,above\][$\infty$]{} (vin\_);]{} in [3,4]{} [(s) edge\[bend right=20,font=\] node\[anchor=south,above\][$\infty$]{} (vin\_);]{}

(vout\_1) [$v_{out}^1$]{}; (vout\_2) [$v_{out}^2$]{}; (vout\_3) [$v_{out}^3$]{}; (vout\_4) [$v_{out}^4$]{};

(vin\_5) ; (vout\_5) ;

(vin\_6) ; (vout\_6) ;

\(DC) [DC]{};

(vout\_5) edge\[bend right=20,font=\] node\[anchor=south,above\][$\infty$]{} (DC); (vout\_6) edge\[bend left=10,font=\] node\[anchor=south,above\][$\infty$]{} (DC);

(vout\_2) edge node\[anchor=south,above\][$\beta$]{} (vin\_5); (vout\_3) edge node\[anchor=south,above\][$\beta$]{}(vin\_5); (vout\_1) edge node\[anchor=south,above\][$\beta$]{}(vin\_5);

(vout\_1) edge node\[anchor=south,above\][$\beta$]{} (vin\_6); (vout\_2) edge node\[anchor=south,above\][$\beta$]{}(vin\_6); (vout\_5) edge node\[anchor=south,above\][$\beta$]{}(vin\_6);

/in [1,2,3,4,5,6]{} [ (vin\_) edge node\[anchor=south\] [$\alpha$]{} (vout\_); ]{}

(1.2,-0.5) – (2.7,-1.2); (1.2,-1.2) – (2.7,-0.5);

(1.2,-1.2) – (2.7,-1.9); (1.2,-1.9) – (2.7,-1.2);

Let $s_i$, where $i = 1,\ldots, \infty$, be the $i$-th storage node. Let $G(V,E)$ be a weighted graph designed to represent the information flow. Then, $G$ is in fact a directed acyclic graph, with a set of vertices $V$ and a set of arcs $E$. The set $V$ is composed by three kinds of vertices:

-   Source vertex $S$: there is only one source vertex in the graph, and it represents the file to be stored.

-   Data collector vertex $DC$: it represents the user who is allowed to access the data in order to reconstruct the file.

-   Storage node vertices $v_{in}^i$ and $v_{out}^i$: each storage node $s_i$, where $i=1,\ldots, \infty$, is represented by one inner vertex $v_{in}^i$ and one outer vertex $v_{out}^i$. Let $V_s \subset V$ be the set of all these storage node vertices.

In general, there is an arc $(v,w) \in E$ of weight $c$ from vertex $v \in V$ to vertex $w \in V$ if vertex $v$ can send $c$ data units to vertex $w$.

At the beginning of the life of a distributed storage environment, there is a file to be stored in $n$ storage nodes $s_i$, $i=1,\ldots,n$. This means that there is a source vertex $S$ with outdegree $n$ connected to vertices $v_{in}^i$, $i=1,\ldots,n$. Since we want to analyze the information flow of graph $G$ in terms of $\alpha$ and $\beta$, and these $n$ arcs are not significant to find the mincut of $G$, their weight is set to infinite. Each one of the storage nodes $s_i$, $i=1,\ldots,n$, stores $\alpha$ data units. To represent this fact, each vertex $v_{in}^i$ is connected to vertex $v_{out}^i$ with an arc of weight $\alpha$.

When the first storage node fails, the newcomer node $s_{n+1}$ connects to $d$ existing storage nodes sending, each one of them, $\beta$ data units. So, there is one arc from $v_{out}^i$, $i=1,\ldots,n$, to $v_{in}^{n+1}$ with weight $\beta$ if $s_i$ sends $\beta$ data units to $s_{n+1}$ in the regenerating process. The new vertex $v_{in}^{n+1}$ is also connected to its associated $v_{out}^{n+1}$ with an arc of weight $\alpha$. This process can be repeated for every failed node. Let the new storage nodes (newcomers) be $s_j$, where $j=n+1,\ldots,\infty$.

Finally, after some failures, a data collector wants to reconstruct the file. Therefore, a vertex $DC$ is also added to the graph. There is one arc from vertex $v_{out}^i$ to $DC$ if the data collector connects to the storage node $s_i$. Note that if $s_i$ has been replaced by $s_j$, this means that the vertex $DC$ can not connect to $v_{out}^i$, but it can connect to $v_{out}^j$. The vertex $DC$ has indegree $k$ and each arc has weight infinite, because they have no relevance in finding the mincut of $G$.

If the mincut from vertex $S$ to $DC$ achieves $\mbox{mincut}(S,DC)\ge M$, it means that the data collector can reconstruct the file, since there is enough information flow from the source to the data collector. In fact, the data collector can connect to any $k$ nodes, so $\min(\mbox{mincut}(S,DC))\ge
M$, which is achieved when the data collector connects to $k$ storage nodes that have already been replaced by a newcomer [@Di01]. From this scenario, the mincut is computed and lower bounds on the parameters $\alpha$ and $\gamma$ are given. Let $\alpha^*(d,\gamma)$ be the threshold function, which is the function that minimizes $\alpha$. As $\alpha \ge \alpha^*(d,\gamma)$, if $\alpha^*(d,\gamma)$ can be achieved $\alpha$ is possible too.

Figure \[example1\] illustrates the information flow graph $G$ associated to a $[4,2,3]$ regenerating code. Note that $\mbox{mincut}(S,DC) = \min
\left\lbrace 3\beta, \alpha \right\rbrace + \min \left\lbrace 2\beta, \alpha
\right\rbrace$. For a general information flow graph, $\mbox{mincut}(S,DC)
\ge \sum_{i=0}^{k-1} \min \left\lbrace (d-i)\beta,
\alpha \right\rbrace \ge M$, which after an optimization process leads to

$$\label{thresholdDim}
 \alpha^*(d,\gamma) = \left\{ \begin{array}{lc}
             \frac{M}{k}, & \gamma \in [f(0), +\infty) \\
             \\ \frac{M-g(i)\gamma}{k-i}, & \gamma \in [f(i),f(i-1)),
             \end{array}
   \right.$$

where $$f(i) = \frac{2Md}{(2k-i-1)i + 2k(d-k+1)} \text{ and }
g(i) = \frac{(2d-2k+i+1)i}{2d}.$$

Using the information flow graph $G$, we can see that there are exactly $k$ points in the tradeoff curve, or equivalently, $k$ intervals in the threshold function $\alpha^*(d,\gamma)$, which represent the $k$ newcomers. In the mincut equation, the $k$ terms in the summation are computed as the minimum between two parameters: the sum of the weights of the arcs that we have to cut to isolate the corresponding $v^j_{in}$ from $S$, and the weight of the arc that we have to cut to isolate the corresponding $v^j_{out}$ from $S$. Let the first parameter be called the *income* of the corresponding newcomer $s_j$. Note that the income of the newcomer $s_j$ depends on the previous newcomers.

Static cost model {#1costModel}
-----------------

In [@Ak01], *Akhlaghi et al.* presented another distributed storage model, where the storage nodes $V_s$ are partitioned into two sets $V^1$ and $V^2$ with different repair bandwidth. Let $V^1 \subset V_s$ be the “cheap bandwidth” nodes, where each data unit sent costs $C_c$, and $V^2 \subset V_s$ be the “expensive bandwidth” nodes, where each data unit sent costs $C_e$ with $C_e > C_c$. This means that when a newcomer replaces a lost storage node, the cost of downloading data from a node in the set $V^1$ will be lower than the cost of downloading the same amount of data from a node in the set $V^2$.

Consider the same situation as in the model described in Subsection \[FirstModel\]. However, when a storage node fails, the newcomer node $s_j$, $j=n+1,\ldots,\infty$, connects to $d_1$ existing storage nodes from $V^1$ sending each one of them $\beta_c$ data units to $s_j$, and to $d_2$ existing storage nodes from $V^2$ sending each one of them $\beta_e$ data units to $s_j$. Let $d=d_1+d_2$ be the number of helper nodes. Assume that $d$, $d_1$, and $d_2$ are fixed, that is, they do not depend on the storage node $s_j$, $j=n+1,\ldots,\infty$. In terms of the information flow graph $G$, there is one arc from $v_{out}^i$ to $v_{in}^j$ of weight $\beta_c$ or $\beta_e$, depending on whether $s_i$ sends $\beta_c$ or $\beta_e$ data units, respectively, in the regenerating process. This new vertex $v_{in}^j$, is also connected to its associated $v_{out}^j$ with an arc of weight $\alpha$.

Let the repair cost be $C_T = d_1 C_c \beta_c + d_2 C_e
\beta_e$ and the repair bandwidth $\gamma = d_1 \beta_c + d_2 \beta_e$. To simplify the model, we can assume, without loss of generality, that $\beta_c =
\tau \beta_e$ for some real number $\tau \ge 1$. This means that we minimize the repair cost $C_T$ by downloading more data units from the “cheap bandwidth” set of nodes $V^1$ than from the “expensive bandwidth” set of nodes $V^2$. Note that if $\tau$ is increased, the repair cost is decreased and vice-versa. Again it must be satisfied that $\min(\mbox{mincut}(S,DC))\ge
M$.

When $k \le d_1$, the mincut is $\sum_{i=0}^{k-1} \min
\left\lbrace {(d_1\beta_c + d_2 \beta_e - i\beta_c ), \alpha}\right\rbrace \ge
M$, and when $k>d_1$, it is $\sum_{i=0}^{d_1} \min
\left\lbrace {(d_1 \beta_c + d_2 \beta_e - i\beta_c ), \alpha}\right\rbrace  +
\sum_{i=d_1+1}^{k-1} \min\left\lbrace {(d_1 + d_2  - i)\beta_e ,
\alpha}\right\rbrace  \ge M$. After applying $\beta_c = \tau \beta_e$ and an optimization process, the mincut equations leads to the threshold function shown in [@Ak01].

Rack model {#rackModel}
==========

In a realistic distributed storage environment, the storage devices are organized in racks. In this case, the repair cost between nodes which are in the same rack is much lower than between nodes which are in different racks.

Note the difference of this model compared with the one presented in Subsection \[1costModel\]. In that model, there is a static classification of the storage nodes between “cheap bandwidth” and “expensive bandwidth” ones. In our new model, this classification depends on each newcomer. When a storage node fails and a newcomer enters into the system, nodes from the same rack are in the “cheap bandwidth” set, while nodes in other racks are in the “expensive bandwidth” set. In this paper, we analyze the case when there are only two racks. Let $V_1$ and $V_2$ be the sets of $n_1$ and $n_2$ storage nodes from the first and second rack, respectively.

Consider the same situation as in Subsection \[1costModel\], but now the sets of “cheap bandwidth” and “expensive bandwidth” nodes depend on the specific replaced node. Again, we can assume, without loss of generality, that $\beta_c =
\tau \beta_e$ for some real number $\tau \ge 1$. Let the newcomers be the storage nodes $s_j$, $j=n+1,\ldots, \infty$. Let $d= d_1+d_2$ be the number of helper nodes for any newcomer, where $d_1$ and $d_2$ are the number of helper nodes in the first and second rack, respectively. We can always assume that $d_1 \le d_2$, by swapping racks if it is necessary.

In both models presented in Section \[sec:1\], the repair bandwidth $\gamma$ is the same for any newcomer. In the rack model, it depends on the rack where the newcomer is placed. Let $\gamma^1=  \beta_e(d_1 \tau +d_2)$ be the repair bandwidth for any newcomer in the first rack with repair cost $C_T^1 = \beta_e (C_c d_1 \tau + C_e
d_2)$, and let $\gamma^2= \beta_e (d_2 \tau +d_1)$ be the repair bandwidth for any newcomer in the second rack with repair cost $C_T^2 = \beta_e (C_c d_2 \tau
+ C_e d_1)$. Note that if $d_1=d_2$ or $\tau=1 $, then $\gamma^1 = \gamma^2$, otherwise $\gamma^1 < \gamma^2$. To represent a distributed storage system, the information flow graph is restricted to $\gamma \ge \alpha$ [@Di01]. In the rack model it is a necessary condition that $\gamma^1 \ge \alpha$, which means that $\gamma^2 \ge \alpha$.

Moreover, unlike the models presented in Section \[sec:1\], where it is straightforward to establish which is the set of nodes which minimize the mincut, in the rack model, this set of nodes may change depending on the parameters $k$, $d_1$, $n_1$ and $\tau$. Recall that the income of a newcomer $s_j$, $j=n+1,\ldots,\infty$, is the sum of the weights of the arcs that should be cut in order to isolate $v_{in}^j$ from $S$. Let $I$ be the indexed multiset containing the incomes of $k$ newcomers which minimize the mincut. It is easy to see that in the model presented in Subsection \[FirstModel\], $I=\{ (d-i)\beta \;|\; i=0,\ldots, k-1 \}$, and in the one presented in Subsection \[1costModel\], $I=\{ ((d_1-i) \tau
 +d_2) \beta_e \;|\; i=0,\ldots, \min \{d_1, k-1\} \} \cup \{ (d_2-i) \beta_e
\;|\; i=1,\ldots, \min \{d_2, k-d_1-1\} \}$.

In order to establish $I$ in the rack model, the set of $k$ newcomers which minimize the mincut must be found. First, note that since $d_1 \le d_2$, the income of the newcomers is minimized by replacing first $d_1$ nodes from the rack with less number of helper nodes, which in fact minimizes the mincut. Therefore, the indexed multiset $I$ always contains the incomes of a set of $d_1$ newcomers from $V_1$. Define $I_1=\{((d_1-i)\tau + d_2)\beta_e \;| \; i=0,\ldots, \min \{d_1,
k-1\} \} $ as the indexed multiset where $I_1[i]$, $i=0,\ldots, \min \{d_1,
k-1\}$, are the incomes of this set of $d_1$ newcomers from $V^1$. If $k-1 \le d_1$, then $I=I_1$, otherwise $I_1 \subset I$ and $k-d_1-1$ more newcomers which minimize the mincut must be found.

At this point there are two possibilities: either the remaining nodes from $V_1$ are in the set of newcomers which minimize the mincut or not. Define $I_2 = \{ d_2
\beta_e \;|\; i=1,\ldots, \min \{k-d_1-1, n_1-d_1-1 \}\} \cup \{ (d_2-i) \tau
\beta_e \;|\; i = 1,\ldots, \min \{d_2, k-n_1 \} \}$ as the indexed multiset where $I_2[i]$, $i=0,\ldots, k-d_1-2$, are the incomes of a set of $k-d_1-1$ newcomers, including the remaining $n_1-d_1-1$ newcomers from $V_1$ and newcomers from $V_2$. Note that if $n_1-d_1-1 > k-d_1-1$, it only contains newcomers from $V_1$. Define $I_3
= \{ (d_2-i) \tau \beta_e \; |\;i=1,\ldots, \min \{d_2, k-d_1-1\} \}$ as the indexed multiset where $I_3[i]$, $i=0,\ldots, k-d_1-2$, are the incomes of a set of $k-d_1-1$ newcomers from $V_2$. Note that when $i > d_2$ in $I_2$ or $I_3$ the resulting income is negative, which is not possible. In fact, given by the information flow graph, the income for any further newcomer is zero. It can be assumed that $d_2 \ge k-d_1-1 \ge k-n_1$, because the mincut equation does not change when $d_2 < k-d_1-1$ or $d_2<k-n_1$.

\[prop:01\] As $|I_2| = |I_3| = k-d_1-1$, if $\sum_{i=0}^{k-d_1-2} I_2[i] <
\sum_{i=0}^{k-d_1-2} I_3[i]$, then $I=I_1 \cup
I_2$; and if $\sum_{i=0}^{k-d_1-2} I_2[i] \ge \sum_{i=0}^{k-d_1-2} I_3[i]$, then $I=I_1 \cup I_3$.

Let $J$ be an indexed multiset containing the incomes of a set of newcomers such that $I = I_1 \cup J$. It can be seen that either $J = I_2$ or $J = I_3$.

By using Proposition \[prop:01\], if $I =
I_1 \cup I_2$, the corresponding mincut equation is $\sum_{i=0}^{|I_1|-1} \\ \min
\left\lbrace I_1[i], \alpha \right\rbrace + \sum_{i=0}^{|I_2|-1} \min
\left\lbrace I_2[i], \alpha\right\rbrace \ge M$; and if $I = I_1 \cup I_3$, the equation is $\sum_{i=0}^{|I_1|-1} \\ \min \left\lbrace I_1[i], \alpha \right\rbrace
+ \sum_{i=0}^{|I_3|-1} \min \left\lbrace I_3[i], \alpha\right\rbrace \ge M$.

In the previous models, described in Section \[sec:1\], the decreasing behavior of the incomes included in the mincut equation is used to find the threshold function to minimize the parameters $\alpha$ and $\gamma$. In the rack model, the incomes in the mincut equations may not have a decreasing behavior as the newcomers enter into the system. Therefore, it is not possible to find the threshold function as it is done in the previous models. However, we give a threshold function for the rack model described in this section, which represents the behavior of the mincut equations also for the previous models. Note that the way to represent this threshold function can be seen as a generalization, since it also represents the behavior for the previous given models.

Let $L$ be the increasing ordered list of values such that for all $i, \; i=
0,\ldots, k-1$, $I[i]/\beta_e \in L$ and $|I|=|L|$. Note that any of the information flow graphs representing any model from Section \[sec:1\] and any of the ones representing the rack model, can be described in terms of $I$, so they can be represented by $L$. Therefore, once $L$ is found, it is possible to find the parameters $\alpha$ and $\beta_e$ (and then $\gamma$ or $\gamma^i$, $i=1,2$) using the following threshold function.

The threshold function $\alpha^*(d_1,d_2,\beta_e)$ (which also depends on $\tau$ and $k$) is the following: $$\label{treshold3}
 \alpha^*(d_1,d_2,\beta_e) = \left\{ \begin{array}{ll}
             \frac{M}{k}, & \beta_e \in [f(0), +\infty)  \\ & \\
              \frac{M-g(i)\beta_e}{k-i}, & \beta_e \in
[f(i),f(i-1))\\ &
i=1, \ldots, k-1,
   \end{array}
   \right.$$ subject to $\gamma^1=(d_1 \tau + d_2) \beta_e \ge \alpha$, where $$f(i) = \frac{M}{L[i](k-i)+g(i)} \text{ and }
g(i) =\sum_{j=0}^{i-1} L[j].$$

It can happen that two values in $L$ are equal, so $f(i) = f(i-1)$. In this case, we consider that the interval $[f(i),f(i-1))$ is empty. Note that the threshold function (\[treshold3\]) is subject to $\gamma^1=(d_1
\tau + d_2) \beta_e \ge \alpha$. However, $\gamma^1 \ge \alpha$ is only satisfied when the highest value of $I_1$ divided by $\beta_e$ coincides with the highest value of $L$. By definition, $\max I_1  = I_1[0]$, so $\max L = I_1[0]/\beta_e$. In terms of the tradeoff curve, this means that there is no point in the curve that outperforms the MBR point. In order to achieve that $\gamma_1 \ge \alpha$, it is necessary that $f(i) \ge \frac{M}{\frac{I_1[0]}{\beta_e} (k-i) + g(i)}$ for $i=0,\ldots,k-1$. This restriction is achieved by removing from $L$ any value $L[i]$ such that $L[i] > I_1[0]/\beta_e$, $i=0,\ldots,k-1$. From now on, we assume that $L[|L|-1] = I_1[0]/\beta_e$.

=\[circle,fill=black!25,minimum size=18pt,inner sep=0pt,font=\] =\[circle\] =\[rectangle, fill=gray!20, inner sep=0.2cm,rounded corners=5mm\]

\(s) [$S$]{};

(vin\_4) ;

(vin\_3) ; (vin\_5) ;

(vin\_2) [$v_{in}^2$]{}; (vin\_6) [$v_{in}^n$]{};

(vin\_1) [$v_{in}^1$]{};

in [1,2,3]{} [(s) edge\[bend left=20, font= \] node\[anchor=south,above\][$\infty$]{} (vin\_);]{} in [4,5,6]{} [(s) edge\[bend right=20, font= \] node\[anchor=south,above\][$\infty$]{} (vin\_);]{}

(vout\_1) [$v_{out}^1$]{}; (vout\_2) [$v_{out}^2$]{}; (vout\_3) ; (vout\_4) ; (vout\_5) ; (vout\_6) [$v_{out}^n$]{};

(vin\_7) ; (vout\_7) ;

(vin\_8) ; (vout\_8) ;

(vin\_9) ; (vout\_9) ;

(vin\_10) ; (vout\_10) ;

\(DC) [DC]{};

in [7,8,9,10]{} [(vout\_) edge\[bend left=20, font= \] node\[anchor=south,above\][$\infty$]{} (DC);]{}

(vout\_2) edge node\[anchor=south,above\][$\beta_c$]{} (vin\_7); (vout\_4) edge node\[anchor=south,above\][$\beta_e$]{}(vin\_7); (vout\_5) edge node\[anchor=south,above\][$\beta_e$]{} (vin\_7); (vout\_6) edge node\[anchor=south,above\][$\beta_e$]{} (vin\_7);

(vout\_7) edge node\[anchor=south,left,font= \][$\beta_c$]{} (vin\_8); (vout\_4) edge node\[anchor=south,above\][$\beta_e$]{} (vin\_8); (vout\_5) edge node\[anchor=south,above\][$\beta_e$]{} (vin\_8); (vout\_6) edge node\[anchor=south,above\][$\beta_e$]{} (vin\_8);

(vout\_7) edge node\[anchor=south, above\][$\beta_e$]{} (vin\_9); (vout\_8) edge node\[anchor=south,left\][$\beta_e$]{} (vin\_9); (vout\_5) edge node\[anchor=south,above\][$\beta_c$]{} (vin\_9); (vout\_6) edge node\[anchor=south,above\][$\beta_c$]{} (vin\_9);

(vout\_7) edge node\[anchor=south, above\][$\beta_e$]{} (vin\_10); (vout\_8) edge node\[anchor=south,above\][$\beta_e$]{} (vin\_10); (vout\_9) edge node\[anchor=south,left,font= \][$\beta_c$]{} (vin\_10); (vout\_6) edge node\[anchor=south,above\][$\beta_c$]{} (vin\_10);

/in [1,2,3,4,5,6,7,8,9,10]{} [ (vin\_) edge node\[anchor=south\] [$\alpha$]{} (vout\_); ]{}

[background]{} ; ;

When $k \le d_1$, the mincut equations and the threshold function (\[treshold3\]) of the rack model are exactly the same as the ones shown in [@Ak01] for the model described in Subsection \[1costModel\]. Indeed, it can be seen that when $k \le d_1$, the rack model and the static cost model have the same behavior because $I=I_1$.

Figure \[Figure:2\] shows the example of an information flow graph corresponding to a regenerating code with $k=4$, $d_1=1$, $d_2=3$, and $n_1=n_2=3$. Taking for example $\tau= 2$, we have that $I_1=\{5\beta_e,3\beta_e \}$, $I_2=
\{3\beta_e,4 \beta_e \}$ and $I_3=\{4\beta_e,2\beta_e \}$. By Proposition \[prop:01\], since $\sum_{i=0}^{1} I_2[i] > \sum_{i = 0}^{1}I_3[i]$, $I= I_1
\cup I_3 = \{5\beta_e,3\beta_e,4\beta_e,2\beta_e\}$, and then $L=[2,3,4,5]$. Applying the corresponding mincut equation to the threshold function (\[treshold3\]), we have that $$\alpha^*(d_1,d_2,\beta_e) = \left\{ \begin{array}{ll}
             \frac{M}{4}, & \beta_e \in [\frac{M}{8}, +\infty)  \\ &\\
             \frac{M-2 \beta_e}{3}, & \beta_e \in
[\frac{M}{11},\frac{M}{8})\\ & \\
           \frac{M-5 \beta_e}{2}, & \beta_e \in
[\frac{M}{13},\frac{M}{11})\\ & \\
           M-9 \beta_e, & \beta_e \in [\frac{M}{14},\frac{M}{13}).\\
   \end{array}
   \right.$$

MSR and MBR points {#msr-and-mbr-points .unnumbered}
------------------

The threshold function (\[treshold3\]) leads to a tradeoff curve between $\alpha$ and $\beta_e$. Note that, like in the static cost model, since there is a different repair bandwidth $\gamma_1$ and $\gamma_2$ for each rack, this curve is based on $\beta_e$ instead of $\gamma_1$ and $\gamma_2$.

At the MSR point, the amount of stored data per node is $\alpha_{MSR} = M/k$. Moreover, at this point, the minimum value of $\beta_e$ is $\beta_e = f(0) =
\frac{M}{L[0]k}$, which leads to $$\gamma^1_{MSR} = \frac{(d_1 \tau +
d_2)M}{L[0]k} \quad \textrm{and} \quad  \gamma^2_{MSR} = \frac{(d_2 \tau + d_1)M}{L[0]k}.$$ On the other hand, at the MBR point, as $f(i)$ is a decreasing function, the parameter $\beta_e$ which leads to the minimum repair bandwidths is $\beta_e = f(|L|-1) = \frac{M}{L[|L|-1](k-|L|+1)+g(|L|-1)} $. Then, the corresponding amount of stored data per node is $\alpha_{MBR} =
\frac{M (L[|L|-1]k-|L|+1)}{(k-|L|+1)^2 L[|L|-1] + g(|L|-1)}$, and the repair bandwidths are $$\gamma^1_{MBR} = \frac{(d_1 \tau + d_2)M}{L[|L|-1](k-|L|+1)+g(|L|-1)} \quad \textrm{and}$$ $$\gamma^2_{MBR} = \frac{(d_2 \tau + d_1)M}{L[|L|-1](k-|L|+1)+g(|L|-1)}.$$

Analysis {#sec:3}
========

[cc]{}

\[ xlabel=$\gamma$, ylabel=$\alpha$, xmax= 0.58, ymax=0.3, height=3.5cm, width=6cm, legend style=[font=]{}, \]

coordinates [ (0.6,0.2000000000) (0.3000000000,0.2000000000) (0.2727272727,0.2045454545) (0.2553191489,0.2127659574) (0.2448979592,0.2244897959) (0.2400000000,0.2400000000) (0.2400000000, 0.4) ]{}; coordinates [ (0.6,0.2000000000) (0.3600000000,0.2000000000) (0.3103448276,0.2068965517) (0.2812500000,0.2187500000) (0.2647058824,0.2352941176) (0.2571428571,0.2571428571) (0.2571428571, 0.4) ]{}; coordinates [ (0.6,0.2000000000) (0.4500000000,0.2000000000) (0.3600000000,0.2100000000) (0.3130434783,0.2260869565) (0.2880000000,0.2480000000) (0.2769230769,0.2769230769) (0.2769230769, 0.4)]{}; coordinates [ (0.6,0.2000000000) (0.5076923077,0.2000000000) (0.3882352941,0.2117647059) (0.3300000000,0.2300000000) (0.3000000000,0.2545454545) (0.2869565217,0.2869565217) (0.2869565217, 0.4)]{};

&

\[ xlabel=$\beta_e$, ylabel=$\alpha$, xmax= 0.055, ymax=0.18, height=3.5cm, width=8cm, scaled x ticks = false, legend style=[font=]{}, x tick label style=[/pgf/number format/fixed, /pgf/number format/1000 sep = ]{} \]

coordinates [ (1.1, 0.1)(0.05000000000,0.1000000000) (0.03448275862,0.1034482759) (0.02702702703,0.1081081081) (0.02272727273,0.1136363636) (0.02000000000,0.1200000000) (0.01818181818,0.1272727273) (0.01694915254,0.1355932203) (0.01612903226,0.1451612903) (0.01562500000,0.1562500000) (0.01538461538,0.1692307692) (0.01538461538, 0.3)]{}; coordinates [ (1.1,0.1) (0.04166666667,0.1000000000) (0.02873563218,0.1034482759) (0.02252252252,0.1081081081) (0.01893939394,0.1136363636) (0.01700680272,0.1224489796) (0.01572327044,0.1320754717) (0.01488095238,0.1428571429)(0.01436781609,0.1551724138) (0.01412429379,0.1694915254) (0.01412429379,0.4)]{}; coordinates [ (1.1,0.1) (0.02500000000,0.1000000000) (0.01724137931,0.1034482759) (0.01388888889,0.1111111111) (0.01219512195,0.1219512195) (0.01136363636,0.1363636364) (0.01086956522,0.1521739130) (0.01063829787,0.1702127660) (0.01063829787, 0.4)]{}; coordinates [ (1.1, 0.1) (0.01666666667,0.1000000000) (0.006666666667,0.1066666667) (0.005494505494,0.1098901099) (0.004464285714,0.1160714286) (0.004032258065,0.1209677419) (0.003597122302,0.1294964029) (0.003401360544,0.1360544218) (0.003205128205,0.1474358974) (0.003125000000,0.1562500000) (0.003067484663,0.1717791411) (0.003067484663,0.4)]{};

In this section, we analyze the results of the new fundamental tradeoff curve shown in Section \[rackModel\] for the rack model. We also compare these results with previous contributions of papers [@Di01] and [@Ak01] provided it can be carried out.

When $\tau=1$, we have that $\beta_e = \beta_c$, so $\gamma = d \beta_e$. This corresponds to the same case as in the fundamental tradeoff curve shown in Subsection \[FirstModel\], since one can assume that $\beta_e = \beta$. When $\tau > 1$ and $k \le d_1$, the rack model coincides with the one presented in Subsection \[1costModel\] and it uses more repair bandwidth than the one shown in Subsection \[FirstModel\] as it is explained in [@Ak01]. Figure \[plots:1\] left shows the tradeoff curves between $\alpha$ and $\gamma$ for the rack model when $k \le
d_1$ (for different values of $\tau$). Note that as $\tau$ increases, both $\alpha$ and $\gamma$ also increase, but the repair cost decreases as further we see in this section. Moreover, both extremal points for each curve are shown: the MSR point is when $\alpha$ is minimum and the MBR point is when $\gamma$ is minimum. On the other hand, the case when $\tau > 1$ and $k > d_1$ is different from the previous models. An example is shown in Figure \[plots:1\] right. Note that as $\tau$ increases $\beta_e$ decreases.

Despite the repair bandwidths $\gamma_1$ and $\gamma_2$ may increase with $\tau$, the repair cost always decreases. The rack model has two repair bandwidths, $\gamma^1$ and $\gamma^2$, this means that it also has two repair costs $C_T^1= \beta_e(C_c d_1 \tau +
C_e d_2)$ and $C_T^2= \beta_e(C_c d_2 \tau + C_e d_1)$. As we have said, the case when $\tau=1$ is exactly the same as the one presented in [@Di01]. In this case, for each $i=0,\ldots,k-1$, taking $\gamma=f(i)$, we have that $\beta = f(i)/d$. Then, we can say that $ C_T^1(\tau=1) = \frac{f(i)}{d} (C_c d_1 \tau + C_e d_2)$ and $ C_T^2(\tau=1) = \frac{f(i)}{d} (C_c d_2 \tau + C_e d_1)$. From (\[thresholdDim\]), we know that $f(i) =  \frac{2Md}{(2k-i-1) i
+2k(d_1+d_2-k+1)}$, so finally $C_T^1(\tau=1)= \frac{2Md (C_c d_1 \tau + C_e
d_2)}{(2k-i-1) i +2k(d_1+d_2-k+1)}$ and $C_T^2(\tau=1)= \frac{2Md (C_c d_2 \tau
+ C_e d_1)}{(2k-i-1) i +2k(d_1+d_2-k+1)}$. When $\tau >1$, we have that $\beta_e = f(i)$, so $C_T^1(\tau>1)= \frac{M(C_c d_1 \tau + C_e d_2)}{L[i](k-i)+g(i)}$ and $C_T^2(\tau>1)=
\frac{M(C_c d_2 \tau + C_e d_1)}{L[i](k-i)+g(i)}$.

Define $\eta(\tau)=\frac{C_T^1(\tau>1)}{C_T^1(\tau=1)}=\frac{C_T^2(\tau>1)}{C_T^2(\tau=1)}$. We know that $\beta_e = f(i) =
\frac{M}{L[i](k-i)+g(i)}$, so $$\eta(\tau) = \frac{ (2k-i-1) i +2k(d_1+d_2-k+1)}
{2d ( L[i](k-i)+g(i) )}$$ is a decreasing function over $\tau$ for every fixed $i$. This means that as $\tau$ increases, the repair costs $C_T^1$ and $C_T^2$ always decrease. Figure \[plots:2\] left shows the decreasing behavior of $C_T^1$ and $\beta_e$ as $\tau$ increases.

When $k\le d_1$, the static cost model and the rack model have the same behavior. However, when $k>d_1$, it can be seen in Figure \[plots:2\] right that the rack model outperforms the static cost model in terms of $\beta_e$ and $\alpha$. Note that the repair cost $C_T$ of the static model is equivalent to $C_T^1$ of the rack model. Fixed $d_1$, $d_2$, and $\tau$, as $\beta_e$ decreases $C_T^1$ does, so we can say that the rack model also outperforms the static cost model in terms of repair cost. In [@Ak01], the authors show that the static cost model outperforms the basic model presented in [@Di01] in terms of repair cost. Therefore, it comes straightforward that the rack model also outperforms the basic model in terms of repair cost.

[cc]{}

\[ xlabel=$\beta_e$, ylabel=$C_T^1$, xmax= 0.04, ymax=1.8, height=3.5cm, width=6.8cm, legend style=[font=]{}, x tick label style=[/pgf/number format/fixed, /pgf/number format/1000 sep = ]{} \]

coordinates [ (0.02500000000,1.650000000) (0.02272727273,1.500000000) (0.02127659574,1.404255319) (0.02040816327,1.346938776) (0.02000000000,1.320000000)]{}; coordinates [ (0.02000000000,1.440000000) (0.01724137931,1.241379310) (0.01562500000,1.125000000) (0.01470588235,1.058823529) (0.01428571429,1.028571429) ]{}; coordinates [ (0.01250000000,1.125000000) (0.01000000000,0.9000000000) (0.008695652174,0.7826086957) (0.008000000000,0.7200000000) (0.007692307692,0.6923076923)]{}; coordinates [ (0.007692307692,0.9230769231) (0.005882352941,0.7058823529) (0.005000000000,0.6000000000) (0.004545454545,0.5454545455) (0.004347826087,0.5217391304)]{};

&

\[ xlabel=$\beta_e$, ylabel=$\alpha$, xmax= 0.05, ymax=0.18, height=3.5cm, width=6.8cm, scaled x ticks = false, legend style=[font=]{}, x tick label style=[/pgf/number format/fixed, /pgf/number format/1000 sep = ]{} \]

coordinates [(1.1,0.1) (0.02500000000,0.1000000000) (0.01724137931,0.1034482759) (0.01388888889,0.1111111111) (0.01219512195,0.1219512195) (0.01136363636,0.1363636364) (0.01086956522,0.1521739130) (0.01063829787,0.1702127660) (0.01063829787, 0.4)]{}; coordinates [ (1.1, 0.1) (0.05000000000,0.1000000000) (0.03448275862,0.1034482759) (0.02702702703,0.1081081081) (0.02272727273,0.1136363636) (0.02000000000,0.1200000000) (0.01666666667,0.1333333333) (0.01470588235,0.1470588235) (0.01351351351,0.1621621622) (0.01282051282,0.1794871795) (0.01250000000,0.2000000000) (0.01250000000, 0.3)]{};

Conclusions {#sec:4}
===========

In this paper, a new mathematical model for a distributed storage environment is presented and analyzed. In this new model, the cost of downloading data units from nodes in different racks is introduced. That is, the cost of downloading data units from nodes located in the same rack is much lower than the cost of downloading data units from nodes located in a different rack. The rack model is an approach to a more realistic distributed storage environment like the ones used in companies dedicated to the task of storing information over a network.

The rack model is deeply analyzed in the case that there are two racks. The differences between this model and previous models are shown. Due to it is a less simplified model compared to the ones presented previously, the rack model introduces more difficulties in order to be analyzed. In this paper, we provide a complete analysis of the model including some important contributions like the generalization of the process to find the threshold function of a distributed storage system. This new threshold function fits in any previous model and allows to represent the information flow graphs considering different repair costs.

We provide the general threshold function and apply it to the model when there are two racks. We provide the tradeoff curve between the repair bandwidth and the amount of stored data per node and compare it to the ones found in previous models. We also analyze the repair cost of this new model, and we conclude that the rack model outperforms previous models in terms of repair cost.
