(18) We read process name from /proc/<PID>/status file. Apparently it is very expensive in terms of system time to do so.
proc.cpu.util[,sandis,system,top -d 1,avg1]
proc.cpu.util[,sandis,total,top -d 1,avg1]
1. Disable all other queries.
2. Restart zabbix_agentd to purge any pre-existing queries.
3. Spawn many processes with the script from (14) (leave it running).
After a few minutes modify any of the queries to contain process name.
The system time of zabbix_agentd collector jumps immediately. On my system - from 4% to 12% CPU utilisation.
Presumably the process name can be read from /proc/<PID>/stat file with less performance impact however there might be backwards compatibility reason for not doing that. Further discussion/investigation needed.
Andris Zeila RESOLVED in r55099