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

cgroupv2: fix swap accounting #3001

Merged
merged 1 commit into from
Nov 9, 2021

Commits on Nov 2, 2021

  1. cgroupv2: fix swap accounting

    Since runsc v1.0.0-rc94 `stats.MemoryStats.SwapUsage` on cgroupv2 includes memory usage:
    
    * opencontainers/runc@b99ca25ad0f
    
    This results in wrong metrics:
    
    ```
    container_memory_rss{id="/system.slice/qs-dnsv2.service"} 9.173716992e+09 1635890983582
    container_memory_swap{id="/system.slice/qs-dnsv2.service"} 1.249011712e+10 1635890983582
    container_memory_usage_bytes{id="/system.slice/qs-dnsv2.service"} 1.249011712e+10 1635890983582
    ```
    
    Here my service dosn't have any swapped pages, yet it reports all memory as swapped.
    bobrik committed Nov 2, 2021
    Configuration menu
    Copy the full SHA
    ef98eb4 View commit details
    Browse the repository at this point in the history