> Date: Mon, 5 Jun 2023 15:01:44 +0000 > From: Emmanuel Dreyfus <m...@netbsd.org> > > I would like to understand why nss_ldap is slow. I rebuilt the module > with -pg and made a simple program that calls getpwnam(), also built > with -pg
Is it slow because it's eating CPU time (as shown by top(1)), or is it slow because it's waiting for network I/O? My guess is the latter. Have you tried ktracing the program that calls getpwnam to see what network entities it talks to, and how long it waits for them (with kdump -T/-R to show timestamps)?