Offline file assignments for online load

Author's personal copy
Information Processing Letters 111 (2011) 178–183

Contents lists available at ScienceDirect

Information Processing Letters
www.elsevier.com/locate/ipl

Offline file assignments for online load balancing
Paul Dütting a , Monika Henzinger b , Ingmar Weber c,∗
a
b
c

Ecole Polytechnique Fédérale de Lausanne (EPFL), Station 14, CH-1015 Lausanne, Switzerland
University of Vienna, Faculty of Computer Science, Universitaetsstrasse 10, A-1090 Wien, Austria
Yahoo! Research Barcelona, Av. Diagonal 177, E-08003 Barcelona, Spain

a r t i c l e

i n f o


a b s t r a c t

Article history:
Received 20 August 2009
Received in revised form 19 July 2010
Accepted 25 November 2010
Available online 30 November 2010
Communicated by Wen-Lian Hsu
Keywords:
Load balancing
On-line algorithms
Information retrieval
File distribution

We study a novel load balancing problem that arises in web search engines. The problem
is a combination of an offline assignment problem, where files need to be (copied and)
assigned to machines, and an online load balancing problem, where requests ask for
specific files and need to be assigned to a corresponding machine, whose load is increased
by this.

We present simple deterministic algorithms for this problem and exhibit an interesting
trade-off between the available space to make file copies and the obtainable makespan.
We also give non-trivial lower bounds for a large class of deterministic algorithms and
present a randomized algorithm that beats these bounds with high probability.
 2010 Elsevier B.V. All rights reserved.

1. Introduction
In the online load balancing with restricted assignment
problem a set of m machines has to execute a sequence of
requests, arriving one by one. Every request has a load and
must be placed on exactly one of a subset of machines.
The assignment of a request to a machine increases the
load on this machine by the load of the request. The goal is
to minimize the makespan, i.e., the maximum load placed
on any machine. When neither the load of each request
nor the set of machines a request can be assigned to are
under the control of the algorithm, then no online load
balancing algorithm can achieve a competitive ratio better
than ⌈log2 m⌉, see [1].
In this paper we study the following variant of this

problem which consists of two phases. In the offline phase,
n files need to be assigned to m identical machines with
the possibility, given space, to copy some or all of the files.
In the online phase, a sequence of requests arrives. Each request t asks for one file f j and has to be placed on one
of the machines mi to which (a copy of) this file was as-

*

Corresponding author.
E-mail address: ingmar@yahoo-inc.com (I. Weber).

0020-0190/$ – see front matter
doi:10.1016/j.ipl.2010.11.022

 2010

Elsevier B.V. All rights reserved.

signed. That machine’s load MLi is then increased by l(t ).
FL j denotes the sum of the loads of all the requests for

file f j . The goal is still to minimize the makespan, i.e., the
maximum machine load ML∗ = maxi MLi .
In this model the position of the algorithm is strengthened: by placing the files “intelligently” it can influence
the set of machines a request can be assigned to. However,
it still does not control the load of each request nor the
file the request asks for. Also note that the makespan will
generally depend on the number of file copies made by the
algorithm. In our model, each machine has s “slots” which
can be used to store (copies of) files. We require s > ⌈n/m⌉
because if s < ⌈n/m⌉ it is impossible to store all of the n
files on the m machines.
We call an algorithm for both the offline and the online phase a dual-phase algorithm. To analyze the quality
of a dual-phase algorithm there are two sensible points of
reference. First, one could compare ML∗ to the makespan
OPTs of the optimal offline1 algorithm for the same parameter s. Such an analysis emphasizes the optimality gap
while caring less about how good the optimal solution

1
By an “offline” algorithm we mean an algorithm which is given the
sequence of requests t before assigning files to machines.


Author's personal copy
P. Dütting et al. / Information Processing Letters 111 (2011) 178–183

actually is. Second, onePcould compare
P ML∗ to the average makespan AVG := t l(t )/m =
j FL j /m which corresponds to a perfect load balance. In this approach the
emphasis is less on the optimality gap, as even the optimal offline algorithm might not be able to achieve AVG.
To see this, consider the following two examples for the
case s = ⌈n/m⌉: (1) For n = 2 and m = 3 OPT⌈n/m⌉ can only
copy one of the two files and cannot achieve a makespan
of less than L := min j FL j , compared to AVG = 2L /3 for
equal file loads. (2) For n = 5 and m = 3 OPT⌈n/m⌉ can
again only copy one of the files and one machine has only
unshared2 files leading to a makespan of at least 2L, compared to AVG = 5L /3 for equal file loads.
Of course, for any s we always have OPTs > AVG and
so competitive ratios with respect to AVG lead to competitive ratios with respect to OPTs . However, as far as
lower bounds are concerned we still keep AVG as a reference point as we ultimately care more about the quality
of the solution (= “How far from perfect load balance is
it?”) than about the quality of the algorithm (= “How far

from the optimal solution for the given s is it?”).
Even with the sequence of requests given in advance it
is tricky to find an optimal assignment as (i) the loads for
the different files can differ widely, leading to a “packing”
problem to level out these differences, and (ii) individual
requests can be large, making it difficult to spread one
file’s load across several machines. To factor out these two
difficulties, we introduce the following parameters:

• We define α to be the smallest value such that ∀ j , k :
FL j 6 (1 + α )FLk , or equivalently, such that ∀ j : L 6
FL j 6 (1 + α ) L where L := min j FL j .
• We define β := maxt l(t ) to be the maximum request
load.
As a consequence we state the bounds on the makespan
in terms of n, m, α , and β . To summarize, the differences between our new model and the previous models
are: (1) The online phase is preceded by an offline phase,
where a file assignment is computed. This assignment determines where requests can be placed in the online phase.
(2) The loads are parametrized. Individual requests have
load at most β and the load of all requests for two distinct

files differs by a factor of at most 1 + α .
The structure of the remaining paper is as follows. Section 1.1 discusses an application of the studied problem
and Section 1.2 briefly discusses results concerning “classical” load balancing. In Section 2, we present some observations related to the inherent difficulty of the problem. The
following three sections, Sections 3–5, discuss algorithms
for different values of s, going from the minimal s = ⌈n/m⌉
to a tunable value. Finally, in Section 6 we present two
lower bounds for deterministic dual-phase algorithms.
1.1. Application to web search engines
One application for our problem arises in web search
engines. Every web search engine builds a data structure,

2

A file f j is called unshared if it only resides on a single machine mi .

179

called (inverted) index [2,3]. In current web search engines the size of this data structure is in the order of
hundreds of TeraBytes. The index is broken into a large
number n of equally-sized files f j which are distributed

over multiple machines. This split is usually done using a document-based partitioning where each file contains the information for a subset of documents [3].
With this partitioning, each query has to access all the
files. Thus one query is broken into n requests, each request having to access one specific file. The time it takes
to answer the request for a given file depends on the
query terms in the request, but also on the file itself
as some files might contain many matching documents.
However, search engines usually time-out requests that
cannot be answered in a fixed time limit, e.g. a second. Thus, the maximum load β of an individual request
for file f j is much smaller than the total file load FL j
of f j . In addition, when a search engine splits the index into files it tries to build the files in a way so that
over a long enough sequence of requests the different file
loads differ only by a small constant factor 1 + α with
α < 1.
We also computed α experimentally using the 05/2007
crawl of the Stanford WebBase project with about 20 million pages. From this crawl we constructed an index for
Lucene3 of about 500 GB and divided it into 20, 40 and
80 equally-sized indices according to a random documentbased partitioning as described above. Afterwards, we ran
two query logs, one from AllTheWeb and one from AltaVista, with 0.5 million queries against each of the indices
using a Quad-Core AMD Semptron 280 with 2.4 GHz and
8 GB RAM. In average it took about 1230 s, 689 s, and

419 s to run all queries of one query log against a single index. This time varied by at most a factor of 1.08,
1.12, and 1.15 between two distinct indices and individual
queries took at most 12 s, 7 s, and 5 s. Thus, α was about
0.08, 0.12, and 0.15 while β was about 1% of the average
file load.
1.2. Related work
There is a large body of work on online load balancing. See [4–6] for excellent surveys. For space reasons we
mention here only the results that are directly related to
our problem. If the assignment of each request is unrestricted, i.e., each request can be assigned to every machine, then there exist constant upper and lower bounds.
The earliest result is due to Graham [7,8] who showed
that the Greedy algorithm (which always places the request on the least loaded machine) has a competitive ra1
. The best algorithm known today is
tio of exactly 2 − m
1.92-competitive [9]. The lower bound currently stands at
1.88 [10]. If the assignment of each request is restricted
to a subset of the machines, then the Greedy algorithm
achieves a competitive ratio of ⌈log2 m⌉ + 1 and no online load balancing algorithm can be better than ⌈log2 m⌉competitive [1].

3


http://lucene.apache.org/.

Author's personal copy
P. Dütting et al. / Information Processing Letters 111 (2011) 178–183

180

2. Preliminaries
Generally, the reason that an online load balancing algorithm cannot achieve AVG is two-fold. The first reason
is an “integrality gap” which rules out the possibility of
leveling out the discrete loads across a small set of slots.
This problem also exists for OPTs (see previous examples).
However, assuming that β is small enough, this integrality
gap disappears already for OPT⌈n/m⌉ (see the offline result of Theorem 2) and it always vanishes asymptotically
as n and m (and n/m) become large as then β/AVG → 0.
The second reason is a “knowledge gap” which summarizes
the fact that an online algorithm will not know in advance
which files are big (load equal to (1 + α ) L) and which are
small (load equal to L). Therefore it could end up with all
big file loads on one machine and that all of these files

are unshared. This problem can be avoided by OPTs which
knows the whole input sequence before distributing the
files. This problem also vanishes for a randomized algorithm with an oblivious adversary, see Theorem 1. As far
as upper bounds are concerned, we make the following observation.
Observation. Any reasonable two-phase load balancing algorithm achieves

»

n

¼

n

· (1 + α )/ · AVG
m

µ
m
· (1 + α ) · AVG.
6 1+

ML∗ 6

m

n

n
Even with the minimal space per machine of s = ⌈ m

and without making any copies at all we obtain the bound
above which corresponds to the case where all files on one
machine have the maximal load (1 + α ) L. This observation
shows that upper bounds on the makespan of an algorithm
are essentially only interesting if (ii) they are of the form
(1 + o(1)α ) · AVG when n and m get large or if (ii) they are
of the form (1 + α ) · AVG + O (1) without requiring n and
m to be large. Our result in Theorem 1 is of the first form,
whereas Theorems 2 and 3 give results of the second form.

the files in a round-robin manner to the machines. Requests are assigned to the unique machine storing the corresponding file.
Theorem 1. Let k ∈ N+ be such that n/k = m and k >
m2 ln(m). Then “Randomized” uses exactly s = n/m = k slots
per machines and assigns requests to machines such that with
1
probability at least 1 − m

µ

1

ML∗ 6 1 +

m



α · AVG.

The proof of Theorem 1 makes use of the following
lemma [11].
Lemma 1 (Hoeffding’s inequality). Let X 1 , . . . , X k be independentP
random variables such that X i ∈ [ai , b i ] for 1 6 i 6 k. Let
S = i X i . Then, for any positive value t,

¡

µ

¢

Pr S − E [ S ] > kt 6 exp − P

2k2 t 2

i (b i

− ai )2



.

Proof of Theorem 1. Instead of placing k = n/m randomly
chosen files on each machine, we could conceptually first
split the files randomly into k groups of size m and then
randomly place one file of each group on each machine.
Let X i , j be the random variable that represents the file
load of the j-th file (not necessarily f j ) that is placed on
machine mi . For a given machine mi the X i , j have different distributions for different values of j, depending on
the random split into k groups of size m. However, once
the distributions have been fixed (by the random split)
X i ,1 , . . . , X i ,k are independent. Note that X i , j ∈ [ L , (1 + α ) L ]
P
1
for all i and j. Let S i =
j X i , j . We choose t = α n E [ S i ],
1
E [ S i ], and apply Lemma 1 to get
i.e., kt = α m

µ

Pr S i − E [ S i ] > α

1
m

µ



E [ S i ] 6 exp −

2k2 (α n1 E [ S i ])2
k(α L )2




µ
2k 12 E 2 [ S i ]
6 exp − n 2
.
L

2

3. Minimal space: s = ⌈n/m⌉

Since E [ S i ] > kL and k > m ln(m) we get Pr( S i − E [ S i ] >

α m1 E [ S i ]) 6 exp(−2k3 n12 ) = exp(−2k m12 ) 6 m12 . Now let
1
E i be the event that S i − E [ S i ] > α m
E [ S i ] and let E =

To store all n files on the m machines a minimum
space of s = ⌈n/m⌉ per machine is required. When m does
not divide n then there are still m · ⌈n/m⌉ − n spare slots
which could be used to store copies of the files. If n > m
then at least 2n − m · ⌈n/m⌉ files are unshared and when
m⌊n/m⌋ − n < m/2, i.e., there are less than m/2 free slots,
then there will always be one machine without any shared
files. If all files on this machine have a load of (1 + α ) L
while all other files have L, then no deterministic algorithm can be substantially better than (1 + α )AVG, see
Theorem 4. However, with an oblivious adversary and a
randomized algorithm the case of minimal space can still
be solved asymptotically optimally by the following algorithm called “Randomized”.

If m does not divide n then we can introduce up to
m − 1 dummy files with a load of L. This artificially increases AVG to AVG′ 6 AVG + L 6 AVG · (1 + m/n) and one
obtains the following corollary.

Randomized. Randomized sorts the n files randomly s.t.
each permutation has equal probability. It then distributes

Corollary 1. Let k ∈ N+ be such that ⌈n/k⌉ = m and k >
m2 ln(m). Then “Randomized” uses at most s = ⌈n/m⌉ slots per

S

i

S

E i . We get Pr( E ) = Pr(

Si − E[Si] 6 α

at least 1 −
1
m

1
E[Si ]
m

1
.
m

i

Ei) 6

P

i

Pr( E i ) 6

1
.
m

Hence

for all machines mi with probability

In that case ML∗ = maxi MLi = maxi S i 6

1
1
maxi (1 − α ) E [ S i ]. Since OPT > m
i Si = m
i E [ S i ] and
E [ S i ] = E [ S j ] for all i and j, we have that OPT > E [ S i ]
1
for all i. It follows that with probability at least 1 − m

ML∗ 6 (1 −

P

1
m

P

α )OPT. ✷

Author's personal copy
P. Dütting et al. / Information Processing Letters 111 (2011) 178–183

machines and assigns requests to machines such that with prob1
ability at least 1 − m

µ

ML∗ 6 1 +

1
m

¶ µ

α · 1+

1
m ln(m)



· AVG.

4. Slightly more space: s = ⌈n/m⌉ + 1
Even with only one additional slot per machine the
problem already becomes easier and the following “Fractional” algorithm can be applied.
Fractional. Fractional associates with each file f j a projected load PFL j and tries to balance this projected load
across all machines. When used as an offline algorithm it
sets the projected load PFL j of each file f j to FL j . When
used as an online algorithm it simply sets PFL j = 1 for all
files f j . Afterwards it assigns the files and their projected
load to the machines such that (1) no machine is assigned
more than ⌈n/m⌉ + 1 files, (2) the projected load of every file is assigned completely, and (3) every machine is
P
assigned the same amount of projected load
j PFL j /m.
If we use fri ( j ) ∈ [0, 1] to denote the fraction of f j ’s projected load PFL j that is assigned to mi , then this can be
P
formalized as follows: (i)
i fri ( j ) = 1 for all files f j and
P
P
1
(ii)
fr
(
j
)
·
PFL
=
PFL
j
j for all machines mi . In the
j i
j
m
online phase, Fractional assigns the requests in a way such
that the total load MLi ( j ) placed on mi by requests for f j
is roughly equal to fri ( j ) · FL j .
Details of the offline phase: Assign the files in ascending order of FL j in a round-robin manner to the machines.
n
At the end, some machines will have ⌈ m
⌉ files and some
n
will have ⌊ m
⌋ files. Compute the projected load for each
file where, initially, the projected load of a machine equals
the total load of its assigned files. Split the machines into
three groups. First, machines whose assigned projected
load equals AVG. Call these machines closed. Second, machines whose assigned projected load surpassed AVG. Call
these machines overloaded. And third, machines whose assigned projected load is smaller than AVG. Call these machines underloaded. While there are any overloaded machines pick an arbitrary one mi . Copy its largest file, i.e.
the file that was assigned to it last, to an underloaded machine mi ′ . Here, pick an underloaded machine mi ′ which
was previously overloaded itself, if one exists, or otherwise pick an arbitrary one. Then assign just enough of mi ’s
largest file load to mi ′ such that mi ′ reaches AVG and becomes closed.
Details of the online phase: Fractional keeps track of the
load FLtj−1 of f j generated during the first t − 1 requests
and the part MLti −1 ( j ) of FLtj−1 that is placed on mi . The
t-th request for f j is assigned to a machine mi storing f j
s.t. (i) l(t ) 6 fri ( j ) − MLti −1 ( j ) if such a machine exists, else

(ii) fri ( j ) > MLti −1 ( j ) and mi stores no other shared files,

or else (iii) fri ( j ) − FLtj−1 is largest.

181

n
Theorem 2. “Fractional” uses s = ⌈ m
⌉ + 1 slots per machine
and assigns requests to machines such that

(1) ML∗ 6 AVG + β
(2) ML∗ 6 (1 + α ) · AVG + β

in offline mode, and
in online mode.

Proof. We will prove the result for the offline mode where
PFL j = FL j . The result for the online mode then follows
easily by considering the worst case where all files on one
machine have a load of (1 + α ) · L and all other files have
a load of L.
Without loss of generality let us assume that files are
already sorted by their load, i.e., FL1 6 FL2 6 · · · 6 FLn . Let
FL v , w be the (complete) load of the w-th file placed on
machine m v . From the round-robin assignment we know
that FL v , w = FL( w −1)m+ v . Let ni be the number of files assigned to machine mi in the first part of the offline phase,
before files are copied. We know that |ni − ni ′ | 6 1 and that
i < i ′ ⇒ ni > ni ′ .
Claim 1. At any time during the offline phase any overloaded
machine mi can “close” any underloaded machine mi ′ .
By “close” we mean that the remaining assigned load
fri ( j ) of mi ’s biggest/last file f j is bigger than AVG −

Pni′


w =1 FLi , w . This claim then implies that any machine has
at most two shared files as an initially overloaded machine
can only become underloaded once. Claim 1 follows from
the following claim.

Claim 2. At any time during the offline phase the socket c i ′ of
any underloaded machine mi ′ is no lower than the socket c i of
any overloaded machine mi .
Here the “socket” of an underloaded
machine equals its
P
total assigned file load c i ′ =
j fri ′ ( j ) · FL j and the socket

Pn −1

i
of an overloaded machine is defined as c i =
w =1 FLi , w .
This claim then proves Claim 1 as whenever the load of
the last file on mi was big enough to extend from c i past
AVG, then this load will certainly suffice to extend from c i ′
to AVG to close this machine.

