RFR: 8327946: containers/docker/TestJFREvents.java fails when host kernel config vm.swappiness=0 after JDK-8325139 [v2]
SendaoYan
syan at openjdk.org
Thu Apr 11 15:23:55 UTC 2024
> Hi,
>
> According to the [docker document](https://docs.docker.com/config/containers/resource_constraints/#--memory-swappiness-details), the default value of --memory-swappiness is inherited from the host machine. So, when the the kernel config vm.swappiness=0 on the host machine, this testcase will fail, because of docker container can not use swap memory, the deafult value of --memory-swappiness is 0.
>
> When the host kernel config "vm.swappiness = 0", In order to run this testcase passed , there are three methods:
>
> 1. change `.shouldContain("totalSize = " + expectedTotalValue)` to `.shouldContain("totalSize = "`, which ignored the `expectedTotalValue`, because the `expectedTotalValue` could be 0(swap memroy is disable when --memory-swappiness=0) or could be 104857600(300MB-200MB=100MB), it depends on the host machine config `vm.swappiness`
> 2. Change the default `--memory-swappiness` 0 to non-zero, such as 60.
> 3. Change the host kernel config `vm.swappiness=0` to `vm.swappiness=60`. I think it's not a good idea.
>
> Maybe the 2rd method seems more resonable.
>
>
> Thanks,
> -sendao
SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
add a space before //
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/18225/files
- new: https://git.openjdk.org/jdk/pull/18225/files/480f3364..4a9f3881
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=18225&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=18225&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/18225.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18225/head:pull/18225
PR: https://git.openjdk.org/jdk/pull/18225
More information about the hotspot-dev
mailing list