Hi,
As explained and first reported here :
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231732
When browsing hrSWRunEntry (1.3.6.1.2.1.25.4.2.1) on FreeBSD servers, many "kernel" processes are returned.
I have servers with around 100 user processes, and 1000 kernel threads, making hrSWRunEntry SNMP requests very slow.
KVM_GETPROCS(3) helped me to find the following solution :
I replaced KERN_PROC_ALL by KERN_PROC_PROC in kvm_getprocs() calls.
hrSWRunEntry requests now take around 0.5 second instead of sometimes more than 20 !
Could we then think about disabling kernel threads in hrSWRunEntry ?
I see no reason to keep them ?
Perhaps adding a new configuration (or compilation ?) option ?
Thank you very much !
Ben
Can you share your changes, e.g. by posting here the output of git diff?
Sure, here it is :
There are some other
kvm_getproc[2s](.*, KERN_PROC_ALL, .*)calls in the code, but the above one seems to be the one triggered by hrSWRunEntry SNMP requests.May I ask you some news regarding this Bart ?
Many thanks !
This patch has been applied on the v5.8 and master branches. Sorry for the delay.
Don't worry, perfect, thank you very much Bart !