Some optimization required in snmpwalk, getting response in 5 sec from SNMP Manager . Need to reduce this time either in 1 sec or milisec? - snmp

I am using this snmpwalk command to query :
snmpwalk -c public -v 2c 10.10.68.70:18089 1.3.6.1.4.1.11080.300 -t 4
port : 18089 -> where SNMP Manager is running
timeout - 4 sec
In locally , I can see the response came instantly with out any delay.
03.08.2021 18.29.57:084 230745 DEBUG {Thread-80}SNMP run: [Thread[Thread-80,6,main]]:getNext operation on FHMR_MIB
03.08.2021 18.29.57:088 230754 DEBUG {Thread-81}SNMP run: [Thread[Thread-81,6,main]]:getNext operation on FHMR_MIB
But in production : response is coming in 5 sec.
I checked the ping status : ping "ip" -t --> response is coming in milisec itself .
Any parameters we can optimise so that response will be faster ?
Thanks in advance

Related

Jmeter - How to capture curl manpage parameters for http request

I am trying to create a report in Jmeter where I am fetching a file from URL and in report I need to capture following information -
DNS resolution (time_namelookup)
Connect (time_connect)
TLS handshake (time_appconnect)
HTTP request start (time_pretransfer)
HTTP response start (time_starttransfer)
HTTP response completed (time_total)
I am able to capture these using following command from my Mac's terminal.
curl -w "#curl-format.txt" -o /dev/null -s "https:///large5-1663346153.bmp"
here's the content of curl-format.txt file
time_namelookup: %{time_namelookup}s\n
time_connect: %{time_connect}s\n
time_appconnect: %{time_appconnect}s\n
time_pretransfer: %{time_pretransfer}s\n
time_redirect: %{time_redirect}s\n
time_starttransfer: %{time_starttransfer}s\n
----------\n
time_total: %{time_total}s\n
As per JMeter Glossary JMeter can report the following metrics:
Connect time
Latency (time to first byte)
Elapsed time (time to last byte)
The only way to get the metrics you're looking for in JMeter is executing the curl command via OS Process Sampler or JSR223 Sampler and get the values from the response using suitable Post-Processors

Large result is slow anywhere but local

I have a fairly large query running on Clickhouse. The problem is when running on localhost using cmd line it takes about 0.7 sec to complete. This is consistently fast. Issue is when querying from C# / HTTP / Postman. Here it takes about 10 times to return the data. (the size is about 3-4mb) so I dont think its a size issue.
I have tried to monitor network latency, but nothing to notice here.
On the host it works like a charm, but outside it does not :(.... what to do.
I exptect the latency to be a few 100 ms, but turns out to be 7 sec :/
check timings with curl https://clickhouse.yandex/docs/en/interfaces/http/
https://stackoverflow.com/a/22625150
and compare local vs remote
CH HTTP usually provides almost the same performance as TCP and HTTP could be faster for small resultsets (like 10 rows)
Again. The problem is not the HTTP.
Example:
time clickhouse-client -q "select number, arrayMap(x->sipHash64(number,x), range(10)) from numbers(10000)" >native.out
real 0m0.034s
time curl -S -o http.out 'http://localhost:8123/?query=select%20number%2C%20arrayMap(x-%3EsipHash64(number%2Cx)%2C%20range(10))%20from%20numbers(10000)'
real 0m0.017s
ls -l http.out native.out
2108707 Oct 1 16:17 http.out
2108707 Oct 1 16:17 native.out
10 000 rows - 2Mb
HTTP is faster 0.017s VS 0.034s
Canada -> Germany (openvpn)
time curl -S -o http.out 'http://user:xxx#cl.host.x:8123/?query=select%20number%2C%20arrayMap(x-%3EsipHash64(number%2Cx)%2C%20range(10))%20from%20numbers(10000)'
real 0m1.619s
ping cl.host.x
PING cl.host.x (10.253.52.6): 56 data bytes
64 bytes from 10.253.52.6: icmp_seq=0 ttl=61 time=131.710 ms
64 bytes from 10.253.52.6: icmp_seq=1 ttl=61 time=133.711 ms

Elastic Search Load Testing With Apache Benchmark

I am using the elastic cloud to store my data. My index has 1.3 million documents and I am using apache benchmark to perform load testing on my elastic search index. I am using the following command to perform load testing:
ab -p <<file.txt>> -T application/json -c 500 -n 50000 -t 60 -l <<elastic url>>
After running above command I get the following result:
Complete requests:9000
Failed requests: 0
In the request, I have mentioned the number of requests is 50 000 and concurrency is 500 but the total completed request is 9 000 only. How I increase completed request count?
Is any setting in elastic search to support max request concurrency(like 500)?

Jmeter Distributed Environment : Active Threads Over Time : total not displayed

I have a JMeter distributed environment (localhost and host1)
localhost (master and slave)
host1 (slave).
I have a thread group in my test plan with 10 users and 50 loops.
Running the test as bellow :
jmeter.bat -t myscript.jmx -n -r -l results.csv
My test runs successfully and I get a total of 20 threads as displayed on the output
summary + 800 in 30,2s = 26,5/s Avg: 580 Min: 33 Max: 2315 Err: 0 (0,00%) Active: 20 Started: 20 Finished: 0
But when I try to graph "jp#gc - Active Threads Over Time" with data in results.CSV , I just get the number of active threads = 10 .
My question is how can I get a Grape with all 20 threads running?
The main problem is that I suspect that result.csv is not complete and does not contain all performance information such as response time etc.
For JMeter version < 5.0 :
This is because you need to add a unique ID per injector in Thread Group name as per documentation:
https://jmeter-plugins.org/wiki/ActiveThreadsOverTime/
For example:
If running only 1 JMeter per machine:
${__machineName()}_My Threadgroup name
If running multiple injectors per machine::
${__P(JVM_ID,1)}_My Threadgroup name
For version >= JMETER 5.0:
It will work correctly Out Of The Box as per this fix:
https://bz.apache.org/bugzilla/show_bug.cgi?id=62684

net-snmp snmptrap sending samples

I'm new in SNMP and I just configured the agent and the manager and I'm
able to receive the traps sent by the agent. But I noticed that the traps
received by the manager are captured between 10 seconds, but I need to
receive the traps as soon as I generate them not between 10 sec.
I'll show you my script which is intended to capture the signal avg power
that a client has with an Access Point, the samples are taking between 1
sec and I need to send that trap to the manager in less time than 1 sec.
while :
do
valor=$(iw dev wlan0 station dump \
| grep 'signal avg': | awk '{print $3}')
snmptrap -v 1 -c public 192.168.1.25 '1.2.3.4.5.6' \
'192.168.1.1' 6 99 '55' 1.11.12.13.14.15 s "$valor"
echo $valor >> muestras.txt
sleep 1
done
But surprisingly the traps seems to be generated between 10 sec or maybe
the manager is receive them in an elapsed time of 10 sec. I don't know
where is the problem, in the agent or in the manager, but I'm sure that the
agent generates samples in 1 sec because "muestras.txt" shows that.
Hope you can help me!.
Greetings!
I found the answer.
The problem was in the server who executes snmptrapd. Simply I passed the argument -n to the snmptrapd and that solved all!.

Resources