Re: RFR: 8284950: CgroupV1 detection code should consider memory.swappiness [v16]
On Thu, 12 May 2022 09:50:39 GMT, xpbob wrote: >> set memory.swappiness to 0,swap space will not be used >> determine the value of memory.swappiness >> https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt >> >> >> Memory Limit: 50.00M >> Memory Soft Limit: Unlimited >> Memory & Swap Limit: 100.00M >> Maximum Processes Limit: 4194305 >> >> => >> >> Memory Limit: 50.00M >> Memory Soft Limit: Unlimited >> Memory & Swap Limit: 50.00M >> Maximum Processes Limit: 4194305 > > xpbob has updated the pull request incrementally with one additional commit > since the last revision: > > add swap method This looks good. I think the only thing missing is a test for the JDK side. Perhaps write one using the `OperatingSystemMXBean`'s `getTotalSwapSpaceSize()` method within a container with `--memory=200m --memory-swap=250m` and using `--memory-swappiness=0`. You could use `test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java` and `CheckOperatingSystemMXBean.java` as a model. Again a cgroupsv1 specific test. - PR: https://git.openjdk.java.net/jdk/pull/8285
Re: RFR: 8284950: CgroupV1 detection code should consider memory.swappiness [v16]
> set memory.swappiness to 0,swap space will not be used > determine the value of memory.swappiness > https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt > > > Memory Limit: 50.00M > Memory Soft Limit: Unlimited > Memory & Swap Limit: 100.00M > Maximum Processes Limit: 4194305 > > => > > Memory Limit: 50.00M > Memory Soft Limit: Unlimited > Memory & Swap Limit: 50.00M > Maximum Processes Limit: 4194305 xpbob has updated the pull request incrementally with one additional commit since the last revision: add swap method - Changes: - all: https://git.openjdk.java.net/jdk/pull/8285/files - new: https://git.openjdk.java.net/jdk/pull/8285/files/abd5a2b4..296a409e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8285&range=15 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8285&range=14-15 Stats: 21 lines in 2 files changed: 16 ins; 1 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8285.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8285/head:pull/8285 PR: https://git.openjdk.java.net/jdk/pull/8285
Re: RFR: 8284950: CgroupV1 detection code should consider memory.swappiness [v16]
On Thu, 12 May 2022 09:50:39 GMT, xpbob wrote: >> set memory.swappiness to 0,swap space will not be used >> determine the value of memory.swappiness >> https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt >> >> >> Memory Limit: 50.00M >> Memory Soft Limit: Unlimited >> Memory & Swap Limit: 100.00M >> Maximum Processes Limit: 4194305 >> >> => >> >> Memory Limit: 50.00M >> Memory Soft Limit: Unlimited >> Memory & Swap Limit: 50.00M >> Maximum Processes Limit: 4194305 > > xpbob has updated the pull request incrementally with one additional commit > since the last revision: > > add swap method Thanks for review. @jerboaa I recently had a minor operation, so I couldn't get back on time. Read values in different places, I added a method read_mem_swappiness Is that possible? - PR: https://git.openjdk.java.net/jdk/pull/8285