Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return allocated memory with malloc_trim when queue is empty #960

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

theasianpianist
Copy link
Contributor

@theasianpianist theasianpianist commented Dec 11, 2024

When device is encountering rapid MAC moves, malloc_trim gets called anywhere from 50-300 times per second depending on MAC move rate.

When device is stable, malloc_trim gets called 5-10 times per hour in short bursts.

@mssonicbld
Copy link
Collaborator

/azp run

@theasianpianist theasianpianist marked this pull request as draft December 11, 2024 22:51
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny requested a review from qiluo-msft January 8, 2025 18:37
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Lawrence Lee <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Lawrence Lee <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Lawrence Lee <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Lawrence Lee <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Lawrence Lee <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@prsunny prsunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update description with stats of this api call in a stable system vs continuous notification scenario?

*
* Force the memory to be released by destroying existing queue and creating a new one.
*/
SWSS_LOG_DEBUG("%s queue is empty, calling malloc_trim()", m_channel.c_str());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this to INFO level?

Signed-off-by: Lawrence Lee <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@theasianpianist theasianpianist changed the title Recreate notification consumer queue when empty Return allocated memory with malloc_trim when queue is empty Jan 13, 2025
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants