What is slowdown ---------------- slowdown is a shared library implementing libc read(2) and write(3) with a configurable delay meant for testing programs behaviour when the disk behaves differently than normal. How to build and install slowdown.so ------------------------------------ If this directory doesn't contain the file 'configure', run autoreconf -ivf before doing ./configure make install You will need the GNU auto-tools (Autoconf, Automake, Libool). See INSTALL for more general information about building and installing. How to use slowdown ------------------- $ # slowdown.so not loaded, for reference $ dd if=/dev/zero of=/dev/null bs=1 count=100 100+0 records in 100+0 records out 100 bytes (100 B) copied, 0.000269866 s, 371 kB/s $ # slowdown.so loaded but not configured to delay on purpose $ LD_PRELOAD=~/usr/lib/libslowdown.so dd if=/dev/zero of=/dev/null bs=1 count=100 100+0 records in 100+0 records out 100 bytes (100 B) copied, 0.0265673 s, 3.8 kB/s # slowdown.so delaying writes with 1ms $ LD_PRELOAD=~/usr/lib/libslowdown.so SLOWDOWN_WRITE_DELAY_MS=1 dd if=/dev/zero of=/dev/null bs=1 count=100 100+0 records in 100+0 records out 100 bytes (100 B) copied, 0.127009 s, 0.8 kB/s $ # slowdown.so delaying both reads and writes with 1ms each $ LD_PRELOAD=~/usr/lib/libslowdown.so SLOWDOWN_READ_DELAY_MS=1 SLOWDOWN_WRITE_DELAY_MS=1 dd if=/dev/zero of=/dev/null bs=1 count=100 100+0 records in 100+0 records out 100 bytes (100 B) copied, 0.227234 s, 0.4 kB/s