Re: RFR: JDK-8324287: Record total and free swap space in JFR [v7]
Total and free swap space should be recorded in JFR, because it is important to know e.g. in case of memory shortages.
Currently we only have a container related event (ContainerMemoryUsage) that provides some info but no general event. PhysicalMemory could be enhanced or a new event added.
There is already some coding (see Java_com_sun_management_internal_OperatingSystemImpl_getTotalSwapSpaceSize0 and Java_com_sun_management_internal_OperatingSystemImpl_getFreeSwapSpaceSize0) for the swap space info retrieval.
Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Adjust test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/17581/files - new: https://git.openjdk.org/jdk/pull/17581/files/ca81d40a..94878ea0 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=17581&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=17581&range=05-06 Stats: 11 lines in 1 file changed: 10 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/17581.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/17581/head:pull/17581 PR: https://git.openjdk.org/jdk/pull/17581
On Wed, 31 Jan 2024 11:48:05 GMT, Matthias Baesken <mbaesken@openjdk.org> wrote:
Total and free swap space should be recorded in JFR, because it is important to know e.g. in case of memory shortages.
Currently we only have a container related event (ContainerMemoryUsage) that provides some info but no general event. PhysicalMemory could be enhanced or a new event added.
There is already some coding (see Java_com_sun_management_internal_OperatingSystemImpl_getTotalSwapSpaceSize0 and Java_com_sun_management_internal_OperatingSystemImpl_getFreeSwapSpaceSize0) for the swap space info retrieval.
Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
Adjust test
Looks good now. ------------- Marked as reviewed by lucy (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/17581#pullrequestreview-1856404170
On Wed, 31 Jan 2024 11:48:05 GMT, Matthias Baesken <mbaesken@openjdk.org> wrote:
Total and free swap space should be recorded in JFR, because it is important to know e.g. in case of memory shortages.
Currently we only have a container related event (ContainerMemoryUsage) that provides some info but no general event. PhysicalMemory could be enhanced or a new event added.
There is already some coding (see Java_com_sun_management_internal_OperatingSystemImpl_getTotalSwapSpaceSize0 and Java_com_sun_management_internal_OperatingSystemImpl_getFreeSwapSpaceSize0) for the swap space info retrieval.
Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
Adjust test
Thanks for the reviews! The container related free swap space could be addressed in a follow-up. ------------- PR Comment: https://git.openjdk.org/jdk/pull/17581#issuecomment-1921256576
On Thu, 1 Feb 2024 12:49:32 GMT, Matthias Baesken <mbaesken@openjdk.org> wrote:
The container related free swap space could be addressed in a follow-up.
@MBaesken Please file a bug for this follow-up. Thank you! ------------- PR Comment: https://git.openjdk.org/jdk/pull/17581#issuecomment-1921620063
On Thu, 1 Feb 2024 15:42:10 GMT, Severin Gehwolf <sgehwolf@openjdk.org> wrote:
The container related free swap space could be addressed in a follow-up.
@MBaesken Please file a bug for this follow-up. Thank you!
Hi Severin I created https://bugs.openjdk.org/browse/JDK-8325139 JFR SwapSpace event - add free swap space information on Linux when running in a container environment please comment on the JBS issue if you have good info regarding the topic ... ------------- PR Comment: https://git.openjdk.org/jdk/pull/17581#issuecomment-1921709712
participants (3)
-
Lutz Schmidt
-
Matthias Baesken
-
Severin Gehwolf