Skip to content

[mem][linux] Expose oom_kill as part of SwapMemory#1782

Closed
sfc-gh-smatejczyk wants to merge 1 commit intoshirou:masterfrom
sfc-gh-smatejczyk:szymon-add-oom-kill
Closed

[mem][linux] Expose oom_kill as part of SwapMemory#1782
sfc-gh-smatejczyk wants to merge 1 commit intoshirou:masterfrom
sfc-gh-smatejczyk:szymon-add-oom-kill

Conversation

@sfc-gh-smatejczyk
Copy link
Copy Markdown

oom_kill from /proc/vmstat represents the number of times OOM Killer killed a process.

This PR proposes a simplistic approach to exposing it. Specifically, it includes the value of the counter in SwapMemoryStat (for linux only).

Alternatively, we could expose it in the VirtualMemoryStat object, where it seems to fit better. However, this will require opening /proc/vmstat for VirtualMemory call. Currently, VirtualMemory opens only /proc/meminfo, so that will be some overhead.

Another approach would be to expose memory events as another struct and create a specific call for it.

Please advice.

oom_kill from `/proc/vmstat` represents the number of times OOM Killer killed a process. It's useful to debug process memory issues.
@sfc-gh-smatejczyk sfc-gh-smatejczyk changed the title Expose oom_kill as part of SwapMemory [mem] Expose oom_kill as part of SwapMemory Jan 29, 2025
@sfc-gh-smatejczyk sfc-gh-smatejczyk changed the title [mem] Expose oom_kill as part of SwapMemory [mem][linux] Expose oom_kill as part of SwapMemory Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants