Re: netsnmp_large_fd_set_resize() sucking cycles

Bill Fenner <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAF4Soga3Stv9-5xHjqTNApFc2Ep9TUxdfJDhfd3u7cib8QHbVQ@mail.gmail.com>
On Thu, Oct 16, 2014 at 9:48 PM, Jono Poff <[email protected]>
wrote:

>
> Hi,
>
> I'm investigating excessive cpu usage in some server software on Solaris
> 10.
>
> By prstat, the server process is using 13% (out of 25%, since it is a
> single thread on 4 cores).
>
> By Brendan Gregg's hotuser script (see
> http://www.brendangregg.com/DTrace/hotuser) the function
> netsnmp_large_fd_set_resize() is using up to 80% of that.
>
> By the same script, libnetsnmp.so is using over 80%.
>
> The context of the call is that I'm using snmp_select_info() to
> integrate SNMP into my own event loop which uses select().  (This is
> pretty much as described under "Own custom event loop" at
> http://vincent.bernat.im/en/blog/2012-snmp-event-loop.html)
>
> netsnmp_large_fd_set_resize() is called from snmp_read() and run_alarms().
>
> The app is using net-snmp-5.6.1.1.  Would upgrading the library (not a
> trivial task) improve the situation?
>
> Can anyone suggest what can be done to alleviate this.  64 bit Solaris
> has a fixed FD_SETSIZE of 64k, so what does
> netsnmp_large_fd_set_resize() need to resize that for?  Why does it
> require space for more than 65535 handles?
>

It's spending time resizing from 0 to FD_SETSIZE.  The change at
http://sourceforge.net/p/net-snmp/code/ci/4224cabcb112d0d437f9ca9f4d3430501d1c8750/
should help you.

  Bill

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.