Measuring some key system parameters for Linux systems running on Intel x64 hardware. We use a low-overhead method of measuring time using the rdtsc
instruction to read the CPU's internal clock that contains a monotonically increasing value, running at the specified base frequency of the CPU. The experimental methodology for many of the experiments is heavily inspired by LMBench, and we use the methodology decribed in Gabriele Paoloni's 2010 white paper for our execution time measurements.
- Process and thread creation time
- Process and thread context switching overheads
- Syscall and procedure call overheads
- RAM Access Time
- RAM bandwidth
- Page fault time (hard page fault)
- Peak network bandwidth
- Round-trip time
- TCP Connection setup and teardown time
- File cache size measurement
- File read benchmark (local and remote via NFS)
First ensure that the CPU is running Intel Pstate drivers
$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver
intel_pstate
....
Then, ensure that dynamic CPU frequency scaling (a.k.a Turbo Boost) is switched off (note that this change does not persist across reboots)
sudo echo "1" | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo
Build the benchmarks individually using
mkdir bin
make -C <benchmark_folder> all
benchmark_folder
can be either cpu_benchmarks, mem_benchmarks, nw_benchmarks or fs_benchmarks based on the benchmark you want to run
Use the clean
target to clean up the binary files after finishing the execution
Run the binary file to get the average and standard deviation of time measurements using
sudo taskset -c 1 ./bin/<binary name>
sudo
is important as nice
commands to set the priority requires root user privileges
Warning: You will need atleast 8GB of free disk space to use the temp files that are used for these benchmarks
Run the binary file to get the average and standard deviation of time measurements using
sudo taskset -c 1 ./bin/<binary name>
NOTE: For page fault time, you can run the helper script in the scripts/
directory using
sudo python3 scripts/runpagefault.py
For memory access time benchmark run:
sudo ./scripts/runmemaccess.sh
Change the server IP in netconfig.h before building
Run the binary to get the measurements using
sudo taskset -c 1 ./bin/<binary name>
Warning: You will need atleast 16GB of free disk space to use the temp files that are used for these benchmarks Also, modify the mount point in remote_fileread.cpp for the remote file read tests before building
Run the binary to get the measurements as above
NOTE: For FS contention, you can run the helper script in the scripts/
directory using
sudo ./scripts/runcontention.sh