This module intended to measure performance of routing lookups. Uses a list of IP addresses specified by sysctl one-by-one. Performance testing is triggered by changing sysctl OID with a number of lookups to execute. Lookups are done by the chunks of 10K routes, entering/exiting epoch on chunk granularity to amortise cost. Example: make -C sys/modules/test/fib_lookup unload load for i in `cat ~/ip4.txt`; do sysctl net.route.test.add_inet_addr=$i; done for i in `cat ~/ip6.txt`; do sysctl net.route.test.add_inet6_addr=$i; done sysctl net.route.test.run_inet=10000000 dmesg | tail Dec 13 23:24:05 current kernel: 10000000 packets in 417240173 nanoseconds, 23967011 pps Dec 13 23:24:06 current kernel: run: 10000000 packets vnet 0xfffff80003073f00 Dec 13 23:24:07 current kernel: 10000000 packets in 423086254 nanoseconds, 23635842 pps Differential Revision: https://reviews.freebsd.org/D27604
12 lines
194 B
Makefile
12 lines
194 B
Makefile
# $FreeBSD$
|
|
|
|
SYSDIR?=${SRCTOP}/sys
|
|
.include "${SYSDIR}/conf/kern.opts.mk"
|
|
|
|
.PATH: ${SYSDIR}/tests/fib_lookup
|
|
|
|
KMOD= test_lookup
|
|
SRCS= opt_inet.h opt_inet6.h fib_lookup.c
|
|
|
|
.include <bsd.kmod.mk>
|