Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I read a question from my recitation about optimal buffer size. As solution there is a furmula for calculating the optimal buffer size; I'm not sure about one of its parameters. The formula is

$\quad \operatorname{Buffer}_{\text{optimal}} = \frac{\operatorname{Buffer}_{\text{current}}}{1-\frac{R_{\text{app}}}{R_{\min}}}$


  • $\operatorname{Buffer}_{\text{optimal}}$ is the optimal buffer size we want to calculate.
  • $\operatorname{Buffer}_{\text{current}}$ is the current buffer size.
  • $R_{\text{app}}$ is the rate the application reads data from the buffer at.
  • $R_{\min}$ -- this is the one I'm not sure about.

The example problem is this:

Alice connects to web server and downloads a file of 12KB size from the server. There is a router between them. The transmission rate between Alice and router is 400,000B/s and the transmission rate between router and server is 1MB/s. Buffer size in the router is 4KB, and buffer size in Alice is 3KB. The rate the application reads from Alice buffer with is 100KBps. enter image description here Calculate the optimal buffer size for Alice as a fuction of router buffer size and free space at the buffer.

So as described in the solution, according to the above formula the solution is

$\qquad \operatorname{Buffer}_{\text{optimal}} = \frac{3*10^3}{1-\frac{10^5}{4*10^5}}$

So what $ R_{\min} $ could be ?

share|cite|improve this question
Have you asked your teachers? It may be the minimal transissmison rate on the path between Alice and the server, though. I don't see how the solution fulfills the part with "function of [...[ free space at the buffer". – Raphael Jan 31 '13 at 14:06
up vote 2 down vote accepted

$R_{min}$ is the "Writing Rate in Application Buffer" (from router in your example).

This formula makes sense for different conditions like $R_{app}=R_{min}$. In this case the buffer size should be infinite (very large buffer) and it is intuitively correct. $R_{app} >R_{min}$ makes the size negative which shows that buffering does not help while the reading data is very faster than buffering data in user side.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.