Proof of Claim 2. We will first show that the claim
holds initially before any overloaded machine becomes
underloaded.
Until this happens we always have c i ′ =
Pni′
′ , w for all underloaded machines m i ′ and the
FL
i
w =1
relevant fri ′ ( j ) are all 0 or 1. If ni = ni ′ and
i is overPnm

loaded, then we must have i ′ < i and c i ′ = wi =1 FLi ′ , w >

Pni′

Pn ′ −1
> wi =1 FLi , w = c i , using FLi ′ , w +1 > FLi , w .
Pni′

If ni = ni ′ + 1, then we have c i ′ =
w =1 FLi , w >
Pni−1
′ (or oth′
FL
FL
as
i
<
i
=
c
,
using
FL
>
i, w
i, w
i
i ,w
w =1
erwise ni 6 ni ′ ). Now when an overloaded machine mi

w =2 FLi , w

becomes underloaded itself the computation of c i changes
P
Pni −1
and we have c i =
j fri ( j ) · FL j >
w =1 FLi , w . In fact,
if mi is initially overloaded and mi ′ is underloaded we
Pni −1
Pni′


know that
w =1 FLi , w 6
w =1 FLi , w = c i . But as mi has
enough additional load x remaining on top of this s.t.
Pni −1
Pni −1
x+
w =1 FLi , w > AVG we obtain c i =
w =1 FLi , w + x −

Author's personal copy
182

P. Dütting et al. / Information Processing Letters 111 (2011) 178–183

(AVG − c i ′ ) > c i ′ . Here x − (AVG − c i ′ ) is exactly the additional remaining load of the top file on mi after mi ′ is
closed. Thus the claim follows for mi since it held for mi ′
before the update. ✷
Claim 3. Any shared file is stored on at most two machines storing another shared file.
Proof of Claim 3. Observe that each time an underloaded
machine gets closed it gets closed in one chunk. As we
preferentially close underloaded machines which were previously overloaded, at any time there is at most one underloaded machine which was previously overloaded. This
ensures that any shared file is stored on at most two machines storing other shared files. One of these two machines can be the machine which, after the round–robin
assignment, stores the single copy of the file and the second machine can be the machine that the initially overloaded machine closes first. ✷
Claim 4.
(1) If machine mi only stores a single shared file f j then for all
t MLti ( j ) 6 fri ( j ) + β .
(2) If machine mi stores f j as well as another shared file f j ′
then for all t MLti ( j ) 6 fri ( j ) + β/2.
(3) For unshared files we have for all t MLti ( j ) 6 fri ( j ), where
equality holds at the end of the online phase.
Proof of Claim 4. During the online phase, we first assign
a request to a machine where it still fits. When we go
above the projected file load we first pick machines without any other shared files. Here, in case (1) above, we can
exceed the projected file load up to a factor β . If we exceed the projected file load for a machine which has two
shared files then we only do this as a “last resort”, i.e.
all other machines storing no other shared files are already full and the only remaining “holes” are, according to
Claim 3, on the two machines with other shared files. Note
that all holes combined are always big enough to accommodate the remaining file load which is still to come and
so the bigger of the two holes will always be big enough
to accommodate l(t )/2. This ensures that in case (2) above
whenever there is a request t with load l(t ) for file f j ,
there is a machine mi s.t. MLti ( j ) + l(t )/2 6 fri ( j ). ✷
5. Variable space: ⌈n/m⌉ 6 s 6 n
If the amount of space s per machine is not limited
then by copying all files onto all machines one can obtain AVG + β by assigning each request to the least loaded
machine. More generally, the following algorithm called
“Cluster” makes a certain space-performance tradeoff possible, see Theorem 3.
Cluster. In addition to the regular input, Cluster is given
q ∈ N+ such that q|m and q|n. In the offline phase, Cluster divides the set of files and the set of machines into
q equally-sized clusters F1 , . . . , Fq and M1 , . . . , Mq . Afterwards, it assigns each of the n/q files in Fl to each of the

m/q machines in Ml . In the online phase, it assigns each
request to the least-loaded permissible machine.
Theorem 3. If there exists q ∈ N+ such that q|n and q|m, then
the deterministic dual-phase algorithm “Cluster” uses exactly
s = n/q slots per machines and assigns requests to machines
such that

·

µ

ML∗ 6 1 + 1 −

1+α
q+α

¶ ¸

α · AVG + β.

Note that within each cluster c the assignment is unrestricted and so AVGc + β can be achieved by a greedy
approach. Here AVGc denotes the average load of machines
in the cluster. The worst case corresponds to the setting
where one cluster has only files of size (1 + α ) L whereas
all other clusters have files of size L. An analysis of this
case gives the bound above.
If we assume that the desired q is constant then asymptotically as n → ∞, m → ∞ and n/m → ∞ the condition that q divides both m and n can be dropped in a
similar fashion to Corollary 1. Concretely, we can (i) use
dummy files with load L to increase the number of files
by at most q to ensure q|n and (ii) choose not to use at
most q machines to ensure that q|m. This then leads to a
qmAVG/n
6 mAVG+
6
m−q
1+q/n
m+n
( 1−q/m ) · AVG = (1 + q mn−nq ) · AVG = (1 + o(1)) · AVG.

new average satisfying AVG′ 6

mAVG+qL
m−q

Corollary 2. Given any constant q ∈ N+ , “Cluster” uses s =
⌈n/q⌉ slots per machine and, for large n and m, has a makespan
of

·

µ

ML∗ 6 1 + 1 −

1+α
q+α

¶ ¸

¡

¢

α · 1 + o(1) · AVG + β.

6. Lower bounds
Next we give lower bounds for any deterministic dualphase algorithm. Theorem 3 (with q = 1) showed that
without any unshared files we can obtain ML∗ 6 AVG + β
and so the bounds depend on the number of unshared
files.
Theorem 4. Let A be a deterministic dual-phase algorithm that
produces a file assignment where at least one machine stores
⌈ mn ⌉ unshared files. Then, for all n and m there exists a sequence
of requests such that

·

µ

ML∗ > 1 + 1 −

1+α
m+α

¶ ¸

α · AVG.

The proof follows in a straightforward way from an
n
analysis of the case where the ⌈ m
⌉ unshared files on one
machine have a file load of (1 + α ) L, whereas all the
n
other files have L. In this case ML∗ = ⌈ m
⌉ · (1 + α ) · L and
α ) · L. Dividing these two expressions and
n
+ ⌈ mn ⌉ m
AVG = ( m
n
using the bounds m
6 ⌈ mn ⌉ 6 mn + 1 and nnm
+m 6 m leads
to the stated result. For settings where there are even
more unshared files, we can get lower bounds of the form
(1 + Ω( mn )) · AVG for the typical case of α < n.

Author's personal copy
P. Dütting et al. / Information Processing Letters 111 (2011) 178–183

183

Theorem 5. Let A be a deterministic dual-phase algorithm that
has at least ǫ n unshared files, where 0 < ǫ 6 1. For all n > m >
3 and α > 0 there exists a sequence of requests such that

α (m − 2)/(2n + 2α ), which is at least 1 + α /(12k) for m > 3
and α < n.

· AVG
(1) ML∗ > m
2
and
(2) ML∗ > min(1 +

Case 2.2.2. Every machine with an unshared file has at this
point a total load of at most kL − α L /2. In this case the adversary sends no further requests. Thus, AVG = kL. Let S be
the set of machines with at least one unshared file. Then
the total load on the machines in S is at most | S |(kL −
α L /2). Thus on the remaining m − | S | machines there is a
load of at least nL − | S |(kL − α L /2) = (m − | S |)kL + | S |α L /2.
Thus there exists a machine m∗ not in S with load at
least kL + | S |α L /(2(m − | S |)). Since | S | > ǫ n/(⌈k⌉ − 1)
and | S |/(m − | S |) increases monotonically in | S |, it follows
that m∗ has a load of at least kL + ǫα L /(2(1 − ǫ )). Thus,
ǫ 1. ✷
ML∗ /AVG > 1 + α 1−
ǫ 2k

if α > n,
m
12n

m
α , 1 + 1−ǫ ǫ 2n
α ) · AVG if α < n.

Proof. In this proof let k = n/m > 1, which does not need
to be an integer.
Case 1. α > n. Since A uses less than 2n slots there exists
an unshared file. The adversary gives a file load of (1 + α ) L
to this file and L to every other file. Then ML∗ > (1 + α ) L
and AVG = kL + α L /m. Thus, ML∗ /AVG > (1 + α )/(k + α /m),
which is at least m/2 for α > n.

References
Case 2. α < n. We consider two cases depending on the file
assignment.
Case 2.1. There exists a machine with ⌈k⌉ unshared files.
1+α
By Theorem 4, ML∗ > [1 + (1 − m
+α )α ] · AVG, which is at
least 1 + α /(4k) for α < n and m > 3.
Case 2.2. There does not exist a machine with ⌈k⌉ unshared
files. It follows that every machine has at most ⌈k⌉ − 1
many unshared files.4 Thus, at least ǫ n/(⌈k⌉ − 1) machines
have at least one unshared file. The adversary first sends a
sequence of requests that gives equal load of L to all files.
Depending on the machine loads after these requests the
adversary proceeds as follows.
Case 2.2.1. There exists a machine m∗ with an unshared
file f ∗ and total load of at least kL − α L /2. In this case
the adversary sends another sequence of requests, each
requesting f ∗ and having a total load of α L. As a consequence m∗ has final load at least kL + α L /2 and AVG =
kL + α L /m. Thus ML∗ /AVG > (k + α /2)/(k + α /m) = 1 +

4
When ⌈k⌉ = 1, then n = m and Case 2.1 arises. Thus we can assume
that ⌈k⌉ > 2.

[1] Y. Azar, J. Naor, R. Rom, The competiveness of online assignments,
in: Proc. 3rd ACM–SIAM Symposium on Discrete Algorithms, 1992,
pp. 203–210.
[2] L.A. Barroso, J. Dean, U. Hoelzle, Web search for a planet: the Google
cluster architecture, IEEE Micro 23 (2003) 22–28.
[3] J. Zobel, A. Moffat, Inverted files for text search engines, ACM Comput. Surv. 38 (2) (2006) 6.
[4] Y. Azar, On-line load balancing, in: A. Fiat, G.J. Woeginger (Eds.), Online Algorithms: The State of the Art, in: Lecture Notes in Computer
Science, vol. 1442, Springer-Verlag, Berlin, 1998, pp. 178–195.
[5] S. Albers, Online algorithms: a survey, Mathematical Programming 97
(2003) 3–26.
[6] A. Borodin, R. El-Yaniv, Online Computation and Competitive Analysis, Cambridge University Press, Cambridge, 2005.
[7] R. Graham, Bounds for certain multiprocessing anomalies, Bell System Technical Journal 45 (1966) 1563–1581.
[8] R. Graham, Bounds on multiprocessing timing anomalies, SIAM Journal of Applied Mathematics 17 (1969) 263–269.
[9] R. Fleischer, M. Wahl, Online scheduling revisited, Journal of Scheduling 3 (2000) 343–353.
[10] J.F. Rudin III, R. Chandrasekaran, Improved bounds for the online
scheduling problem, SIAM Journal on Computing 32 (2003) 717–735.
[11] W. Hoeffding, Probability inequalities for sums of bounded random
variables, Journal of the American Statistical Association (1963) 13–
30.