TOFEC: Achieving Optimal ThroughputDelay Tradeoff of Cloud Storage Using Erasure Codes
Abstract
Our paper presents solutions using erasure coding, parallel connections to storage cloud and limited chunking (i.e., dividing the object into a few smaller segments) together to significantly improve the delay performance of uploading and downloading data in and out of cloud storage.
TOFEC is a strategy that helps frontend proxy adapt to level of workload by treating scalable cloud storage (e.g. Amazon S3) as a shared resource requiring admission control. Under light workloads, TOFEC creates more smaller chunks and uses more parallel connections per file, minimizing service delay. Under heavy workloads, TOFEC automatically reduces the level of chunking (fewer chunks with increased size) and uses fewer parallel connections to reduce overhead, resulting in higher throughput and preventing queueing delay. Our tracedriven simulation results show that TOFEC’s adaptation mechanism converges to an appropriate code that provides the optimal delaythroughput tradeoff without reducing system capacity. Compared to a nonadaptive strategy optimized for throughput, TOFEC delivers lower latency under light workloads; compared to a nonadaptive strategy optimized for latency, TOFEC can scale to support over as many requests.
I Introduction
Cloud storage has been gaining popularity rapidly as an economic, flexible and reliable data storage service that many cloudbased applications nowadays are implemented on. Typical cloud storage systems are implemented as keyvalue stores in which data objects are stored and retrieved via their unique keys. To provide high degree of availability, scalability, and data durability, each object is replicated several times within the internal distributed file system and sometimes also further protected by erasure codes to more efficiently use the storage capacity while attaining very high durability guarantees [1].
Cloud storage providers usually implement a variety of optimization mechanisms such as load balancing and caching/prefetching internally to improve performance. Despite all such efforts, still evaluations of large scale systems indicate that there is a high degree of randomness in delay performance [2]. Thus, services that require more robust and predictable Quality of Service (QoS) must deploy their own external solutions such as sending multiple/redundant requests (in parallel or sequentially), chunking large objects into smaller ones and read/write each chunk through parallel connections, replicate the same object using multiple distinct keys, etc.
In this paper, we present TOFEC – a strategy that can provide much better throughputdelay performance for file accessing on cloud storage utilizing erasure coding. Although we base our analysis and evaluation on Amazon S3 service and present TOFEC as an external solution, TOFEC can be applied to many other cloud storage systems both externally and internally with small modifications.
Ia State of the Art
Among the vast amount of research on improving cloud storage system’s delay performance emerged in the past few years, two groups are in particular closely related to our work presented in this paper:
Erasure Coding with Redundant Requests: As proposed by authors of [3, 4, 5], files are divided into a predetermined number of chunks, each of which is the size of the original file, and encoded into of “coded chunks” using a Forward Error Correction (FEC) code, or more generally an Maximum Distance Separable (MDS) code. Downloading/uploading of the original file is accomplished by downloading/uploading coded chunks using parallel connections simultaneously and is deemed served when download/upload of any coded chunks complete. Such mechanisms significantly improves the delay performance under light workload. However, as shown in our previous work [3] and later reconfirmed by [5], system capacity is reduced due to the overhead for using smaller chunks and redundant requests. This phenomenon is illustrated in Fig.1 where we plot the delaythroughput tradeoff for using different MDS codes from our simulations using delays traces collected on Amazon S3. Codes with different are grouped in different colors. Using a code with high level of chunking and redundancy, in this case a code, although delivers gain in delay at light workload, reduces system capacity to only of the original basic strategy without chunking and redundancy, i.e., code!
This problem is partially addressed in [3] where we present strategies that adjust according to workload level so that it achieves the nearoptimal throughputdelay tradeoff for the predetermined . For example, if is used, the strategies in [3] will achieve the lowerenvelop of the red curves in Fig.1. Yet, it still suffers from an almost 60% loss in system capacity.
Dynamic Job Sizing: It has been observed in [2, 6] that in keyvalue storage systems such as Amazon S3 and Microsoft’s Azure Storage, throughput is dramatically higher when they receive a small number of storage access requests for large jobs (or objects) than if they receive a large number of requests for small jobs (or objects), because each storage request incurs overheads such as networking delay, protocolprocessing, lock acquisitions, transaction log commits, etc. Authors of [6] developed Stout in which requests are dynamically batched to improve throughputdelay tradeoff of keyvalue storage systems. Based on the observed congestion Stout increase or reduce the batching size. Thus, at high congestion, a larger batch size is used to improve the throughput while at low congestion a smaller batch size is adopted to reduce the delay.
IB Main Contribution
We introduce an adaptive strategy for accessing cloud storage systems via erasure coding, call TOFEC (Throughput Optimal FEC Cloud), that implements dynamic adjustment of chunking and redundancy levels to provide the optimal throughputdelay tradeoff. In other words, TOFEC achieves the lower envelop of curves in all colors in Fig.1.
The primary novelty of TOFEC is its backlogbased adaptive algorithm for dynamically adjusting the chunk size as well as the number of redundant requests issued to fulfill storage access requests. This algorithm of variable chunk sizing can be viewed as a novel integration of prior observations from the two bodies of works discussed above. Based on the observed backlog level as an indicator of the workload, TOFEC increases or reduces the chunk size, as well as the number of redundant requests. In our tracedriven simulation evaluation, we demonstrate that: (1) TOFEC successfully adapt to full range of workloads, delivering lower average delay than the basic static strategy without chunking under light workloads, and under heavy workloads over the throughput of a static strategy with high chunking and redundancy levels optimized for service delay; and (2) TOFEC provides good QoS guarantees as it delivers low delay variations.
TOFEC works without any explicit information from the backend cloud storage implementation: its adaptation strategy is implemented solely at the frontend application server (the storage client) and is based exclusively on the measured latency from unmodified cloud storage systems. This allows TOFEC to be more easily deployed, as individual cloud applications can adopt TOFEC without being tiedup with any particular cloud storage system, as long as a small number of APIs are provided by the storage system.
Ii System Models
Iia Basic Architecture and Functionality
The basic system architecture of TOFEC captures how web services today utilize public or private storage clouds. The architecture consists of proxy servers in the frontend and a keyvalue store, referred to as storage cloud, in the backend. Users interact with the proxy through a highlevel API and/or user interfaces. The proxy translates every highlevel user request (to read or write a file) into a set of tasks. Each task is essentially a basic storage access operation such as put, get, delete, etc. that will be accomplished using lowlevel APIs provided by the storage cloud. The proxy maintains a certain number of parallel connections to the storage cloud and each task is executed over one of these connections. After a certain number of tasks are completed successfully, the user request is considered accomplished and the proxy responds to the user with an acknowledgment. The solutions we present are deployed on the proxy server side transparent to the storage cloud.
For read request, we assume the file is precoded into coded chunks with an MDS code and stored on the cloud. Completion of downloading any coded chunks provides sufficient data to reconstruct the requested file. For write request, the file to be uploaded is divided and encoded into coded chunks using an MDS code and hence completion of uploading any coded chunks means sufficient data have been stored onto the cloud. Thus, upon completion of a request, the unstarted and/or unfinished tasks are then preemptively canceled and removed from the system.^{1}^{1}1For write request, the remaining tasks can also be scheduled as background jobs depending on the subsequent read profile of the file.
Accordingly, we model the proxy by the queueing system shown in Fig.2. There are two FIFO (firstinfirstout) queues: (i) the request queue that buffers all incoming user requests, and (ii) the task queue that is a multiserver queue and holds all tasks waiting to being executed. threads^{2}^{2}2We avoid the term “server” that is commonly used in queueing theory literature to prevent confusion., representing the set of parallel connections to the storage cloud, are attached to the task queue. The adaptation module of TOFEC monitors the state of the queues and the threads, and decides what coding parameter to be used for each request. Without loss of generality, we assume that the headofline (HoL) request leave the request queue only when there is at least one idle thread and the task queue is empty. A batch of tasks is then created for that request and injected into the task queue. As soon as any tasks complete successfully, the request is considered completed. Such a queue system is work conserving since no thread is left idle as long as there is any request or task pending.
IiB Basics of Erasure Codes
An MDS code (e.g., ReedSoloman codes) encodes data chunks each of bits into a codeword consisting of bit long coded chunks. The coded chunks can sustain up to erasures such that the original data chunks can be efficiently reconstructed from any subset of coded chunks. and are called the length and dimension of the MDS code. We also define as the redundancy ratio of an MDS code. This erasure resistant property of MDS codes has been utilized in prior works [3, 4, 5], as well as in this paper, to improve delay of cloud storage systems. Essentially a coded chunk experiencing long delay is treated as an erasure.
In this paper, we make use of another interesting property of MDS codes to implement variable chunk sizing of TOFEC in a storage efficient manner: MDS codes of high length and dimension for small chunk sizes can be used as MDS codes of smaller code length and dimension of larger chunk sizes. To be more specific, consider any MDS code for chunks of bits. To avoid confusion, we will refer to these bit chunks as strips. A different MDS code of length , dimension and chunk size for some can be constructed by simply batching every data/coded strips into one data/coded chunk. The resulting code is an MDS code for bit chunks because any coded chunks covers coded strips, which is sufficient to reconstruct the original file of bits. This property is illustrated as an example in Fig. 3. In this example, a 3MB file is divided into 6 strips of 0.5MB and encoded into 12 coded strips of total size 6MB, using a MDS code. This code can then be used as a code for 3MB chunks, a code for 1.5MB chunks and a code for 1MB chunks simultaneously by batching 6, 3 and 2 strips into a chunk.
IiC Definitions of Different Delays
The delay experienced by a user request consists of two components: queueing delay () and service delay (). Both are defined with respect to the request queue: (i) the queueing delay is the amount of time a request spends waiting in the request queue and (ii) the service delay is the period of time between when the request leaves the request queue (i.e., admitted into the task queue and started being served by at least one thread) and when it finally leaves the system (i.e., the first time when any of the corresponding tasks complete). In addition, we also consider the task delays (), which is the time it takes for a thread to serve a task assuming it is not terminated or canceled preemptively. To clarify these definitions of delays, consider a request served with an MDS code, with its arrival time, the starting times of the corresponding tasks^{3}^{3}3We assume if the th task is never started.. Then the queueing delay is . Suppose are the corresponding task delays, then the completion times of these task will be if none is canceled. So the request will leave the system at time , which denotes the th smallest value in , i.e., the time when tasks complete. Then the service delay of this request is .
Iii Variable Chunk Sizing
In this section, we discuss implementation issues as well as pros and cons of two potential approaches, namely Unique Key and Shared Key, for supporting erasurecodebased access to files on the storage cloud with a variety of chunk sizes. Suppose the maximum desired redundancy ratio is , then these approaches implement variable chunk sizing as follows:

Unique Key: For every choice of chunk size (or equivalently ), a separate batch of coded chunks are created and each coded chunk is stored as an individual object with its unique key on the storage cloud. The access to different chunks is implemented through basic get, put storage cloud APIs.

Shared Key: A coded file is first obtained by stacking together the coded strips obtained by applying a highdimension MDS code to the original file, as described in Section IIB and illustrated in Fig.3. For read, the coded file is stored on the cloud as one object. Access to chunks with variable size is realized by downloading segments in the coded file corresponding to batches of a corresponding number of strips, using a same key with more advanced “partial read” storage cloud APIs. Similarly, for write, the file is uploaded in parts using “partial write” APIs and then later merged into one object in the cloud.
Iiia Implementation and Comparison of the two Approaches
IiiA1 Storage cost
When the user request is to write a file, storage cost of Unique Key and Shared Key is not so different. However, to support variable chunk sizing for read requests, Shared Key is significantly more costefficient than Unique Key. With Shared Key, a single coded file stored on the cloud can be reused to support essentially an arbitrary number of different chunk sizes, as long as the strip size is small enough. On the other hand, it seems impossible to achieve similar reusing with the Unique Key approach where different chunks of the same file is treated as individual objects. So with Unique Key, every additional chunk size to be supported requires an extra storage cost file size. Such linear growth of storage cost easily makes it prohibitively expensive even to support a small number of chunk sizes.
IiiA2 Diversity in delays
The success of TOFEC and other proposals to use redundant requests (either with erasure coding or replication) for delay improvement relies on diversity in cloud storage access delays. In particular, TOFEC, as well as [3, 4, 5], requires access delays for different chunks of the same file to be weakly correlated.
With Unique Key, since different chunks are treated as individual objects, there is no inherent connection among them from the storage cloud system’s perspective. So depending on the internal implementation of object placement policy of the storage cloud system, chunks of a file can be stored on the cloud in different storage units (disks or servers) on the same rack, or in different racks in the same data center, or even to different data centers at distant geographical locations. Hence it is quite likely that delays for accessing different chunks of the same file show very weak correlation.
On the other hand, with Shared Key, since coded chunks are combined into one coded file and stored as one object in the cloud, it is very likely that the whole coded file, hence all coded chunks/strips, is stored in the same storage unit, unless the storage cloud system internally divides the coded file into pieces and distributes them to different units. Although many distributed storage systems do divide files into parts and store them separately, it is normally only for larger files. For example, the popular Hadoop distributed file system by default does not divide files smaller than 64MB. When different chunks are stored on the same storage unit, we can expect higher correlation in their access delays. It then is to be verified that the correlation between different chunks with the Shared Key approach is still weak enough for our coding solution to be beneficial.
IiiA3 Universal support
Unique Key is the approach adopted in our previous work [3] to support erasurecode based file accessing with one predetermined chunk size. A benefit of Unique Key is that it only requires basic get, put APIs that all storage cloud system must provide. So it is readily supported by all storage cloud systems and can be implemented on top of any one.
On the other hand, Shared Key requires more advanced APIs that allow the proxy to download or upload only the targeted segment of an object. Such advanced APIs are not currently supported by all storage cloud systems. For example, to the best of our knowledge currently Microsoft’s Azure Storage provides only methods for “partial read”^{4}^{4}4E.g. DownloadRangeToStream(target, offset, length) downloads a segment of length bytes starting from the offsetth byte of the target object (or “blob” in Azure’s jargon). but none for “partial write”. On the contrary, Amazon S3 provides partial access for both read and write: the proxy can download a specific inclusive byte range within an object stored on S3 by calling getObject(request,destination)^{5}^{5}5The byte range is set by calling request.setRange(start,end).; and for uploading an uploadPart method to upload segments of an object and an completeMultipartUpload method to merge the uploaded segments are provided. We expect more service providers to introduce both partial read and write APIs in the near future.
IiiB Measurements on Amazon S3
To understand the tradeoff between Unique Key and Shared Key, we run measurements over Amazon EC2 and S3. EC2 instance served as the proxy in our system model. We instantiated an extra large EC2 instance with high I/O capability in the same availability region as the S3 bucket that stores our objects. We conducted experiments on different week days in May to July 2013 with various chunk sizes between 0.5MB to 3MB and up to coded chunks per file. For each value of , we allow simultaneously active threads while the th thread being responsible for downloading the th coded chunk of each file. Each experiment lasted longer than 24 hours. We alternated between different settings to capture similar time of day characteristics across all settings.
The experiments are conducted within all 8 availability regions in Amazon S3. Except for the “US Standard” availability region, all other 7 regions demonstrate similar performance statistics that are consistent over different times and days. We conjecture the different and inconsistent behavior of “US Standard” might be due to the fact that it targets a slightly different usage pattern and it may employ a different implementation for that reason^{6}^{6}6See http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region. We will exclude “US Standard” from subsequent discussions. Due to lack of space, we only show a limited subset of findings for availability region “North California” that are representative for regions other than “US Standard”:
(1) In both Unique Key and Shared Key, the task delay distribution observed by different threads are almost identical. The two approaches are indistinguishable even beyond 99.9th percentile. Fig.4 show the complementary cumulative distribution function (CCDF) of task delays observed by individual threads for 1MB chunks and . Both approaches demonstrate large delay spread in all regions.
(2) Task delays for different threads in Unique Key show close to zero correlation, while they demonstrate slightly higher correlation in Shared Key, as it is expected. At all different settings, the cross correlation coefficient between different threads stays below 0.05 in Unique Key and ranges from 0.11 to 0.17 in Shared Key. Both approaches achieve significant service delay improvements. Fig.5 plots the CCDF of service delays for downloading 3MB files with 1MB chunks () with , assuming all tasks in a batch start at the same time. In this setting, both approaches reduce 99th percentile delays by roughly 50%, 65% and 80% by downloading 1, 2 and 3 extra coded chunks. Although Shared Key demonstrates up to 3 times higher cross correlation coefficient, there is no meaningful statistical distinction in service delay between the two approaches until beyond 99th percentile. All availability regions experience different degrees of degradation at high percentiles with Shared Key due to the higher correlation. Significant degradation emerges from around 99.9th percentile and beyond in all regions except for “Sao Paulo”, in which degradation appears around 99th percentile.
(3) Task delays are always lower bounded by some constant that grows roughly linearly as chunk size increases. This constant part of delay cannot be reduced by using more threads: see the flat segment at the beginning of the CCDF curves in Fig.4 and Fig.5. Since this constant portion of task delays is unavoidable, it leads to the negative effect of using larger since there is a minimum cost of system resource of (timethread) that grows linearly in . This cost leads to a reduced capacity region for using more redundant tasks, as illustrated in the example of Fig.1. We observe that the two approaches deliver almost identical total delays (queueing + service) for all arrival rates, in spite of the degraded service delay with Shared Key at very high percentile. So we only plot the results with Shared Key in Fig.1.
(4) The mean and standard deviation of task delays grows roughly linearly as chunk size increases. Fig.6 plots the measured mean and standard deviation of task delays in both approaches at different chunk sizes. Also plotted in the figures are least squares fitted lines for the measurement results. Notice that the extrapolations at chunk size = 0MB are all greater than zero. We believe this observation reflects the costs of nonI/Orelated operations in the storage cloud that do not scale proportionally to object size, for example the cost to locate the requested object. We also believe such costs contribute partially to the minimum task delay constant .
IiiC Model of Task Delays
Based on the aforementioned observations, we decide to use the Shared Key approach in TOFEC since its outstanding storage efficiency overweights the minimum degradation in delay. For the analysis present in the next section, we model the task delays as independently distributed random variables whose mean and standard deviation grow linearly as chunk size increases. More specifically, we assume the task delay for chunk size following distribution in the form of
(1) 
where captures the lower bound of task delays as in observation (3), and represents a exponential random variable that models the tail of the CCDF. The mean and standard deviation of the exponential tail both equal to With this model, constants and together capture the nonzero extrapolations of the mean and standard deviation of task delays at chunk size 0, and similarly, constants and together capture the rate at which the mean and standard deviation grow as chunk size increases, as in observation (4).
Iv Design of TOFEC
For the analysis in this section, we group requests into classes according to the tuple (type, size). Here type can be read or write, and can potentially be other type of operations supported by the cloud storage. Each type of operation has its own set of delay parameters . Subscripts will be used to indicate variables associated with each class.
We first introduce approximations for the expected queueing and service delays, assuming the FEC code used to serve requests of each class is predetermined and fixed (Section IVA) Then we formulate an optimization problem whose objective is to minimize the expected total delay over all such static strategies with fixed FEC codes. We show that solutions to the nonconvex optimization problem exhibit a nice property (Section IVB):
The optimal values of , and can all be expressed as functions of solely determined by – the expected length of the request queue: , and are all strictly decreasing functions of .
This finding is then used as the guideline in the design of our backlogdriven adaptive strategy TOFEC (Section IVC).
Iva Approximated Analysis of Static Strategies
Denote as the file size of class . Consider a request of class served with an MDS code, i.e., . First suppose all tasks start at the same time, i.e., . In this case, given our model for task delays, it is trivial to show that the expected service delay equals to
(2)  
Also define the system usage (or simply cost) of a request as the sum of the amount of time each of its tasks being served by a thread^{7}^{7}7The time a task being served is if it completes successfully, if it starts but is terminated preemptively, and 0 if it is canceled while waiting in the task queue.. When all tasks start at the same time, its expected system usage is (see Section IV of [3] for detailed derivation)
(3)  
Suppose class contributes to fraction of the total arrivals, then the average cost per request is . With simultaneously active threads, requests depart the system at rate (request/unit time). In light of this observation, we approximate the request queue with an queue with service rate . So the queueing delay in the original system at total arrival rate is approximated by
(4) 
and the expected length of the request queue is approximately
(5) 
Here .
We acknowledge that the above approximation is quite coarse, especially because tasks of the same batch do not start at the same time in general. However, remember the main objective of this paper is to develop a practical solution that can achieve the optimal delaythroughput tradeoff. According to the simulation results, this approximation is sufficiently good for the purpose of this paper.
IvB Optimal Static Strategy
Given total arrival rate and composition of requests , we want to find the best choice of FEC code for each class such that the total delay is minimized. Relaxing the requirement for and being integers, this is formulated as the following minimization problem^{8}^{8}8Notice that all classes share the same queueing delay. Also, we require instead of for a technicality to simplify the proof of the uniqueness of the optimal solution. We require since . is imposed for queue stability.:
(*)  
Notice that this is a nonconvex optimization problem because the feasible region is not a convex set, due to the terms in . In general, nonconvex optimization problems are difficult to solve. Fortunately, we are able to prove the following theorem according to which this nonconvex optimization problem can be solved numerically efficiently.
Theorem 1
For any given and , the nonconvex optimization problem (* ‣ IVB) has a unique optimal solution, which satisfies the following for all :
(6)  
(7) 
Proof:
See Appendix. \qed
Observing that Eq.6 contains only delay parameters and file size of class , so it should be always satisfied no matter what arrival rate and request composition are. Solving Eq.6 alone gives a set of pairs that are the optimal choice of code for class for some and . Then solving Eq.7 within this set we obtain the optimal and as a function of for all combinations of and such that . Observing from Eq.5 that , and with some simple calculus, we conclude that
Corollary 1
The optimal values of , and can all be expressed as strictly decreasing functions of :
(8) 
IvC Adaptive Strategy TOFEC
The finding of Corollary 1 conforms to our intuition:

At light workload (small ), there should be little backlog in the request queue (small ) and the service delay dominates the total delay. In this case, the system is not operating in the throughputlimited regime, so it is beneficial to increase the level of chunking and redundancy.

At heavy workload (larger ), there will be a large backlog in the request queue (large ) and the queueing delay dominates the total delay. In this case, the system operates in the throughputlimited regime, So it is better to reduce the level of chunking and redundancy to support higher throughput.
More importantly, it suggests that it is sufficient to choose the FEC code solely based on the length of the request queue. The basic idea of TOFEC is to choose and for a request of class , where is the queue length upon the arrival of the request. When this is done to all requests arrive into the system, it can be expected the average code lengths (dimensions) and expected queue length satisfy Eq.8, hence optimal delay is achieved. In TOFEC, this is implemented with a threshold based algorithm, which can be performed very efficiently. For each class , we first compute the expected queue length if is the optimal code length by
(9) 
Here is the maximum number of tasks allowed for a class request. Since is a strictly decreasing function, its inverse is a welldefined strictly decreasing function. As a result, we have Remember our goal is to use code length if queue length is around , so we want a set of thresholds such that
and will use such that . In our current implementation of TOFEC, we use for and . A set of thresholds for adaptation of is found in a similar fashion. The adaptation algorithm of TOFEC is summarized in pseudocodes below:
TOFEC (Throughput Optimal FEC Cloud)
Initialization:
request arrives
Note that in Step 6 we reduce to if the redundancy ratio of the code chosen in the previous steps is higher than – the maximum allowed redundancy ratio for class . Also, instead of comparing directly with the thresholds, we compare an exponential moving average , with a memory factor , against the thresholds to determine and . The moving average is used to mitigate the transient variation in queue length so that and will not change too frequently. It is obvious that we only need to set in order to use instantaneous queue length for the adaptation since in this case .
V Evaluation
We now demonstrate the benefits of TOFEC’s adaptation mechanism. We evaluate TOFEC’s adaptation strategy and show that is outperforms static strategies with both constant and changing workloads, as well as a simple greedy heuristic that will be introduced later.
Va Simulation Setup
We conducted tracedriven simulations for performance evaluation for both singleclass and multiclass scenarios with both read and write requests of different file sizes. Due to lack of space, we only show results for the scenario with one class (read,3MB). But we must emphasize that it is representative enough so that the findings to be discussed in this section are valid for other settings (different file sizes, write requests, and multiple classes). We assume the system supports up to simultaneously active threads. We set the maximum code dimension and redundancy ratio to be and , because we observe negligible gain in service delay beyond this chunking and redundancy level from our measurements. We use traces collected in May and June in availability region “North California”. In order to compute the threshold for TOFEC, we need estimations of the delay parameters . For this, we first filter out the worst 10% task delays in the traces, then we compute the delay parameters from the least squares linear approximation for the mean and standard deviation of the remaining task delays. We use memory factor in TOFEC.
In addition to the static strategies, we develop a simple Greedy heuristic strategy for the purpose of comparison. Unlike the adaptive strategy in TOFEC, Greedy does not require priorknowledge of the distribution of task delays, yet it achieves competitive mean delay performance. In Greedy, the code to be used to serve request in class is determined by the number of idle threads upon its arrival: suppose there are idle threads, then and similarly The idea of Greedy is to first maximize the level of chunking with the idle threads available, then increase the redundancy ratio as long as there are idle threads remain.
VB ThroughputDelay TradeOff
Fig.7 shows the mean, median, 90th percentile and 99th percentile delays of TOFEC and Greedy with Poisson arrivals at different arrival rate . We also run simulations with static strategies for all possible combinations of at every arrival rate. We bruteforce find the best mean, median, 90th and 99th percentile delays achieved with static strategies and use them as the baseline. Also plot in Fig.7(a) and Fig.7(b) are the mean and median delay performance of the basic static strategy with no chunking and no replication, i.e., code; the simple replication static strategy with a code; and the backlogbased adaptive strategy from [3] with fixed code dimension and .
As we can see, TOFEC and Greedy have almost identical performance in terms of mean and median delays. Both TOFEC and Greedy achieve (almost) optimal mean and median delays for all arrival rates. At light workload, TOFEC delivers about improvement in mean delay when compared with the basic static strategy, and about when compared with simple replication (from 205ms and 151ms to 84ms). It also reduces the median delay by about from that of basic and simple replication (from 156ms and 138ms to 74ms). Meanwhile Greedy achieve about improvement in both mean (89ms) and median delays (79ms) over basic.
With heavier workload, both TOFEC and Greedy successfully adapt their codes to keep track with the best static strategies, in terms of mean and median delays. It is clear from the figures that both TOFEC and Greedy achieve our primary goal of retaining full system capacity, as supported by basic static strategy. On the contrary, although simple replication has slightly better mean and median delays than basic under light workload, it fails to support arrival rates beyond 70% of the capacity of basic. Meanwhile, the adaptive strategy from [3] with fixed code dimension can only support less than 30% of the original capacity region, although it achieves the best delay at very light workload.
While the two adaptive strategies have similar performance in mean and median, TOFEC outperforms Greedy significantly at high percentiles. As Fig.7(c) and Fig.7(d) demonstrate, TOFEC matches with the best static strategies at 90th and 99th percentile delays throughout the whole capacity region. On the other hand, Greedy fails to keep track of the best static performance at lower arrival rates. At light workload, TOFEC’s is over and better than Greedy at 90th and 99th percentiles. Less interesting is the case with heavy workload and the system is throughputlimited. Hence both strategies converge to the basic static strategy using mostly code, which is optimal at this regime.
VC Behavior of the Adaptation Mechanisms
When we look into the fraction of requests served by each choice of code, TOFEC and Greedy turn out to behave quite differently. In Fig.8 we plot the compositions of requests served by different code dimension ’s. At each arrival rate, the two bars represent TOFEC and Greedy. For each bar, the colors represent the fraction of requests served with code dimension 1 through 6, from bottom to top. TOFEC’s choice of demonstrates a high concentration around the optimal value: at all arrival rate, over 80% requests are served by 2 neighboring values of . Moreover, as arrival rate varies from low to high, TOFEC’s choice of transitions quite smoothly as and eventually converges to a single value as workload approaches system capacity. On the contrary, Greedy tends to roundrobin across all possible choices of and majority of requests are served by either or . So Greedy is effectively alternating between the two extremes of no chunking and very high chunking, instead of staying around the optimal. Such “all or nothing” behavior results in to worse standard deviation as shown in Fig.9. So TOFEC provides much better QoS guarantee.
We further examine how well the two adaptive strategies adjust to changes in workload. In Fig.10 we plot the total delay experienced by requests arriving at different times within a 600second period. The arrival rate is 10 request/second for the first and last 200 seconds, and 70 request/second for the middle 200 seconds. Both adaptive strategies turn out to be quite agile to changes in arrival rate and quickly converge to a good composition of codes that delivers optimal delays. On the contrary, the static strategy using code builds up a huge backlog during middle 200second period and takes over 100 seconds to clean it up.
Vi Related Work
FEC in connection with multiple paths and/or multiple servers is a well investigated topic in the literature [7, 8, 9, 10]. However, there is very little attention devoted to the queueing delays. FEC in the context of network coding or coded scheduling has also been a popular topic from the perspectives of throughput (or network utility) maximization and throughput vs. service delay tradeoffs [11, 12, 13, 14]. Although some incorporate queuing delay analysis, the treatment is largely for broadcast wireless channels with quite different system characteristics and constraints. FEC has also been extensively studied in the context of distributed storage from the points of high durability and availability while attaining high storage efficiency [15, 16, 17].
Authors of [4] conducted theoretical study of cloud storage systems using FEC in a similar fashion as we did in our work [3]. Given that exact mathematical analysis of the general case is very difficult, authors of [4] considered a very simple case with a fixed code of tasks. Shah et al. [5] generalize the results from [4] to . Both works rely on the assumption of exponential task delays, which hardly captures the reality. Therefore, some of their theoretical results cannot be applied in practice. For example, under the assumption of exponential task delays, Shah et al. have proved that using larger will not reduce system capacity and will always improve delay, contradicting with simulation results using realworld measurements in [3] and this paper.
Vii Conclusion
TOFEC’s adaptation mechanism is the first technique for automatically adjusting the level of both chunking and redundancy for scalable keyvalue storage access using erasure codes and parallel connections. TOFEC monitors the local backlog and dynamically adjust both the length and dimension of the erasure code to be used. To evaluate TOFEC’s adaptation mechanism, we run simulations using realworld traces obtained on Amazon S3. We found that TOFEC delivers the optima throughputdelay tradeoff and dramatically outperforms nonadaptive strategies and simple adaptive heuristics.
References
 [1] C. Huang, H. Simitci, Y. Xu, A. Ogus, B. Calder, P. Gopalan, J. Li, and S. Yekhanin, “Erasure coding in windows azure storage,” in USENIX ATC, 2012.
 [2] S. L. Garfinkel, “An evaluation of AmazonÕs grid computing services: EC2, S3 and SQS,” Harvard University, Tech. Rep., 2007.
 [3] G. Liang and U. C. Kozat, “FAST CLOUD: Pushing the Envelope on Delay Performance of Cloud Storage with Coding,” arXiv:1301.1294, Jan. 2013.
 [4] L. Huang, S. Pawar, H. Zhang, and K. Ramchandran, “Codes can reduce queueing delay in data centers,” in IEEE ISIT, 2012.
 [5] N. B. Shah, K. Lee, and K. Ramchandran, “The mds queue: Analysing latency performance of codes and redundant requests,” arXiv:1211.5405, Apr. 2013.
 [6] J. C. McCullough, J. Dunagan, A. Wolman, and A. C. Snoeren, “Stout: an adaptive interface to scalable cloud storage,” in USENIX ATC, 2010.
 [7] V. Sharma, S. Kalyanaraman, K. Kar, K. K. Ramakrishnan, and V. Subramanian, “MPLOT: A Transport Protocol Exploiting Multipath Diversity Using Erasure Codes,” in IEEE INFOCOM, 2008.
 [8] E. Gabrielyan, “FaultTolerant RealTime Streaming with FEC thanks to Capillary MultiPath Routing,” Computing Research Repository, 2006.
 [9] J. W. Byers, M. Luby, and M. Mitzenmacher, “Accessing Multiple Mirror Sites in Parallel: Using Tornado Codes to Speed Up Downloads,” in IEEE INFOCOM, 1999.
 [10] R. Saad, A. Serhrouchni, Y. Begliche, and K. Chen, “Evaluating Forward Error Correction performance in BitTorrent protocol,” in IEEE LCN, 2010.
 [11] A. Eryilmaz, A. Ozdaglar, M. Medard, and E. Ahmed, “On the delay and throughput gains of coding in unreliable networks,” IEEE Trans. Inf. Theor., 2008.
 [12] W.L. Yeow, A. T. Hoang, and C.K. Tham, “Minimizing Delay for MulticastStreaming in Wireless Networks with Network Coding,” in IEEE INFOCOM, 2009.
 [13] T. K. Dikaliotis, A. G. Dimakis, T. Ho, and M. Effros, “On the Delay of Network Coding over Line Networks,” Computing Research Repository, 2009.
 [14] U. C. Kozat, “On the throughput capacity of opportunistic multicasting with erasure codes,” in IEEE INFOCOM, 2008.
 [15] A. G. Dimakis, P. B. Godfrey, Y. Wu, M. J. Wainwright, and K. Ramchandran, “Network coding for distributed storage systems,” IEEE Trans. Inf. Theor., 2010.
 [16] R. Rodrigues and B. Liskov, “High Availability in DHTs: Erasure Coding vs. Replication,” in 4th International Workshop, IPTPS, 2005.
 [17] J. Li, S. Yang, X. Wang, and B. Li, “Treestructured data regeneration in distributed storage systems with regenerating codes,” in IEEE INFOCOM, 2010.
Appendix A Appendix
Proof:
The objective of (* ‣ IVB) is a lowerbounded continuously differentiable function within the feasible region. Its value goes to as approaches the boundary of the feasible region. As a result, there exist at least one global optimal solution. At the global optimal, derivatives of the objective over and both equal to 0. Equating the partial derivatives of the objective over and to 0 can be rewritten into Eq.6 and Eq.7.
It is trivial to show that the left hand side of Eq.6 is a strictly increasing function of and the right hand side is a strictly increasing function of as long as . This implies that, is a strictly increasing function of . The right hand side of Eq.7 becomes some function of by substituting with the solution from Eq.6. It can be shown that is a strictly decreasing function. Notice that Eq.7 must be satisfied for all and the left hand side remains unchanged. Then
(10) 
Recall that and are strictly decreasing functions of and , respectively. This means that there is a onetoone mapping between any and at the optimal solutions, and is a strictly increasing function of .
Notice that for any given and the left hand side of Eq.7 is a strictly increasing function of if we replace all ’s and ’s with the solutions of Eq.6 and Eq.10. The right hand side of Eq.7 is , which is a strictly decreasing function of . As a result, these two functions can be equal for at most one value of , i.e., Eq.6 and Eq.7 have at most one solution. Since we have already proved the existence of a solution to these equations via the existence of global optimal, they have an unique solution. \qed