Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Slow getSubtree #57

Open
leo-combes opened this issue Jun 13, 2017 · 8 comments
Open

Slow getSubtree #57

leo-combes opened this issue Jun 13, 2017 · 8 comments

Comments

@leo-combes
Copy link

Hello, first of all thanks for sharing this excellent piece of code.
In most cases, I see that the get or getAll requests are fast, a lot, comparable with net-snmp from bash.
However, now I start to try getSubtree and it works extremely slow. To compare, a particular request takes 1.8 seconds with net-snmp from bash and snmp-native takes 27 seconds. The two tests are done on the same server, against the same host and the same OID.
Is it normal for getSubtree to take so long?

@calmh
Copy link
Owner

calmh commented Jun 13, 2017

I don't think so. Can you figure what what it is that takes so long, using pcaps and debugging as appropriate?

@bangert
Copy link
Collaborator

bangert commented Jun 13, 2017

@leo-combes: could you specify which net-snmp command you are comparing specifically?

The original getSubtree fetches only single values - while pull request #44 implements getBulkRequest, which, depending on the snmp server implementation, may give faster (or slower) response.

@leo-combes
Copy link
Author

@calmh I will do some additional research and confirm.

@bangert You are correct, my test are made with snmpbulkwalk:

snmpbulkwalk -v 2c -c public 192.168.128.6 .1.3.6.1.4.1.4998.1.1.20.2.27.1.17

Now, I do a test with "normal" snmpwalk and takes 16 seconds.
I did not know you guys were working on getBulkRequest implementation. In what version is this functionality available?

@bangert
Copy link
Collaborator

bangert commented Jun 13, 2017

it's not available in any release yet. i have been using the implementation in #44 for a while...

@leo-combes
Copy link
Author

@bangert I've testing your PR #44 and works very well!

@bangert
Copy link
Collaborator

bangert commented Jun 16, 2017

thank you. what times do you measure now?

In my experience, node-snmp-native should not be slower than the net-snmp cli tools...

@leo-combes
Copy link
Author

Tests over OID with 80 values, same remote host (non local, over internet):

net-snmp:
1.874s
1.870s
1.873s
1.868s
1.867s

node-snmp-native:
1.905s
1.905s
1.911s
1.894s
1.893s
1.898s

@bangert
Copy link
Collaborator

bangert commented Jun 19, 2017

so node-snmp-native is marginally slower (~2%). thanks for correcting me on that ;-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants