Approximations and Bounds for (n, k) Fork-Join Queues: A Linear Transformation Approach
Huajin Wang Jianhui Li Zhihong Shen Yuanchun Zhou
cs.PF cs.DC cs.NI stat.AP





Approximations and Bounds for (n, k) Fork-Join Queues: A Linear Transformation Approach
    
Huajin Wang12,
Jianhui Li1,
Zhihong Shen1 and
Yuanchun Zhou1

1Computer Network Information Center, Chinese Academy of Sciences, China

 Email: {wanghj, lijh, bluejoe, zyc}@cnic.cn
2University of Chinese Academy of Sciences, China

This work was supported by the National Key Research Program of China (2016YFB1000600, 2016YFB0501900). Corresponding author is Jianhui Li.

    December 30, 2023
=========================================================================================================================================================================================================================================================================================================================================================================================


Compared to basic fork-join queues, a job in (n,k) fork-join queues only needs its k out of all n sub-tasks to be finished. Since (n,k) fork-join queues are prevalent in popular distributed systems, erasure coding based cloud storages, and modern network protocols like multipath routing, estimating the sojourn time of such queues is thus critical for the performance measurement and resource plan of computer clusters. However, the estimating keeps to be a well-known open challenge for years, and only rough bounds for a limited range of load factors have been given. In this paper, we developed a closed-form  for jointly-identical random variables: An order statistic can be represented by a linear combination of maxima. This brand-new technique is then used to transform the sojourn time of non-purging (n,k) fork-join queues into a linear combination of the sojourn times of basic (k,k), (k+1,k+1),...,(n,n) fork-join queues. Consequently, existing approximations for basic fork-join queues can be bridged to the approximations for non-purging (n,k) fork-join queues. The uncovered approximations are then used to improve the upper bounds for purging (n,k) fork-join queues. Simulation experiments show that this linear transformation approach is practiced well for moderate n and relatively large k.






§ INTRODUCTION

The performance of fork-join queues is a highly focused research topic for many years for the ubiquitousness of fork-join queues in both real-life workflows and computing systems. In a fork-join queueing system, a job is forked into n sub-tasks when it arrives at a control node, and each sub-task is sent to a single node to be conquered. Results of finished sub-tasks are summarized at a central join node. When the job arrival rate λ is high, a sub-task may have to wait for service in the sub-queue of its hosting node in a first-come-first-serving order. A basic fork-join queue considers a job is done after all results of the job have been received at the join node (see Fig. <ref> (a)).



In Big Data era, more and more mainstream computing infrastructures become distributively deployed, and inevitably recruit fork-join queues to facilitate the storing and processing of large-scale datasets. For example: 1) Cassandra<cit.> and Dynamo<cit.>, two popular key-value data stores, use fork-join queues to concurrently perform read and write operations on all the replicas of the target key-value pairs; 2) The client of an (n,k) MDS (maximum distance separable) erasure coding based cloud storage system only needs to retrieve any k out of all n blocks of a file to reconstruct the file; 3) The data transmission process of multipath routing protocols can generally be simplified as a multi-stage fork-join queueing process.

Latency is commonly a critical concern in building and optimizing Big Data clusters. For example, in Amazon's cloud platform, services commonly have latency requirements which are in general measured at the 99.9^th percentile of the distribution <cit.>. The Dynamo storage system must be capable of meeting such stringent SLAs. In this scenario, basic fork-join queues may cause serious performance issues when the number of data replicas are large, since they require all the sub-tasks of a job to be finished before making the job's response. By contrast, (n,k) fork-join queues, as named in <cit.>, only require the job's any k out of n sub-tasks to be finished, and thus have performance advantages in such scenarios. For example, a write request in Casandra can either be responded when a quorum of replicas have been successfully written, or just get responded once the fast answer from all touched replicas is acknowledged when there is a need to pursue high throughputs.

As depicted in Fig. <ref>, there are mainly two versions of (n,k) fork-join queues: The purging one removes all the remaining sub-tasks of a job from both sub-queues and service stations once it receives the job's k^th answer. The file retrieval process from an MDS coded cloud storage system is such an example.
As a contrast, the non-purging one keeps queuing and executing remaining sub-tasks. For example, a write operation in Cassandra needs to update all the replicas of the target key-value pair, while can response to user as soon as a quorum of replicas have been successfully written.



  
The State-of-the-Art Research on Basic Fork-Join Queues
 The popularity of fork-join systems has drawn great attentions from database/OS/networking communities to the performance analyses of fork-join queues for a rather long period of time. Unfortunately, there is still no exact closed-form solution of the sojourn time of the job in n≥ 3 basic fork-join queues. The difficulty lies in the fact that the sojourn times of a job's sub-tasks are not independent, as their hosting sub-queues share the same sub-task arrival process. Since most of existing exact analysis techniques are developed for independent and identical (iid) random variables, it is very hard to trace the sojourn time distribution for fork-join queues.

For n≥ 3 fork-join queues under Poisson job arrival process and with iid exponential service time distributions, Nelson et al. <cit.> proposed an initiative approximation technique which is based on the fact that the sojourn times X_1 k of sub-tasks 1,2,...,k are associated variables, whose maximum can be bounded by the maximum of their iid equivalents <cit.>: P(X_1 n≤ t)≥∏_i=1^nP(X^IID_i≤ t). According to that, the upper bounds and closed-form approximations of the sojourn time were given in this work. Simulation experiments in <cit.> showed that Nelson's approximation is still the most reliable one, compared to following works such as <cit.> and <cit.>.



  
The State-of-the-Art Research and Open Challenges on (n,k) Fork-Join Queues

Despite the popularity of (n,k) fork-join queues in Big Data systems and many other fields, there are even no practical approximations on the sojourn time of (n,k) fork-join queues: Unlike the maximum, the k^th order statistic cannot be bounded by using associated variables' property, which makes the sojourn time of (n,k) fork-join queues more hard to analyze, compared to basic fork-join queues.



Currently, there are only exact quantity analyses for purging (n,1) fork-join queues <cit.>, because such a queue is equivalent to a single queue with n times the sub-queue's service rate. For general purging (n,k) fork-join queues, there are only rough bounds have been given: Joshi et al. <cit.> resort to the split-merge queue model
(see Fig. <ref>) 
 to find proper upper and lower bounds. Compared to purging (n,k) fork-join queues, all empty sub-queues in the split-merge model are blocked and cannot serve subsequent tasks until k sub-tasks of the current job are completed, which makes the split-merge model much easier to trace. However, these split-merge based bounds tend to be extremely loose when increasing k or the load factor ρ, as we depict in Section <ref>.


Since non-purging (n,k) fork-join queues cannot be reduced to the split-merge model, they are more difficult to analyze, even including (n,1) queues. Recently, Fidler et al. <cit.> gave non-asymptotic statistical bounds on the sojourn times for non-purging fork-join queues. However, no reasonable approximations have been proposed.



  
Methodology and Contributions
This paper aims at fixing the lack of proper approximations for non-purging (n,k) fork-join queues and tackling the uncontrollability of bounds for purging (n,k) fork-join queues. To achieve these objectives, we trace fork-join queues in a fundamental way: The linear relationship between (n,k) fork-join queues and their basic (k,k), (k+1,k+1),...,(n,n) equivalents is depicted for the first time; This relationship is then used to bridge the existing approximations for basic fork-join queues to the approximations and bounds for (n,k) fork-join queues.

Our innovations and contributions are highlighted as follows:

  
  * A brand-new closed-form  for jointly-identical random variables, by which order statistics can be transformed into a closed-form linear combination of maxima. Besides, there is no need to assume the independence of variables.
  
  * The first reasonable and practical method to approximate the expected sojourn time of non-purging (n,k) fork-join queues with general service time distributions. This method relies on the cooperation between the linear transformation technique and the existing approximations for basic fork-join queues.
  
  * Improvements over the upper bounds on the expected sojourn time of purging (n,k) fork-join queues, which are gained by resorting the bounds to that of the non-purging equivalent (n,k) fork-join queues.


This paper is organized as follows: The linear transformation technique is developed in Section <ref>; This technique is then employed in Section <ref> to find proper approximations for non-purging (n,k) fork-join queues; The flaws of existing bounds for purging (n,k) fork-join queues and our improvements over upper bounds are depicted in Section <ref>; In Section <ref>, we discuss the limitation of this linear transformation technique; Related works are reviewed in Section <ref>; We conclude this work and point out some promising future research directions in Section <ref>.



§ PRELIMINARIES: LINEAR TRANSFORMATIONS OF ORDER STATISTICS

In this section, we consider a family of rvs (random variables) X_1, X_2,...,X_n (denoted as X_1 n) defined on a probability space, and let X_(n,k) denotes their k^th order statistic, P_k denotes the possibility P(X_1≤ t, X_2≤ t,...,X_k≤ t) and P_n,k denotes the possibility P(X_1≤ t, X_2≤ t,...,X_k≤ t, X_k+1>t, X_k+2>t,...,X_n>t). Obviously, P_k is the distribution of the maximum of X_1 k.


	For n identically distributed rvs X_1 n and ∀ k∈ [1 n], if any k arbitrarily chosen rvs  keep the same joint probability distribution, these n identical rvs are named as jointly-identical rvs.


For n jointly-identical rvs X_1 n, 
    P_n,k=∑_i=k^nA^n,k_iP_i, 1≤∀ k ≤ n,

 where the const coefficient A^n,k_i can be calculated by the following recurrence: 
    A^n,k_i={[                           1                        i=k,; -∑_j=1^i-kn-i+j  jA^n,k_i-j                  k+1≤ i≤ n. ].



Let P_n-k|k denotes P(X_k+1>t,X_k+2>t,...,X_n > t|X_1≤ t,X_2≤ t,...,X_k≤ t) and 
P_n-i,i-k|k denotes P(X_i+1>t,X_i+2>t,...,X_n > t, X_k+1≤ t, X_k+2≤ t, X_i≤ t|X_1≤ t,X_2≤ t,...,X_k ≤ t), k+1≤ i ≤ n. Certainly, we have

    P_n-k|k=P_n,k/P_k , P_n-i,i-k|k=P_n,i/P_k.

As X_1 n are jointly-identical rvs, the following equation holds:

    P_n-k|k=1-∑_i=k+1^nn-k  i-kP_n-i,i-k|k.

By insertion of Eq. <ref> into Eq. <ref>, the following recurrence holds:

    P_n,k=P_k-∑_i=k+1^nn-k  i-kP_n,i

Expanse Eq. <ref>, we complete the proof of Lemma <ref>.





 §.§ Linear Transformation of Order Statistics


For n jointly-identical rvs X_1 n, there exists a linear transformation from maxima to order statistics:

    [ X_(n,1); X_(n,2);       ⋮; X_(n,n) ]
    =
    [ W_1^n,1 W_2^n,1       … W_n^n,1;       0 W_2^n,2       … W_n^n,2;       ⋮       ⋮       ⋱       ⋮;       0       0       … W_n^n,n;         ][ X_(1,1); X_(2,2);       ⋮; X_(n,n) ].

Namely, X_(n,k)=∑_i=k^nW_i^n,kX_(i,i), 1≤∀ k ≤ n, where the const coefficient

    W_i^n,k=∑_j=k^in  jA^n,j_i


Let F_n,k≡ P(X_(n,k)≤ t) be the probability distribution of the k^th order statistic. Equivalently, we need to prove

    F_n,k=∑_i=k^nW_i^n,kP(X_(i,i)≤ t)=∑_i=k^nW_i^n,kP_i.


As F_n,k=∑_i=k^nn  iP_n,i and P_n,k=∑_i=k^nA^n,k_iP_i (Lemma <ref>), we derive the following recurrence:

    F_n,k={[                           P_n                          k=n,; F_n,k+1+n  k∑_i=k^nA^n,k_iP_i                    1≤ k≤ n-1. ].

Expanse Eq. <ref>, we complete the proof of  Eq. <ref>.


There is no need to assume the independence of the identical rvs X_1 n.
There may exist other linear transformations of order statistics than the one given by Theorem <ref>.


For any possible linear transformations from maxima to order statistics, the corresponding const coefficient W_i^n,k of X_(i,i) is named as a W coefficient.

The calculation of the W coefficient given by Eq. <ref> is not straightforward, as it consists of many items. We use a simple solver (see Appendix) to give W coefficient values.





 §.§ Linear Transformation of Expectations

 
Let 𝔼_n,k≡ E[X_(n,k)] be the expectation of the k^th order statistic of rvs X_1 n. Specially, we use 𝔼_n to denote 𝔼_n,n. Then the following theorem holds.
For n jointly-identical rvs X_1 n, there exists a linear transformation from the expectations of maxima to the expectations of order statistics:

    𝔼_n,k=∑_i=k^nW_i^n,k𝔼_i, 1≤∀ k ≤ n.


E[X_(n,k)]=E[∑_i=k^nW_i^n,kX_(i,i)]=∑_i=k^nW_i^n,k𝔼_i





§ APPROXIMATIONS FOR NON-PURGING (N,K) FORK-JOIN QUEUES


We consider a homogenous cluster consisting of n nodes, where each node i (1≤ i≤ n) has the same service time distribution when processing sub-tasks of the same job. Each node owns a first-come-first-serving sub-queue q_i (1≤ i≤ n) with the assumption of unlimited queue capacity. These n sub-queues constitute a homogenous fork-join queue.

Each incoming job consists of n tasks. Let t_i^j be the sojourn time of the j^th job's sub-task assigned to node i. Then, the stable sojourn time of a sub-task in the sub-queue q_i is t_i≡lim_j→∞t_i^j, and the sojourn time of a job in the (n,k) fork-join queue is the k^th order statistic t_(n,k) consequently.


For an (n,n) fork-join queue, the sub-queues' stable sojourn times t_1 n constitute a family of jointly-identical rvs.


Recall that all the sub-queues have an unlimited capacity, then the sub-task sojourn time distribution of a sub-queue depends only on the job arrival process and the sub-queue's service time distribution.
As these sub-queues are under the same job arrival process and have the same service time distribution, the sub-queues' stable sojourn times t_1 n are identical rvs.

By the constitution methodology of fork-join queues, an (n,n) fork-join queue is symmetrical, which means its sub-queues are interchangeable and thus any k arbitrarily chosen sub-queues keep the same joint probability distribution. By definition the stable sojourn times t_1 n are jointly-identical rvs.
	


Those basic fork-join queues, purging/non-purging (n,k) fork-join queues and split-merge queues that are under the same job arrival process and with the same sub-queue's service time distribution are called (λ,μ)-equivalent queues to each other, where λ and μ are the job arrival rate and the sub-queue's service rate respectively.




 §.§ Approximations for General Fork-Join Queues

This paper uses the term  to denote the fork-join queues with identically and generally distributed sub-queues' service times and job inter-arrival times.

The sojourn time of a general non-purging (n,k) fork-join queue can be represented by a linear combination of the sojourn times of the (λ,μ)-equivalent basic fork-join queues:

    t_(n,k)=∑_i=k^nW_i^n,kt_(i,i)

 where W_i^n,k is the corresponding W coefficient.


The only difference between the (λ,μ)-equivalent non-purging (n,k) queue and basic (n,n) queue lies in the job departure process, which has no influence over the job arrival process, the sub-queue's service time distribution and therefore the distribution of the sub-queue length. Consequently, the target non-purging (n,k) queue and its (λ,μ)-equivalent (n,n) fork-join queue have the same family of jointly-identical rvs  t_1 n, and therefore the same order statistic t_(n,k).

According to Lemma <ref> and Theorem <ref>, t_(n,k)=∑_i=k^nW_i^n,kt^sub_(i,i), where t^sub_(i,i) is the maximum stable sojourn time of i arbitrarily chosen sub-queues from the target non-purging (n,k) queue. By the constitution methodology of fork-join queues, the i chosen sub-queues can constitute an (i,i) queue which is (λ,μ)-equivalent to the target non-purging (n,k) queue. Therefore, t_(i,i)=t^sub_(i,i) and t_(n,k)=∑_i=k^nW_i^n,kt^sub_(i,i)=∑_i=k^nW_i^n,kt_(i,i) hold.



The expected sojourn time ℕ𝕋_n,k≡ E[t_(n,k)] of a general non-purging (n,k) fork-join queue can be represented by a linear combination of the expected sojourn times of the (λ,μ)-equivalent basic fork-join queues:

    ℕ𝕋_n,k=∑_i=k^nW_i^n,k𝕋_i

where 𝕋_i is the expected sojourn time of the (λ,μ)-equivalent basic (i,i) fork-join queue and W_i^n,k is the corresponding W coefficient.


E[t_(n,k)]=E[∑_i=k^nW_i^n,kt_(i,i)]=∑_i=k^nW_i^n,k𝕋_i





The independence of the service times of the sub-queues is not required for Theorem <ref> and <ref> to hold. To put Theorem <ref> into practices, we need to find the existing computing methods of 𝕋_i.




 §.§ Approximations for Exponential Fork-Join Queues


This paper uses the term  to denote the fork-join queues under a Poisson job arrival process and with iid exponential sub-queues' service time distributions.

For exponential (n,n) fork-join queues, there exist two reliable approximation methods: Nelson's approximation<cit.> and Varma's approximation<cit.>. Accordingly, we can propose two approximation methods for exponential non-purging (n,k) fork-join queues: The  based on Nelson's approximation and the  based Varma's approximation.



  §.§.§ The Nelson-LT Approximation


For exponential (n,n) fork-join queues, Nelson et al. <cit.> proposed the following approximations:

    𝕋_1=1/μ(1-ρ),     𝕋_2=12-ρ/8𝕋_1
    𝕋_n≃[H_n/H_2+4/11(1-H_n/H_2)ρ]𝕋_2, n≥ 2,

where λ and μ are respectively the job arrival rate and the sub-queue's service rate, ρ≡λ/μ is called the load factor of the queue, 𝕋_n is the expected sojourn time of (n,n) basic fork-join queue, and H_n=∑_i=1^n1/i is called the harmonic number. Consequently, our approximations can be specified in the following theorem.
According to Nelson's approximation, the expected sojourn time ℕ𝕋_n,k of an exponential non-purging (n,k) fork-join queue can be approximated as follow:

    ℕ𝕋_n,k≃{[ [               n/μ(1-ρ)+12-ρ/88μ(1-ρ)×; ∑_i=2^nW_i^n,1[11H_i+4ρ(H_2-H_i)/H_2] ]                                                                             k=1,;                               12-ρ/88μ(1-ρ)∑_i=k^nW_i^n,k[11H_i+4ρ(H_2-H_i)/H_2]                                                                            k≥ 2. ].

  where λ and μ are respectively the job arrival rate and the sub-queue's service rate, and ρ≡λ/μ is the load factor of the target queue. Specially, we replace any negatively approximated ℕ𝕋_n,k with 0.



We examine above linear-transformation approximations against the mean sojourn times of jobs sampled from various simulated exponential non-purging fork-join queues (details of simulations in this paper can be found in Appendix). The value of W coefficients used in Eq. <ref> are given by Eq. <ref>. The results depicted in Fig. <ref> confirmed the validity of our technique under a moderate value of n (n≤ 50) and a relatively large value of k (compared to n). The relative errors are calculated as APP/SIM-1.

We notice that when k is relatively small, the approximation tends to be uncontrollable, which can be due to the fact that the smaller k is, the more items in Eq. <ref> are summed, and consequently, the more relative errors introduced by Nelson's approximations are accumulated.

These results also confirmed the high-precision merit of Nelson's approximations, since W coefficients tend to be very large with the increase of n, for example W^25,9_16=13146544125. As a result, the relative error introduced by Nelson's approximation has to be amplified by the large value of the corresponding W coefficient.



  §.§.§ The Varma-LT Approximation



For exponential non-purging (n,n) fork-join queues, Varma et al. <cit.> gave another well-known approximation method based on the so-called light traffic interpolation technique. The expected sojourn time is approximated as

    𝕋_n≃[H_n+(V_n-H_n)λ/μ]1/λ-μ, 0≤λ<μ

where V_n= ∑_r=1^nn  r(-1)^r-1∑_m=1^rr m(m-1)!/r^m+1.
 
As our linear transformation technique is orthogonal to the concrete approximation methods for basic fork-join queues, we replace Nelson's approximation with the above Varma's approximation to try to avoid the approximations' uncontrollability appeared in Theorem <ref>. Consequently, the new approximations can be specified in the following theorem.
According to Varma's approximation, the expected sojourn time of an exponential non-purging (n,k) fork-join queue can be approximated as follow:

    ℕ𝕋_n,k≃∑_i=k^nW_i^n,k[H_i+(V_i-H_i)λ/μ]1/λ-μ

  where λ and μ are respectively the job arrival rate and the sub-queue's service rate.


We examine Eq. <ref> against the mean sojourn times of jobs sampled from various simulated non-purging fork-join queues. The employed W coefficients are calculated from Eq. <ref>. The results depicted in Fig. <ref> showed that the new approximations are fairly good when n≤ 10 and ρ is not too extreme (ρ≤ 0.9): The relative error is generally less than 10%, which is much more controllable than the approximations given by Theorem <ref>.

However, as the Varma's approximation itself becomes out of control when n≥ 55, Theorem <ref> is more valuable in general cases.



§ BOUNDS FOR PURGING (N,K) FORK-JOIN QUEUES

Unlike in non-purging (n,k) fork-join queues, the sojourn time distribution of a sub-task in purging (n,k) fork-join queues changes when either n or k varies, and thus differs from the sojourn time distribution of a sub-task in the (λ,μ)-equivalent basic fork-join queues. As a result, we cannot build similar linear-transformation approximations for purging queues. However, the expected sojourn times of non-purging queues can serve as the upper bounds of the (λ,μ)-equivalent purging queues' expected sojourn times.



 §.§ The Naive Upper Bounds

The expected sojourn time ℙ𝕋_n,k of a purging (n,k) fork-join queue can be upper bounded as follow:

    ℙ𝕋_n,k≤∑_i=k^nW_i^n,k𝕋_i


 where 𝕋_i is the expected sojourn time of the (λ,μ)-equivalent basic fork-join queue.

The right side of Eq. <ref> is the expected sojourn time of the (λ,μ)-equivalent non-purging (n,k) fork-join queue. As the expected sub-queue length of a stable purging (n,k) fork-join queue is no longer than that of the (λ,μ)-equivalent stable non-purging queue, the expected sojourn time of the purging (n,k) fork-join queue is thus no larger than that of its non-purging (λ,μ)-equivalent queue.





  
Comparing with Existing Stat-of-the-Art Upper Bounds
For purging (n,k) fork-join queues with iid service time distributions and under a Poisson job arrival process, Existing state-of-the-art upper bounds on the expected sojourn time are the split-merge upper bounds given by Joshi et al. <cit.>:

    ℙ𝕋_n,k≤ E[X_(n,k)]+ λ E[X_(n,k)^2]/2(1-λ E[X_(n,k)])

 where λ is the job arrival rate and X_(n,k) is the k^th order statistic of the iid service time rvs X_1 n.
 
The right side of Eq. <ref> is the expected sojourn time of the (λ,μ)-equivalent (n,k) split-merge queue.

Split-merge upper bounds become much looser than naive upper bounds when E[X_(1,1)]< E[X_(n,k)] and λ→ [1/E[X_(n,k)]]^-.

When λ→ [1/E[X_(n,k)]]^-, the bounds given by Eq. <ref> approach +∞. Moreover, the bounds become meaningless when λ≥1/E[X_(n,k)]. As a contrast, our naive bounds are finite meaningful values, as long as  λ < [μ≡1/E[X_(1,1)]]. Besides, μ>1/E[X_(n,k)].


Apparently there is a range of load factors ρ∈ [E[X_(1,1)]/E[X_(n,k)],1) cannot be bounded by Eq. <ref>, and the larger k is, the smaller bounded-able ρ range becomes, while the naive bounds are applicable as long as ρ<1.


Naive upper bounds become much looser than split-merge upper bounds when k → 1.

When k → 1, more and more sub-tasks are purged from both the sub-queues and the service stations when the k^th finished sub-task is acknowledged by the purging (n,k) queue, as a result of which, the expected sub-queue length becomes shorter and shorter than that of the (λ,μ)-equivalent non-purging (n,k) queue. On the contrary, the expected sub-queue length of the target purging (n,k) fork-join queue becomes closer and closer to that of the (λ,μ)-equivalent (n,k) split-merge queue. At last, the purging (n,1) fork-join queue equates to the (n,1) split-merge queue, which gives us the following exact closed-form solution:
ℙ𝕋_n,1= E[X_(n,1)]+ λ E[X_(n,1)^2]/2(1-λ E[X_(n,1)]).

 On the other side of Corollary <ref>, when k → n, the expected sub-queue length of the purging (n,k) fork-join queue becomes closer and closer to that of the (λ,μ)-equivalent non-purging queues. At last, the purging (n,n) fork-join queue equates to the (λ,μ)-equivalent non-purging (n,n) fork-join queue.





 §.§ The Refined Upper Bounds




For a purging (n,k) fork-join queue with iid service time distributions and under a Poisson job arrival process, the expected sojourn time ℙ𝕋_n,k can be upper bounded as follows:

    ℙ𝕋_n,k≤{[                                                                             ∑_i=k^nW_i^n,k𝕋_i                                                                               λ≥1/E[X_(n,k)],; min(∑_i=k^nW_i^n,k𝕋_i,[                      E[X_(n,k)]+; λ E[X_(n,k)^2]/2(1-λ E[X_(n,k)]) ])                                                                                    otherwise. ].


 where 𝕋_i is the expected sojourn time of the (λ,μ)-equivalent (i,i) fork-join queue, λ is the job arrival rate, and X_(n,k) is the k^th order statistic of the iid service time rvs X_1 n.

According to Corollary <ref> and <ref>, and excluding the split-merge bounds when λ≥1/E[X_(n,k)], we derive Eq. <ref>.

 Although Eq. <ref> has extended the bounded-able range of ρ from [0,E[X_(1,1)]/E[X_(n,k)]) to [0,1), there is still an untamed range of ρ, since purging (n,k) fork-join queues may still keep stable even when ρ≥ 1.





  
Upper Bounds for Exponential Queues
Specially, we give the refined upper bounds for exponential purging (n,k) fork-join queues.
For exponential purging (n,k) fork-join queues, the expected sojourn time ℙ𝕋_n,k can be upper bounded as follows:

    ℙ𝕋_n,k≤{[                                                                                [ 12-ρ/88μ(1-ρ)∑_i=k^nW_i^n,k[11H_i+4ρ(H_2-H_i)/H_2] ]_Naive;                                                                                                               when k≥ 2  and ρ≥1/H_n-H_n-k,; ; min(Naive,[                                            H_n-H_n-k/μ+; ρ[(H_n^2-H_(n-k)^2)+(H_n-H_(n-k))^2]/2μ[1-ρ(H_n-H_n-k)] ]^Split-Merge);                                                                                                                                  otherwise. ].

  
 where λ and μ are respectively the job arrival rate and the sub-queue's service rate, ρ≡λ/μ, and H_n^2=∑^n_i=11/i^2.
 

The split-merge part of the Eq. <ref> is already given by Theorem 2 of <cit.>. According to Theorem <ref> and <ref>, we derive Eq. <ref>.


We make numerical comparisons between naive upper bounds and split-merge upper bounds, and examine refined upper bounds against the mean sojourn times of jobs sampled from various simulated purging fork-join queues. The value of W coefficients used in Eq. <ref> are given by Eq. <ref>. We find that:

  
  * The split-merge upper bounds become extremely pessimistic with the increase of k, but tend to be much tighter than naive bounds when k is small (see Fig. <ref> (a)). These results are consistent with Corollary <ref> and <ref>.
  
  * There is still plenty of room of improving the upper bounds when k is relatively large (see Fig. <ref> (b)).

 


 §.§ Lower Bounds

To complete our work, we review and compare the state-of-the-art lower bounds for purging (n,k) fork-join queues.

For purging (n,k) fork-join queues with iid service time distributions and under a Poisson job arrival process,
the state-of-the-art lower bounds are the split-merge lower bounds given in <cit.>:

    ℙ𝕋_n,k≥ E[X_(n,k)]+λ E[X_(n,1)^2]/2(1-λ E[X_(n,1)])

 where λ is the job arrival rate and X_(n,k) is the k^th order statistic of the iid service time rvs X_1 n.

For exponential purging (n,k) fork-join queues, there is another staging analysis based lower bound <cit.>:

    ℙ𝕋_n,k≥H_n-H_n-k/μ+ρ(H_n(n-ρ)-H_(n-k)(n-k-ρ))/μ

where λ and μ are respectively the job arrival rate and the sub-queue's service rate, ρ≡λ/μ, and H_n(n-ρ)=∑_i=1^n1/i(i-ρ). 

This staging lower bound is adapted from the staging lower bound for basic fork-join queues proposed in <cit.>, which requires a memory-less property of the service time distribution. Accordingly, this bound cannot be applied to general purging queues.


The staging lower bounds are tighter than the split-merge lower bounds.

The exact form of Eq. <ref> for exponential queues can be transformed into: 
    ℙ𝕋_n,k≥H_n-H_n-k/μ+ρ (H_n(n-ρ)-H_(n-1)(n-1-ρ))/μ.
 As H_(n-k)(n-k-ρ))< H_(n-1)(n-1-ρ)) when k>1, we derive Theorem <ref>.



 We examine bounds for exponential purging queues against simulations. Fig. <ref> depicts the large gap between the upper bounds and the lower bounds when k is relatively large, due to which, we can hardly find reasonable approximations of the expected sojourn time of purging (n,k) fork-join queues.
 


§ DISCUSSION


Currently, there is an unnegligible limitation when put the new proposed linear transformation technique into practices: The value of W coefficient given by Eq. <ref> increases explosively with the increase of n, for example W^40,37_37=40  37=9880, W^50,37_37=50  37=354860518600, and W^100,37_37=100  37=3.42002954749393 × 10^27, as a result of which, the original negligible relative error of 𝕋_i in Theorem <ref> will be amplified into a huge deviation of the approximated ℕ𝕋_n,k. Consequently, the practicability of the linear transformation technique depends on whether we can find high-precision approximated or simulated 𝕋_i. For example, when we use simulated 𝕋_i to estimate ℕ𝕋_n,k, the results are far from acceptable (see Table <ref>), and also far behind the Nelson-LT approximations (see Fig. <ref>). These surprising results can be due to the fluctuation of the simulated 𝕋_i (see Fig. <ref>). Fig. <ref> has depicted that the accuracy of the Nelson-LT approximation is acceptable when n≤ 50 and k is relatively large (for example, k> 37 when n=50). However the approximations are similarly unacceptable when k is relatively small (see Table <ref>).




The fundamental solution of this problem is to scale down W coefficients,  a promising research direction needs further efforts.

 Anyway, this linear transformation technique is capable of estimating/bounding the performance of most of practical non-purging/purging (n,k) fork-join queueing systems, where the replication factor (n) rarely exceeds 10, a result of cost-effective tradeoff. For example, the replication factor of either Dynamo or Cassandra is commonly 3. Under such configurations, a write operation in Dynamo/Cassandra will be forked into 3 copies exactly. For such n≤ 10 cases, we have proposed the fairly good Varma-LT approximations (Theorem <ref>).

From another perspective, the linear transformation technique can be used to check simulators' precision and to find better closed-form approximations for basic fork-join queues.



§ RELATED WORKS



  
Order Statistics
Bertsimas et al. <cit.> gave some tight bounds on the expectation of the k^th order statistic given the first and second moment information on n real-valued rvs. We gave exact linear transformations for k^th order statistic instead of bounds. Shi et al. <cit.> proposed a dynamic programming algorithm to compute the order statistics of a family of correlated rvs whose distributions are not required to be identical. This algorithm relies on the existence of computing methods for the distributions of both minimum and maximum of target rvs. As a contrast, our work is more formal and easier to practice for the reveal of the closed-form linear transformation, and only relies on the existence of computing methods for the maximum's distribution.
  


  
Basic Fork-Join Queues
For n=2 fork-join queues under a Poisson job arrival process: 1) Flatto et al. <cit.> gave the queue length distribution for exponential queues in stable state; 2) Baccelli <cit.> extended Flatto's work to queues with general service time distributions; 3) Nelson et al. <cit.> proposed the exact closed-form solution of the expected sojourn time for exponential queues in stable state.

For n≥ 3 exponential fork-join queues, the most influential approximation work was proposed by Nelson et al. in 1988 <cit.>, which is based on the fact that the sojourn times X_1 k of sub-tasks 1, 2,...,k are associated rvs <cit.>, whose maximum can be bounded by the maximum of their iid equivalents. The lower bound is obtained by neglecting queueing effects. The approximation is a linear mixture of the upper and lower bounds. Parameters of the mixture are learned based on the mean sojourn times of jobs sampled from simulated basic fork-join queues.
Varki et al. <cit.> improved the lower bound by using an staging analysis technique <cit.> based on the memory-less property of the exponential service time distribution, and use the mean value of Nelson's upper bound and the staging lower bound as the approximation. According to experiments in <cit.>, Nelson's approximation is still the most reliable one for exponential queues, compared to following works including <cit.> and <cit.>.

Varma et al. <cit.> extended Nelson's approximation to general service time distributions using a light traffic interpolation technique.
Thomasian et al. <cit.> employed linear regression over the statistics of simulated fork-join jobs to find the parameters of their approximation equation for the expected sojourn time. However any change in service time distributions will require for re-simulations and re-regressions.
Recently, Rizk et al. <cit.> proposed the first computable bounds on waiting and sojourn time of fork-join queues with general service time distributions by using martingales. However the upper bound is looser than Nelson's when it comes to the exponential service time distribution. Fidler et al. <cit.> considered the multi-stage nature of many fork-join queue networks, and proposed their end-to-end delay bounds.

We refer readers to <cit.> for a more comprehensive survey on fork-join queuing systems. To conclude, our work is orthogonal to existing approximation methods for basic fork-join queues.



  
Purging (n,k) Fork-Join Queues

There are some exact quantity analyses <cit.> for purging (n,1) fork-join queues, as it is equivalent to a single queue with n times the service rate. Gardner et al. <cit.> gave comprehensive research on purging (n,1) fork-join queues, with considerations on multi-class jobs, interferences from un-forked jobs and heterogeneous service time distributions. Lee et al. <cit.> take the purging overheads into consideration, since the cancellation of running jobs typically incurs unnegligible delays in practice.

For purging (n,k>1) fork-join queues, there are even no applicable approximations currently. Joshi et al. <cit.> extended the staging analysis to exponential (n,k) fork-join queues to find the lower bounds. Bounds for queues with general service time distributions are given by <cit.> and <cit.>, by resorting the fork-join queue to the split-merge queue model, where all empty sub-queues are blocked until any k sub-tasks of the current job are completed. As depicted in Fig. <ref> (a), the proposed upper bounds tend to be very rough when increasing k or the load factor ρ.




  
Non-Purging (n,k) Fork-Join Queues
A typical use case of non-purging (n,k) fork-join queues is the writing process in Cassandra <cit.>.
Fidler et al. <cit.> gave non-asymptotic statistical bounds on the sojourn time of non-purging (n,k) fork-join queues. As a contrast, we give proper approximations instead of bounds.



§ CONCLUSION AND FUTURE WORK


Despite the popularity of (n,k) fork-join queues, there were no practical existing approximations of their expected sojourn times. Only some rough bounds have been given, which tend to be extremely loose when increasing k or the load factor ρ. This paper gave the first applicable approximation method for non-purging (n,k) fork-join queues and tackled the uncontrollability of the bounds for purging (n,k) fork-join queues:

  
  * A brand-new closed-form linear transformation technique is developed for jointly-identical rvs, which provides a bridge to reduce the sojourn time approximation problem of non-purging (n,k) fork-join queues to that of basic fork-join queues.
  
  * Improvements over upper bounds on the expected sojourn time of purging (n,k) fork-join queues are also gained by resorting the purging queues to their non-purging (λ,μ)-equivalents.


Above innovations are examined by simulation experiments and numerically compared to the stat-of-the-arts. Results show that this linear transformation approach is practiced well for exponential (n,k) fork-join queues with moderate n and relatively large k. However, as currently found W coefficients (coefficients of the linear combination) increase explosively with the increase of n, there is an uncontrollable deviation in new proposed approximations when n is large and k is relatively small. Fortunately, approximations for real-life fork-join systems are unlikely influenced by this problem.

In the future, more efforts should be put into: Scaling down W coefficients, improving the approximations for basic fork-join queues with the help of the linear transformation technique, and evaluating the performance of real-life (n,k) fork-join systems as complement to existing experimental methods <cit.>.

The simulator employed by this work is Forkulator-p: https://github.com/excelwang/forkulator-p, which is modified from Forkulator <cit.> with additional features of simulating purging queues. For each (n,k) pair, the sub-queue's service rate μ is set to 1, simulated jobs are sampled at a rate of 1%, and the mean sojourn times are calculated on 10000 samples.

The solver for currently found W coefficients and some pre-calculated values can be accessed from: https://github.com/excelwang/WCoefficients. We give some frequently used W^n,k_i coefficients bellow.


=2.5pt1.8533405[      W^3,1_1: 3    W^6,3_4: -45      W^8,1_7: 8    W^9,2_6: 420  W^10,2_3: -240;     W^3,1_2: -3     W^6,3_5: 36     W^8,1_8: -1   W^9,2_7: -216   W^10,2_4: 630;      W^3,1_3: 1    W^6,3_6: -10     W^8,2_2: 28     W^9,2_8: 63 W^10,2_5: -1008;      W^3,2_2: 3     W^6,4_4: 15   W^8,2_3: -112     W^9,2_9: -8  W^10,2_6: 1050;     W^3,2_3: -2    W^6,4_5: -24    W^8,2_4: 210     W^9,3_3: 84  W^10,2_7: -720;      W^3,3_3: 1     W^6,4_6: 10   W^8,2_5: -224   W^9,3_4: -378   W^10,2_8: 315;      W^4,1_1: 4      W^6,5_5: 6    W^8,2_6: 140    W^9,3_5: 756   W^10,2_9: -80;     W^4,1_2: -6     W^6,5_6: -5    W^8,2_7: -48   W^9,3_6: -840    W^10,2_10: 9;      W^4,1_3: 4      W^6,6_6: 1      W^8,2_8: 7    W^9,3_7: 540   W^10,3_3: 120;     W^4,1_4: -1      W^7,1_1: 7     W^8,3_3: 56   W^9,3_8: -189  W^10,3_4: -630;      W^4,2_2: 6    W^7,1_2: -21   W^8,3_4: -210     W^9,3_9: 28  W^10,3_5: 1512;     W^4,2_3: -8     W^7,1_3: 35    W^8,3_5: 336    W^9,4_4: 126 W^10,3_6: -2100;      W^4,2_4: 3    W^7,1_4: -35   W^8,3_6: -280   W^9,4_5: -504  W^10,3_7: 1800;      W^4,3_3: 4     W^7,1_5: 21    W^8,3_7: 120    W^9,4_6: 840  W^10,3_8: -945;     W^4,3_4: -3     W^7,1_6: -7    W^8,3_8: -21   W^9,4_7: -720   W^10,3_9: 280;      W^4,4_4: 1      W^7,1_7: 1     W^8,4_8: 35    W^9,4_8: 315  W^10,3_10: -36;      W^5,1_1: 5     W^7,2_2: 21     W^8,4_4: 70    W^9,4_9: -56   W^10,4_4: 210;    W^5,1_2: -10    W^7,2_3: -70   W^8,4_5: -224   W^9,5_8: -315 W^10,4_5: -1008;     W^5,1_3: 10    W^7,2_4: 105    W^8,4_6: 280     W^9,5_9: 70  W^10,4_6: 2100;     W^5,1_4: -5    W^7,2_5: -84   W^8,4_7: -160    W^9,5_5: 126 W^10,4_7: -2400;      W^5,1_5: 1     W^7,2_6: 35    W^8,5_8: -35   W^9,5_6: -420  W^10,4_8: 1575;     W^5,2_2: 10     W^7,2_7: -6     W^8,5_5: 56    W^9,5_7: 540  W^10,4_9: -560;    W^5,2_3: -20     W^7,3_3: 35   W^8,5_6: -140    W^9,6_8: 189   W^10,4_10: 84;     W^5,2_4: 15   W^7,3_4: -105    W^8,5_7: 120    W^9,6_9: -56   W^10,5_5: 252;     W^5,2_5: -4    W^7,3_5: 126     W^8,6_8: 21     W^9,6_6: 84 W^10,5_6: -1050;     W^5,3_3: 10    W^7,3_6: -70     W^8,6_6: 28   W^9,6_7: -216  W^10,5_7: 1800;    W^5,3_4: -15     W^7,3_7: 15    W^8,6_7: -48    W^9,7_8: -63 W^10,5_8: -1575;      W^5,3_5: 6     W^7,4_4: 35     W^8,7_8: -7     W^9,7_9: 28   W^10,5_9: 700;      W^5,4_4: 5    W^7,4_5: -84      W^8,7_7: 8     W^9,7_7: 36 W^10,5_10: -126;     W^5,4_5: -4     W^7,4_6: 70      W^8,8_8: 1      W^9,8_8: 9   W^10,6_8: 945;      W^5,5_5: 1    W^7,4_7: -20      W^9,1_1: 9     W^9,8_9: -8  W^10,6_9: -560;      W^6,1_1: 6     W^7,5_5: 21    W^9,1_2: -36      W^9,9_9: 1  W^10,6_10: 126;    W^6,1_2: -15    W^7,5_6: -35     W^9,1_3: 84    W^10,1_1: 10   W^10,6_6: 210;     W^6,1_3: 20     W^7,5_7: 15   W^9,1_4: -126   W^10,1_2: -45  W^10,6_7: -720;    W^6,1_4: -15      W^7,6_6: 7    W^9,1_5: 126   W^10,1_3: 120  W^10,7_8: -315;      W^6,1_5: 6     W^7,6_7: -6    W^9,1_6: -84  W^10,1_4: -210   W^10,7_9: 280;     W^6,1_6: -1      W^7,7_7: 1     W^9,1_7: 36   W^10,1_5: 252  W^10,7_10: -84;     W^6,2_2: 15      W^8,1_1: 8     W^9,1_8: -9  W^10,1_6: -210   W^10,7_7: 120;    W^6,2_3: -40    W^8,1_2: -28      W^9,1_9: 1   W^10,1_7: 120    W^10,8_8: 45;     W^6,2_4: 45     W^8,1_3: 56     W^9,2_2: 36   W^10,1_8: -45   W^10,8_9: -80;    W^6,2_5: -24    W^8,1_4: -70   W^9,2_3: -168    W^10,1_9: 10   W^10,8_10: 36;      W^6,2_6: 5     W^8,1_5: 56    W^9,2_4: 378   W^10,1_10: -1    W^10,9_9: 10;     W^6,3_3: 20    W^8,1_6: -28   W^9,2_5: -504    W^10,2_2: 45   W^10,9_10: -9;                 ]


IEEEtran

