all: reduce MTR report cycle from 10 to 1

We have received a complaint from InnovaHosting about them being hit by
about 150 ICMP `ttl1` packets/s on their routers, causing excess CPU usage.
https://client.innovahosting.net/viewticket.php?tid=532874&c=8gALx9vm

By using `tcpdump` I have identified that `mtr` by default pings the
target 10 times, which means that the default value of `-c`/`--report-cycles`
is 10, although this is not documented in the manual.

We can see this when calling `mtr github.com` and watching with `tcpdump`:
```
 > sudo tcpdump -v -i eno1 icmp and src 185.181.230.78 and dst github.com | grep 'ttl 1,'
tcpdump: listening on eno1, link-type EN10MB (Ethernet), snapshot length 262144 bytes
19:54:53.981243 IP (tos 0x0, ttl 1, id 37119, offset 0, flags [none], proto ICMP (1), length 64)
...(8 packets omitted)...
19:55:03.025460 IP (tos 0x0, ttl 1, id 38226, offset 0, flags [none], proto ICMP (1), length 64)
```
We don't need to run the test 10 times to get a result for our metric.

Related to:
https://github.com/status-im/infra-role-bootstrap-linux/commit/ea22bdfe

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-11-20 21:04:59 +01:00
parent 6b800a5342
commit 24020d0962
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
1 changed files with 4 additions and 0 deletions

View File

@ -50,6 +50,10 @@ bootstrap_sysctl_config:
# Allow calling 'perf' without root'
kernel.perf_event_paranoid: 1
# MTR network latency metrics
bootstrap__mtr_jobs:
- { name: 'github-icmp', addr: 'github.com', flags: '-c1' }
# Consul Catalog Query URL
consul_catalog_url: 'http://localhost:8500/v1/catalog'