Fix reporting of system.process.cgroup.memory.mem.limit.bytes
when limit not set
#811
Closed
5 tasks
Labels
Description
The UI team currently does a fairly complex calculation to calculate the total memory usage - the complexity here is added again by memory related metrics based on cgroup. The key issue is in percentCgroupMemoryUsedScript - the system.process.cgroup.memory.mem.limit.bytes may not be set, which means a pod can take up all the memory of the host. But in this case agents typically send the "magic value" of 9223372036854771712L, which is then "fixed" by the UI. While this works for our UI, for a user it's almost impossible to recreate a correct memory usage graph when an APM Agent sends memory related metrics based on cgroups.
Solution
Decrease the complexity of the UI codeI by sending "real" system.process.cgroup.memory.mem.limit.bytes. This means, if no memory limit is set for the POD, the agent won't send the "magic" 9223372036854771712L value, instead, it'll send system.memory.total in system.process.cgroup.memory.mem.limit.bytes. This means the max memory that a pod can take is the same as the overall system memory.
Spec Issue
system.process.cgroup.memory.mem.limit.bytes
when limit not set #812Agent Issues
system.process.cgroup.memory.mem.limit.bytes
when limit not set apm-agent-java#3210system.process.cgroup.memory.mem.limit.bytes
when limit not set apm-agent-dotnet#2123system.process.cgroup.memory.mem.limit.bytes
when limit not set apm-agent-nodejs#3450system.process.cgroup.memory.mem.limit.bytes
when limit not set apm-agent-python#1865The text was updated successfully, but these errors were encountered: