Skip to content

Bug: [GNMI] Memory consumption increase after redis update #26825

Description

@croos12

Is it platform specific

generic

Importance or Severity

Low

Description of the bug

Not a bug per se, but there is a significant memory increase coming from the redis update in sonic-gnmi from the go-redis/v9 update in sonic-net/sonic-gnmi#528. This persists even after the fix in sonic-net/sonic-gnmi@d297045. This is causing our memory checker tests to fail for the telemetry process. From what I have seen I believe it is scaling with the number of redis clients which scales with logical CPUs.

Commit a3e7e4e0bba4b92636c295abc3d2eb452a02f3f7:

2 CPU Switch telemetry process memory consumption after running gnmi idle for ten minutes:

echo "RSS=$(cat /proc/$(pidof telemetry)/status | grep VmRSS | awk '{print $2, $3}')" RSS=72736 kB

16 CPU Switch memory consumption after running gnmi idle for ten minutes:

echo "RSS=$(cat /proc/$(pidof telemetry)/status | grep VmRSS | awk '{print $2, $3}')" RSS=90392 kB

Commit d297045fd70ef2cfad373e2d1b821ede468787b3:

2 CPU Switch telemetry process memory consumption after running gnmi idle for ten minutes:

echo "RSS=$(cat /proc/$(pidof telemetry)/status | grep VmRSS | awk '{print $2, $3}')" RSS=77748 kB

16 CPU Switch memory consumption after running gnmi idle for ten minutes:

echo "RSS=$(cat /proc/$(pidof telemetry)/status | grep VmRSS | awk '{print $2, $3}')" RSS=103680 kB

Steps to Reproduce

N/A

Actual Behavior and Expected Behavior

N/A

Relevant log output

Output of show version, show techsupport

Attach files (if any)

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions