-
Notifications
You must be signed in to change notification settings - Fork 495
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
(FACT-3149) Fix memory usage reporting on FreeBSD #2523
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Can one of the admins verify this patch? |
smortex
force-pushed
the
freebsd-available-memory
branch
from
December 31, 2022 21:11
a0b8214
to
09d2886
Compare
Rebased to fix conflicts |
smortex
force-pushed
the
freebsd-available-memory
branch
2 times, most recently
from
January 6, 2023 19:26
e584555
to
5bb267e
Compare
@smortex sorry for the delay, could you rebase on |
smortex
force-pushed
the
freebsd-available-memory
branch
from
September 16, 2023 03:09
5bb267e
to
173009d
Compare
@joshcooper rebased without conflict and CI is green! |
smortex
force-pushed
the
freebsd-available-memory
branch
from
September 25, 2023 17:56
173009d
to
fd03e81
Compare
I saw new required tests with jruby, so rebased on top of main to trigger a new run. |
smortex
force-pushed
the
freebsd-available-memory
branch
from
October 6, 2023 07:27
fd03e81
to
fc8e661
Compare
* In vmstat(8), "free memory" correspond to unused memory that does not contain any data, and does not include cache / inactive memory which has some data but is immediatly available to the system if memory is needed. Prefer to get active and wired memory page count form sysctl(3) which correpond to the used memory that can (active) and cannot (wired) be swapped out, and multiply these by the size of a memory page. This give a better overview of the current memory usage. * Prefer `vm.stats.vm.v_page_count` over `hw.physmem`: The available memory can be lower that what is physically present in the system and the free / used memory is a portion of the usable memory more than a portion of the physical memory.
smortex
force-pushed
the
freebsd-available-memory
branch
from
November 2, 2023 15:12
fc8e661
to
392cc65
Compare
Thank you @smortex! |
joshcooper
approved these changes
Nov 4, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
contain any data, and does not include cache / inactive memory which
has some data but is immediatly available to the system if memory is
needed.
Prefer to get active and wired memory page count form sysctl(3) which
correpond to the used memory that can (active) and cannot (wired) be
swapped out, and multiply these by the size of a memory page. This
give a better overview of the current memory usage.
vm.stats.vm.v_page_count
overhw.physmem
: The availablememory can be lower that what is physically present in the system and
the free / used memory is a portion of the usable memory more than a
portion of the physical memory.
Description of the sysctl entries:
vm.stats.vm.v_page_count
: Total number of pages in systemvm.stats.vm.v_active_count
: Active pagesvm.stats.vm.v_wire_count
: Wired pagesvm.stats.vm.v_page_size
: Page size in bytes