Cost Function

Using a set of basic benchmark measurements a cost function is derived which defines a fraction of system resources needed to support a particular transaction depending on the transmission & processing rate and type of access (memory file access or disk file access)

- CostXi disk - a value of cost fraction for a transaction processing with disk access to a file encoded at Xi Kb/s. If we define the server capacity as 1, the cost function is computed as CostXi disk = 1/ N Xi Unique , where NXi Unique is the maximum measured server capacity in concurrent transactions under the unique case for a file encoded at Xi Kb/s

- costXimemory - a value of cost function for a transaction with memory access to a file encoded at Xi Kb/s. Let NXisingle - the maximum measured server capacity in concurrent transaction under the Single File. Benchmark for a file encoded at Xi Kb/s. Then the cost function is computed as costXi memory = (NXiunique - 1)/ (NXiunique X (NXisingle - 1))

Let W be the current workload to be processed by the server, where

· Xw = X1, ….Xkw - a set of distinct data streams appearing in W (Xw <= X),

· N memory Xwi a number of data streams having a memory access type for a subset of files at transmitted Xwi kb/s

· N disk Xwi a number of streams having a disk access type for a subset of files at transmitted Xwi kb/s

Then the required size under a given workload can be computed using the formula

Demand = ∑Kw i =1 N Xwi memory X costXwimemory + ∑Kw i =1 N Xwi disk X CostXwi disk

- If the demand is less than 1, then the server operates within the available capacity and the difference 1 - Demand gives the available capacity.

- For capacity planning goals, the knowledge about the number of simultaneous (concurrent) connections and the corresponding peak bandwidth requirements is important.

- The amount of system resources needed to support a particular client request depends on the file encoding bit rate as well the access type of the corresponding request.

- Memory access does not assume or require that the whole file resides in memory; if there is a sequence of accesses to the same file, issued closely to each other on a time scale, then the first access may read a file from disk while the subsequent requests may be accessing the corresponding file prefix from memory.

- The basic idea of computing the request access type is as follows:

o Let Sizemem be the size of memory in bytes. For each request r in the server access log, we have the information about the file requested by r, the duration of r in seconds, the encoding bit rate of the file requested by r, the time t when a stream corresponding to request r is started (use r(t) to reflect it) and the time when a stream initiated by request r is terminated. Let r1(t1), r2(t2),… rk(tk) be a sequence of requests to the server. Given the current time T and request r(T) to media file f, we compute some past time Tmem such that the sum of the bytes stored in memory between Tmem and T is equal to Sizemem. This way, the files’ segments streamed by the server between times Tmem and T will be in memory. In such a way, it can be identified whether request r will stream file f (or some portion of it) from memory.

No comments: