We need to think about setting proper priorities and some limits on resource usage (if necessary) per daemons which are started with systemd.
There are issues when some of the daemons, for example, snmpd can get 100% CPU utilization a lot of time.
This behavior can often lead to the fact that resources for other more important daemons/services (like frr/routing/etc) may simply not be enough.
This can cause daemons/processes to crash.
Description
Description
Details
Details
- Difficulty level
- Unknown (require assessment)
- Version
- -
- Why the issue appeared?
- Will be filled on close
- Is it a breaking change?
- Unspecified (possibly destroys the router)
- Issue type
- Unspecified (please specify)
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | FEATURE REQUEST | Viacheslav | T3706 Add properly priorities for systemd daemons | ||
Resolved | FEATURE REQUEST | Viacheslav | T3709 Snmp: Allow enable MIDs/OIDs ipCidrRouteTable |
Event Timeline
Comment Actions
and after
A simple check works fine:
Set 20% quota for snmpd
And check it with script:
#!/usr/bin/env bash while true do snmpwalk -v 2c -c public 127.0.0.1 done
Edit service:
sudo systemctl edit snmpd
Replace:
[Service] Environment= Environment="MIBDIRS=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/vyos/mibs" ExecStart= ExecStart=/usr/sbin/snmpd -LS0-5d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -ipCidrRouteTable,inetCidrRouteTable -f -p /run/snmpd.pid Restart=always RestartSec=10
To:
[Service] Environment= Environment="MIBDIRS=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/vyos/mibs" ExecStart= ExecStart=/usr/sbin/snmpd -LS0-5d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -ipCidrRouteTable,inetCidrRouteTable -f -p /run/snmpd.pid Restart=always RestartSec=10 CPUQuota=20%
CPU before
and after
Needs to think about all necessary services and their limits