Integrated: 8341334: CDS: Parallel relocation
Aleksey Shipilev
shade at openjdk.org
Tue Nov 19 08:47:55 UTC 2024
On Wed, 2 Oct 2024 10:45:14 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> In Leyden performance investigations, we have figured that `ArchiveRelocationMode=0` is saving 5..7 ms on HelloWorld startup. Mainline defaults to `ARM=1`, _losing_ as much. `ARM=0` was switched to `ARM=1` with [JDK-8294323](https://github.com/openjdk/jdk/commit/be70bc1c58eaec876aa1ab36eacba90b901ac9b8), which was delivered to JDK 17+ in in Apr 2023.
>
> Profiling shows we spend time mem-faulting the memory loading the RO/RW regions, about 15 MB total. 15 MB in 5ms amounts to >4GB/sec, close to the single-threaded limits. I suspect the impact is larger if we relocate larger Metaspace, e.g. after dumping a CDS archive from a large application. There is little we can do to make the actual relocation part faster: the overwhelming majority of samples is on kernel side.
>
> This PR implements the infrastructure for fast archive workers, and leverages it to perform parallel core regions relocation. The RW/RO regions this code traverses is large, and we can squeeze more performance by parallelizing it.
>
> (I'll put some performance data in the comments)
>
> Additional testing:
> - [x] Linux x86_64 server fastdebug, `runtime/cds`
> - [x] Linux AArch64 server fastdebug, `all`
This pull request has now been integrated.
Changeset: 76a55c3c
Author: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/76a55c3cb6e5177442f355ae1036db4fbf8e54af
Stats: 327 lines in 6 files changed: 324 ins; 0 del; 3 mod
8341334: CDS: Parallel relocation
Reviewed-by: iklam, adinn, stuefe
-------------
PR: https://git.openjdk.org/jdk/pull/21302
More information about the hotspot-runtime-dev
mailing list