Skip to content

fix: use .PhysicalAvailableMemory instead of PhysicalFreeMemory to show memory usage#6216

Merged
JanDeDobbeleer merged 7 commits intoJanDeDobbeleer:nextfrom
Edu4rdSHL:fix-memory-metric
Mar 3, 2025
Merged

fix: use .PhysicalAvailableMemory instead of PhysicalFreeMemory to show memory usage#6216
JanDeDobbeleer merged 7 commits intoJanDeDobbeleer:nextfrom
Edu4rdSHL:fix-memory-metric

Conversation

@Edu4rdSHL
Copy link
Copy Markdown
Contributor

Prerequisites

  • I have read and understood the contributing guide.
  • The commit message follows the conventional commits guidelines.
  • Tests for the changes have been added (for bug fixes / features).
  • Docs have been added/updated (for bug fixes / features).

Description

When showing memory usage, what you want to know is the really used memory, which doesn't include cached memory; cache memory can be claimed by the kernel under memory pressure.

The Linux kernel will try to use as much cache as possible by default, but that doesn't mean that the RAM is not available. This PR fixes that and shows only the real used memory.

allcontributors bot and others added 7 commits March 1, 2025 17:12
…o show memory usage

When showing memory usage, what you want to know is the really **used** memory, which doesn't include cached memory; cache memory can be claimed by the kernel under memory pressure.

The Linux kernel will try to use as much cache as possible by default, but that doesn't mean that the RAM is not available. This PR fixes that and shows only the real used memory.
@JanDeDobbeleer JanDeDobbeleer changed the base branch from main to next March 3, 2025 11:56
@JanDeDobbeleer JanDeDobbeleer merged commit 230e645 into JanDeDobbeleer:next Mar 3, 2025
12 checks passed
@JanDeDobbeleer
Copy link
Copy Markdown
Owner

@all-contributors please add @Edu4rdSHL for design,doc

This is pure magic 🪄! @holopin-bot @Edu4rdSHL wizard

@holopin-bot
Copy link
Copy Markdown

holopin-bot bot commented Mar 3, 2025

Congratulations @Edu4rdSHL, the maintainer of this repository has issued you a badge! Here it is: https://holopin.io/claim/cm7t090hv18200cl8clfug1ew

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

@allcontributors
Copy link
Copy Markdown
Contributor

@JanDeDobbeleer

I've put up a pull request to add @Edu4rdSHL! 🎉

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.

2 participants