You are here:

# Advanced Math/Modeling concurrent internet users

Question
I'm feeling generous in the new year and want to open my Wifi connection to the public. I want to estimate the effect that N additional users on my router would have on download times. In other words, how does my waiting time for an average piece of data degrade as the number of users increases?

To keep things simple I've formalized the problem in the following way:

N: the number of users.
B: the bandwidth I have (e.g. 1024 KB/s).
D(x): the distribution of file sizes (for simplicity sake, I'm going to assume that each piece of data is a file x KB large).
I(y): the distribution of interval between requests in seconds
WT: denote the waiting time in seconds for a file.

Now I know that in the real-world a user makes parallel requests, but for this particular version of the problem a single user will only issue requests in sequence.

My question is: what is E[WT]?

For example, if N=1,E[WT] is simply E[D(x)]/b.

But for N=2, I get all confused because the users could have overlapping requests that could affect each others waiting time, and subsequently, I(y).

How do I model this problem? What branch of mathematics is suitable for it?

This problem is actually trickier (and more interesting) than it appears at first blush. The branch of mathematics that deals with it is called Queueing Theory. What makes this type of problem interesting is the notion of an arrival rate, Ar, for the requests, where 1/Ar = mean time between requests. Another parameter of interest can be called the sevice rate, Sr, for which Ts = 1/Sr = time to service a request.

In your case, Sr = constant and is proportional to E[D(x)]/B and, as you concluded for the case of N = 1 user, can be considered as equal to the waiting time since the user needs to wait (no more than) this time to submit another request to be processed.

When increasing the number of users, it is apparently important, as you suggest, to take into account overlapping requests during the time Ts. Clearly, if the requests never come quicker that Ts, then there is no waiting. Also, Sr > Ar or the system will grow unboundedly.

Queueing theory takes random arrival times into account by utilizing a deceptively simple but surprisingly powerful result called Little's Thm where

N = Ar･Ttot

average number of users in system = Ar･average time in the system ( = waiting time + service time Ts).

Applying this Thm and using mean values as above, the waiting time for this problem is

E(WT) = (Ar/Sr)･(1/Sr)･(1/(1-Ar/Sr).

This is the result for a so-called M/D/1 queueing model where M stands for Markov = exponential distribution of arrival times, D = deterministic and 1 = number of servers. It gets more complicated as you add capability to the modeled system.

Note that you need to calculate Ar for the number of users you are considering.

Hope this helps.

Randy

Volunteer

#### randy patton

##### Expertise

college mathematics, applied math, advanced calculus, complex analysis, linear and abstract algebra, probability theory, signal processing, undergraduate physics, physical oceanography

##### Experience

26 years as a professional scientist conducting academic quality research on mostly classified projects involving math/physics modeling and simulation, data analysis and signal processing, instrument development; often ocean related

Publications
J. Physical Oceanography, 1984 "A Numerical Model for Low-Frequency Equatorial Dynamics", with M. Cane

Education/Credentials
M.S. MIT Physical Oceanography, B.S. UC Berkeley Applied Math

Past/Present Clients
Also an Expert in Oceanography