Redis use case

How to reproduce

This page describes how to reproduce the results presented in the paper for four setups:

  • Vanilla: without tracing I/O events
  • Strace: tracing system calls with Strace tool
  • Sysdig: tracing system calls with Sysdig tool
  • DIO: tracing and analyzing system calls with DIO

Redis configuration
  • Repository: https://github.com/redis/redis.git
  • Commit (v1): e9ae03787e0a2e0484914737f82bfe216f8e9d52
  • Commit (v2): d4c8dff7c36a345a1958eb13da1e626af68ec52d
  • Configurations:
    • protected-mode no
    • loglevel debug
    • logfile /dio_data/redis.log
Benchmark configuration
  • Benchmark: redis-benchmark
  • Configurations:
    • Number of requests: 5,000,000 (-n 5000000)
    • Random keys: 5,000,000 (-r 5000000)
DIO configuration
  • Tracer Configurations:
    • Filter events by file paths (target_paths):
      • redis folder: "/redis"
      • redis log file: "/dio_data/redis.log"
Docker images
  • Image: taniaesteves/redis_dio
    • TAG "v1" - Redis with the inefficient access pattern
    • TAG "v2" - Redis with the correct access pattern
  • Run Redis server:
    • Vanilla:
    • docker run -it -d --name redis-server --pid=host --privileged --cap-add=ALL --net=host -v /lib/modules:/lib/modules -v /usr/src:/usr/src -v /sys/kernel/debug/:/sys/kernel/debug/ taniaesteves/redis_dio:v1
    • Strace:
    • docker run -it -d --name redis-server --pid=host --privileged --cap-add=ALL --net=host -v /lib/modules:/lib/modules -v /usr/src:/usr/src -v /sys/kernel/debug/:/sys/kernel/debug/ -v /tmp/strace_data:/strace_data taniaesteves/redis_dio:v1 strace
    • Sysdig (run along the vanilla command):
    • docker run -it -d --name sysdig --privileged -v /var/run/docker.sock:/host/var/run/docker.sock -v /dev:/host/dev -v /proc:/host/proc:ro -v /boot:/host/boot:ro -v /lib/modules:/host/lib/modules:ro -v /usr:/host/usr:ro -v /tmp/sysdig_data:/home --net=host -e SYSDIG_BPF_PROBE="" sysdig/sysdig:0.31.4 sysdig -B -t a -p "*%evt.num %evt.outputtime %evt.cpu %proc.name (%thread.tid) %evt.dir %evt.type %evt.rawres %evt.args" container.name="redis-server" and "evt.type in ('"'open','openat','creat','read','pread','readv','write','pwrite','writev','lseek','truncate','ftruncate','rename','renameat','renameat2','close','unlink','unlinkat','stat','fstat','lstat','fstatfs','newfstatat','setxattr','getxattr','listxattr','removexattr','lsetxattr','lgetxattr','llistxattr','lremovexattr','fsetxattr','fgetxattr','flistxattr','fsync','fdatasync','readlink','readlinkat','mknod','mknodat'"')" and "fd.type in ('"'file','directory'"')" -s 1 -w /home/sysdig_trace.scap
    • DIO:
    • docker run -it -d --name redis-server --pid=host --privileged --cap-add=ALL --net=host -v /lib/modules:/lib/modules -v /usr/src:/usr/src -v /sys/kernel/debug/:/sys/kernel/debug/ -v /tmp/dio_data:/dio_data -e CORRELATE_PATHS=true -e ES_URL=<ES_URL> taniaesteves/redis_dio:v1 dio
  • Run Redis benchmark:
  • docker run -it --rm --name redis-bench --pid=host --privileged --cap-add=ALL --net=host -v /lib/modules:/lib/modules -v /usr/src:/usr/src -v /sys/kernel/debug/:/sys/kernel/debug/ taniaesteves/redis_dio:v1 benchmark