1mmapbench will take one file as argument on the command line.
2It will then map ever second page of the file, "count" times.
3count is 25000 per default, (i.e. 100 megs are mapped, the file needs to
4be at least 200 megs large).
5
6The program will then prime the cache and read a few bytes from every
7page that is mmapped later on, to make sure the pages are in the buffer
8cache.
9
10mmapbench will then mmap every other page and measure the latency of
11that, and it will then read a byte of the page, which should force a
12page fault in the OS and cause the OS to actually map the page to
13memory.
14
15On i386, mmapbench will read the task cycle counter instead of
16gettimeofday and give the results in CPU cycles, not usec.  You can
17divide the numbers by the CPU frequency to get comparable numbers.  As
18there is no portable way to get the CPU frequency, mmapbench does not
19even pretend to do this.
20
21NOTE: if you get a bus error, you gave too small a file as argument.
22The default settings from run-bench assume a file (or block device!) at
23least 160 MB.  So the easiest way is to just point mmapbench to your
24root partition, or use dd to create a large new file.
25