CSEP551 -- Programming Assignment #1

Out: Monday, January 9th, 2012
Due: Monday, January 30th, 2012, by 5pm


[ overview | details | bonus | what to turn in ]


Overview

In this assignment, you will investigate the impact of system call overhead on application performance. Your ultimate goal is to produce a set of graphs that looks something like the following:


This graph shows some application-level benchmark performance as a function of system call latency. To generate this graph, you will modify the linux kernel so that you can add a specifiable amount of overhead to every system call. By varying this overhead, you can measure benchmark performance as a function of this overhead to generate the curve.


Assignment details

Here are the steps we recommend that you should follow:
  1. Set up an environment in which you can install linux and compile linux kernels. I strongly recommend using VMware for this. (It is true that VMware will affect your benchmark performance, but let's ignore that for this assignment.) You'll need to:

  2. Practice compiling, installing, and booting into a new kernel. For the VM we recommended, you can find instructions on how to do this here.

    (If you're using your own flavor of Linux, you'll need to figure out how to do this yourself. You may need to install kernel sources, configure the kernel, and maybe even install compilation tools, depending on what you're starting with.)

  3. You're now ready to modify the linux kernel so that you can add overhead to every system call that occurs. To do this, you'll need to:

  4. Make it possible for user-level programs to change the amount of system call overhead introduced by your code. I suggest that you add something to the /proc virtual file system to do this -- i.e., by writing a number to a file you create in proc, your code will vary the amount of loop overhead according to that number. There are plenty of web pages that will help you learn how to add something to the /proc filesystem; see, for example, here.

  5. Calibrate your system call overhead by measuring the latency of a simple system call (e.g., close(100)) as a function of your variable overhead.

  6. Measure the performance of the following three benchmarks as a function of system call overhead:

    Be careful of caching effects when running your benchmarks, in particular, of the file system buffer cache!


Bonus

If you want some extra credit, find a way to add a similar delay loop (including another /proc interface) on the ethernet packet reception and transmission paths. Calibrate this delay loop. Devise an experiment to measure the impact of this delay on the throughput and latency of serving a small, static web page from Apache. Devise another experiment to measure the impact of this delay on the throughput and latency of serving a large, static web page from Apache. Explain your results.


What to turn in

You should submit your assignment by emailing a single .tar.gz/.zip archive to Steve and Owen containing the following elements: