#!/bin/sh set -e cols=$(grep -v sample kernel.nosdt | awk -F',' '{print $1}' | sed 's/"\([A-Z_0-9]*\).*/\1/' | sort | uniq) for sdt in nosdt newsdt oldsdt newsdt_branch newsdt_branch_hint; do for col in $cols; do grep "\"$col.*\"" kernel.$sdt | awk -F',' '{print $2}' | sed 's/"\([0-9\.]*\)"/\1/' > $col.$sdt.tmp done done rm -f ministat-*.txt summary=ministat-summary.txt cat > $summary <<__EOF__ This file compares a new hot-patching SDT implementation with FreeBSD's current implementation, and with a FreeBSD kernel that has KDTRACE_HOOKS omitted from its configuration. redis-benchmark is used with its default options to time various Redis requests. These are transmitted over TCP loopback, providing an opportunity to measure the performance loss caused by SDT probes in the network and locking code. The benchmarks are performed using a default CPU set of {0}; this means that all benchmark threads and the netisr threads are pinned to a single CPU. This helps isolate kernel latency that might otherwise be obscured by parallelism in the Redis client and server. SMT is disabled. The CPU is a Xeon E5-2630v3 (Haswell-EP). Each pair of graphs correspond to a Redis request type. In each graph, data points from the new SDT implementation are marked as "+". For each request type, the first graph compares new SDT with a KDTRACE_HOOKS-disabled kernel, and the second compares new SDT with the current SDT. Data points represent the number of requests per second executed while executing 100000 requests of the same type, so larger numbers are better. During trials, I see up to 350000pps on the loopback and several million lock acquisitions per second. __EOF__ for col in $cols; do for sdt in nosdt oldsdt newsdt_branch newsdt_branch_hint; do ministat $col.$sdt.tmp $col.newsdt.tmp >> ministat-$sdt.txt done echo "---------------------------------------------" >> $summary echo "$col" >> $summary echo "---------------------------------------------" >> $summary ministat $col.nosdt.tmp $col.newsdt.tmp >> $summary ministat $col.oldsdt.tmp $col.newsdt.tmp >> $summary done