Skip to content

Rework ConnectionMapping to reduce CPU usage

Arjen Hiemstra requested to merge work/ahiemstra/processcpu into master

This moves fetching socket info and mapping that to inodes and pids to its own thread that updates on a regular interval of 500ms. This gives us more control over how often this update happens and detaches it from the packet handling.

If the address/inode/pid is not known, we simply return an invalid result like we would previously for items where we are unable to determine the PID. This can in theory lead to missing data from processes, if the socket gets constantly recreated in between the 500ms updates.

Edited by Arjen Hiemstra

Merge request reports