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

feat(system_monitor): add diagnostic feature for monitoring swap usage #1661

Open
wants to merge 5 commits into
base: beta/v0.3.20.1
Choose a base branch
from

Conversation

ito-san
Copy link

@ito-san ito-san commented Nov 24, 2024

Description

In the cargo project, it is said that "swap occurring indicates a problem," so the request is to trigger a warning when swap happens.
When the threshold is exceeded, a warning or error will be triggered.

Related links

Parent Issue:

How was this PR tested?

  1. Enable and configure a 1GB swap file with high swappiness.

    sudo fallocate -l 1G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    sudo sysctl vm.swappiness=100
  2. Launch system_monitor. Verify that no error messages related to 'mem_monitor after launching.
    image

  3. Use a tool like stress to apply load on the memory and make the system use swap.

    ex.) stress --vm 1 --vm-bytes 11900M --timeout 60s
  4. Verify that warning is triggered when the threshold for warning is exceeded.
    image

  5. Verify that error is triggered when the threshold for error is exceeded.
    image

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@ito-san ito-san added enhancement New feature or request component:system labels Nov 24, 2024
@ito-san ito-san requested a review from TetsuKawa November 24, 2024 14:52
@ito-san ito-san self-assigned this Nov 24, 2024
@ito-san ito-san changed the title Feat/swap warning feat(system_monitor): add diagnostic feature for monitoring swap usage Nov 24, 2024
Copy link

@TetsuKawa TetsuKawa left a comment

Choose a reason for hiding this comment

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

LGTM!

My old branches have been put to rest. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:system enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants