Is it platform specific
generic
Importance or Severity
Critical
Description of the bug
We have observed high memory usage by swss when link flaps very fast and if continued for long duration, causes memory exhaustion leading to Kernel panic due to OOM. In some circumstances as CPU load increases, this results in swss abort due to SAI delays and recovering the memory.
There are few PRs in community towards this and need some traction:
[swss-common] Enhanced NotificationConsumer queue to avoid memory lea… by yongxin-acctoncn · Pull Request #989 · sonic-net/sonic-swss-common
[swss] Notifier drains all notification messages to avoid memory leaks in some cases by yongxin-acctoncn · Pull Request #3560 · sonic-net/sonic-swss
These two PRs help handling memory at swss but due to the high SAI notifications from libsai, causes memory buffer increase on database redis.
The following HLD brings in link dampning which can help reducing link flap notifications:
Link event damping HLD by Ashish1805 · Pull Request #1071 · sonic-net/SONiC
Steps to Reproduce
High rate link flaps
Actual Behavior and Expected Behavior
The system memory usage should not increase alarming and the system should be able to handle the scenario without melt down.
Relevant log output
Output of show version, show techsupport
Attach files (if any)
No response
Is it platform specific
generic
Importance or Severity
Critical
Description of the bug
We have observed high memory usage by swss when link flaps very fast and if continued for long duration, causes memory exhaustion leading to Kernel panic due to OOM. In some circumstances as CPU load increases, this results in swss abort due to SAI delays and recovering the memory.
There are few PRs in community towards this and need some traction:
[swss-common] Enhanced NotificationConsumer queue to avoid memory lea… by yongxin-acctoncn · Pull Request #989 · sonic-net/sonic-swss-common
[swss] Notifier drains all notification messages to avoid memory leaks in some cases by yongxin-acctoncn · Pull Request #3560 · sonic-net/sonic-swss
These two PRs help handling memory at swss but due to the high SAI notifications from libsai, causes memory buffer increase on database redis.
The following HLD brings in link dampning which can help reducing link flap notifications:
Link event damping HLD by Ashish1805 · Pull Request #1071 · sonic-net/SONiC
Steps to Reproduce
High rate link flaps
Actual Behavior and Expected Behavior
The system memory usage should not increase alarming and the system should be able to handle the scenario without melt down.
Relevant log output
Output of
show version,show techsupportAttach files (if any)
No response