• No se han encontrado resultados

In this section we present an analysis of the proactive caching algorithm based on neighbor graphs. We present two useful properties of the caching algorithm: (i) Firstly, we show that the cache sizes have a upper bound, i.e., with sufficient memory there exists a reasonable cache size which would result in a 100% cache hit,i.e., fast re-association with probability one, (ii) Secondly, we show that the scheme benefits users that are affected by the latency the most, i.e., users that perform higher number of handoffs on average have a higher probability of a cache hit.

Upper bound on the cache size

Assuming there is an upper bound on the number of users associated to any AP, there is an upper bound on the cache size, i.e., the cache would not grow beyond a particular limit. Hence, providing each AP with sufficient memory would guarantee a 100% cache hit ratio. Let G = (V, E) be a neighbor graph. Let Clientlist(api) denote the set of clients

is propagated to N eighbors(apj) and removed from N eighbors(api). Hence : Context(c) ∈ Cache(api) =⇒ c ∈ [ apk∈N eighbor(api) Clientlist(apk) (4.1)

From Equation 4.1 it follows that :| Cache(api) |≤ Napi ∗ M where

Napi =| N eighbor(api) |= degree(api) and M = maximum number of

clients associated to any AP. Summing up Equation 4.1 for all vertices, we get the total memory used by caches over all APs :

X api∈V | Cache(api) |≤ M ∗ X api∈V Napi = M ∗ 2∗ | E | (4.2)

Since M is bounded for any AP, the above equation gives an upper bound on the memory requirement at an AP.

Characterizing the Cache Misses

As discussed earlier, the caching algorithm is based on the locality of mobility principle. Since re-association relationships are captured in the neighbor graphs and client-context is forwarded to all neighbor APs, technically we would expect a 100% cache hit ratio for the re- associations. This assumes that the neighbor graph has been learned and the cache size is unlimited (i.e. the cache at each AP is large enough according to Equation 4.1).

The above assumption takes us to the two kinds of cache misses possible during a re-association:

1. Re-association between non-neighbor APs: When a re-association occurs between two APs that are not neighbors, the station- context does not get forwarded and results in a cache miss. The edge subsequently is added to the graph through the learning process. Thus when a wireless network is first brought up (or re- booted), the initial re-associations in the network would be cache misses.

2. Context evicted by LRU replacement: This happens when the client-context is evicted at the new-AP because of other clients re-associating to neighboring APs.

As discussed in the previous section, the first type of cache miss would occur only once per edge and has a nominal effect towards the performance in the long run. The second type of cache miss depends on mobility of other users, and hence dictates the performance of the algorithm. Presented below is a simplified analysis which calculates the probability distribution of the cache lifetimes of a client’s context.

Let the cache size at a particular AP AP1 be n. Lets divide the

time into discrete intervals and assume for simplicity that handoffs are synchronized with these time steps. Lets assume that we are interested

AP1 LEVEL ZERO LEVEL ONE LEVEL TWO AP2 AP3 AP4 AP9 AP8 AP7 AP6 AP5 Cache with n entries

Figure 4.6: Figure shows an AP AP1 and its immediate (Level 1) and

one-hop (Level 2) neighbors with respect to incoming edges.

in the context of a client c which was inserted into the cache of AP1

at timestep t = 0. This is possible only if the client (re-)associated with one of the APs that is one hop away from a neighbor of AP1, as

illustrated in Figure 4.6. For ease of illustration, lets call AP1 as Level

0, neighbors of AP1 as Level 1, and the subsequent neighbors as Level

2 as shown in Figure 4.6.

Lets assume that any client can perform a handoff with a fixed probability p during any time step. Let M be the number of clients associated to APs at Level 2. Note that implicitly M ≥ n, else there would be no cache misses at all. These are the potential clients that can handoff to an AP at Level 1, thus having their context inserted into the cache at AP1. For simplicity of analysis, we assume that the expected

number of clients associated to any set of APs remains constant, i.e., the clients move uniformly at random among APs with constant probability p.

Let ζ(t) denote the probability distribution of cache lifetimes in discrete timesteps, i.e., the amount of time that a client’s context spent in the cache. Say, T timesteps have passed. In timestep i, say xi clients

(i ∈ {0 . . . T }) moved to an AP at level 1 thus causing xi insertions

into AP1’s cache. Note that the client c’s context will get evicted once

n cache insertions have been performed on AP1. The probability that

out of the M clients associated to APs at Level 2, xi of them performed

a handoff given that each client performs a handoff independently with probability p, is given by Mx

ip

xi(1 − p)(M −xi) = ξ(x

i) (say).

Given one particular set of hx1, x2, . . . , xTi such that

P

i=1...Txi =

n and xi ≥ 0 ∀i ∈ {1 . . . (T − 1)} and xT ≥ 1, the probability of that

event happening is given by Πi=1...Tξ(xi), which simplifies to:

M ! x1!x2! . . . xT!

pnp(M −n) (4.3)

Thus, the probability that the context gets evicted exactly in T timesteps is given by F (T, n) = X x1,x2,...,xT M ! x1!x2! . . . xT! pnp(M −n) (4.4)

whereP

x1,x2,...,xT indicates that the sum is carried over all values

of xi, i = {1 . . . T } such that xi ≥ 0 and

P

i=1...Txi = (T − 1).

Equation 4.4 can be written as a recurrence relation in the fol- lowing manner : F (T, n) = X i=0...n F (T − 1, n − i) i!  p 1 − p i

Documento similar