Question

Consider a web server. Each incoming request is processed as follows: input-side processing (done on all...

Consider a web server. Each incoming request is processed as follows: input-side processing (done on all incoming request) – 100ms, disk access – 900 ms, cache access – 100ms. The input side processing determines whether a request can be served by the cache or disk access is required. Assume that the web server has a single disk that serves the requests one after the other. The cache will hold popular requests after warming up. If the web server uses a single thread (kernel level), what are the best and worst request rates achievable by the server? Suppose we use two threads in the web server, what is the best request rate we could achieve?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The best case scenario for any web server is tjat after warming up he cache has all the results and we don't have to go for any of the required request to the disk so

Total Request Timings = 200ms ( Best Case)

i.e is 1000/ 200 = 5 Request per second rate

Total time Required = 100+900= 100s ( Worst Case)

i.e is 1000/1000 = 1 request per second this is the worse case.

Now when we increase the thread here, we get the to know how we want to use it,

So let's say we don't wait for the input-side-processing to confirm the presence of the cache and we go ahead and do it so that the two threads do it parallel thus in the first 100ms in the best case scenario we get the item looking for making it

Total Request Timing = 100,100 parallel so 100ms

Total Request = 1000/100 = 10 request per second ( best case)

Worse case scenario we don't find the part we are looking for in the cache so we need one thread to take case of seeking the disk so

Timing for Request = 100,100 +900 = 1000ms

Total Request = 1000/1000 = 1 Request per second.

In case of any more clarification put down a comment , hope it helps

Add a comment
Know the answer?
Add Answer to:
Consider a web server. Each incoming request is processed as follows: input-side processing (done on all...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT