#975520 snmp: Performance refression for snmp commands since .index files removal

Package:
snmp
Source:
net-snmp
Description:
SNMP (Simple Network Management Protocol) applications
Submitter:
Date:
2020-11-23 22:33:02 UTC
Severity:
normal
#975520#5
Date:
2020-11-23 09:21:21 UTC
From:
To:
Dear Maintainer,

Since last snmp release 5.7.3+dfsg-5+deb10u1, we detected performance
regressions on snmpget/walk/bulkwalk (probably all commands). We bisected
the regression to this patch:
https://github.com/net-snmp/net-snmp/commit/4fd9a450444a434a993bc72f7c3486ccce41f602

For snmpd daemon, performance impact is probably very slow, the .index file
was not mandatory. However, for our use case (monitoring application) running
a lot of snmp commands, strace show a big change on number of opened files:

grep -c openat snmpget_strace_before
55

And now:
grep -c openat snmpget_strace_new
2197

We are looking for workaround (or to accept this drawback), but if you have
a solution to restore this cache for snmp commands only (probably not
affected by security issues like snmpd), it would be greatly appreciated.

Best regards,

Florent Fourcot

#975520#10
Date:
2020-11-23 22:29:26 UTC
From:
To:
Hi,
  Do you know if snmp v5.8 has this same issue? The reason for this is
there may be something else assisting with it and its easier to report this
upstream if it is the current version has the same problem.

I know 5.8 doesn't use that cache, I'm not 100% sure if there is something
else helping fix the problem.

Maybe there could be a way of doing this cache as a per-user thing (under
~/.snmp/* perhaps)?

 - Craig