{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/snmp_exporter/issues/89","repository_url":"https://api.github.com/repos/prometheus/snmp_exporter","labels_url":"https://api.github.com/repos/prometheus/snmp_exporter/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/snmp_exporter/issues/89/comments","events_url":"https://api.github.com/repos/prometheus/snmp_exporter/issues/89/events","html_url":"https://github.com/prometheus/snmp_exporter/issues/89","id":193198116,"number":89,"title":"metric gathering slower than snmpbulkwalk","user":{"login":"Andor","id":147300,"avatar_url":"https://avatars.githubusercontent.com/u/147300?v=3","gravatar_id":"","url":"https://api.github.com/users/Andor","html_url":"https://github.com/Andor","followers_url":"https://api.github.com/users/Andor/followers","following_url":"https://api.github.com/users/Andor/following{/other_user}","gists_url":"https://api.github.com/users/Andor/gists{/gist_id}","starred_url":"https://api.github.com/users/Andor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andor/subscriptions","organizations_url":"https://api.github.com/users/Andor/orgs","repos_url":"https://api.github.com/users/Andor/repos","events_url":"https://api.github.com/users/Andor/events{/privacy}","received_events_url":"https://api.github.com/users/Andor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-12-02T19:30:08Z","updated_at":"2016-12-07T03:36:56Z","closed_at":null,"body":"with just snmpbulkwalk:\r\n```\r\n[andor@hostname ~]$ time snmpbulkwalk -v 2c -c community $target 1.3.6.1.2.1.2 > /dev/null\r\n\r\nreal    0m8.667s\r\nuser    0m0.066s\r\nsys     0m0.026s\r\n[andor@hostname ~]$ time snmpbulkwalk -v 2c -c community $target 1.3.6.1.2.1.31.1.1 > /dev/null\r\n\r\nreal    0m9.468s\r\nuser    0m0.072s\r\nsys     0m0.016s\r\n[andor@hostname ~]$ time snmpbulkwalk -v 2c -c community $target 1.3.6.1.2.1.1.3 > /dev/null\r\n\r\nreal    0m0.025s\r\nuser    0m0.015s\r\nsys     0m0.005s\r\n```\r\nsum is ~18sec\r\n\r\nwith snmp_exporter with default config:\r\n```\r\n$ time curl localhost:9116/snmp?target=$target > metrics\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100  363k  100  363k    0     0  14797      0  0:00:25  0:00:25 --:--:-- 76211\r\n\r\nreal    0m25.171s\r\nuser    0m0.004s\r\nsys     0m0.016s\r\n```"},"comment":{"url":"https://api.github.com/repos/prometheus/snmp_exporter/issues/comments/265346759","html_url":"https://github.com/prometheus/snmp_exporter/issues/89#issuecomment-265346759","issue_url":"https://api.github.com/repos/prometheus/snmp_exporter/issues/89","id":265346759,"user":{"login":"truedays","id":1525206,"avatar_url":"https://avatars.githubusercontent.com/u/1525206?v=3","gravatar_id":"","url":"https://api.github.com/users/truedays","html_url":"https://github.com/truedays","followers_url":"https://api.github.com/users/truedays/followers","following_url":"https://api.github.com/users/truedays/following{/other_user}","gists_url":"https://api.github.com/users/truedays/gists{/gist_id}","starred_url":"https://api.github.com/users/truedays/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/truedays/subscriptions","organizations_url":"https://api.github.com/users/truedays/orgs","repos_url":"https://api.github.com/users/truedays/repos","events_url":"https://api.github.com/users/truedays/events{/privacy}","received_events_url":"https://api.github.com/users/truedays/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T03:36:56Z","updated_at":"2016-12-07T03:36:56Z","body":"Just started looking at Prometheus snmp_exporter, but here's my theory..\r\n\r\nnet-snmp's snmpbulkwalk defaults are:\r\nretry (-r) 5\r\nmax-repetitions (-Cr) 10\r\ntimeout (-t) 1\r\n\r\nWhile collector.go has\r\n        snmp.Retries = 3\r\n        snmp.MaxRepetitions = 25\r\n        snmp.Timeout = time.Second * 60\r\n\r\n_timeout_ is the time between the initial _get-request_ and the corresponding _get-response_ until it sends another duplicate _get-request_ (UDP-style handshake).\r\n\r\nI *think* you'll get comparable times if you more closely mirror the SNMP arguments used by _collector.go_\r\n\r\n```\r\nCOMMUNITY='public'\r\nTARGET='127.0.0.1'\r\ntime { for i in 1.3.6.1.2.1.{2,31.1.1,1.3}; do snmpbulkwalk -v2c -c ${COMMUNITY} -r3 -Cr25 -t60 ${TARGET} ${i}& done; wait; }\r\n```\r\n\r\n"}}
{"actor":{"display_login":"truedays"}}