HomeFreeBSD

pfctl: cache getprotobynumber results

Description

pfctl: cache getprotobynumber results

As for example pfctl -ss keeps calling it, it saves a lot of overhead
from elided parsing of /etc/nsswitch.conf and /etc/protocols.

Sample result when running a pre-nvlist binary with nfs root and dumping
7 mln states:
before: 24.817u 62.993s 1:28.52 99.1%
after: 8.064u 1.117s 0:18.87 48.5%

Idea by Jim Thompson

Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")

Details

Provenance
mjgAuthored on Jul 1 2021, 7:25 PM
Parents
rGfa3d57c25610: mrsas(4): Report more correct maximum I/O size.
Branches
Unknown
Tags
Unknown