Need Information for memory sharing with AppCDS
Jiangli Zhou
jianglizhou at google.com
Mon Mar 9 16:44:36 UTC 2020
Hi,
On Sun, Mar 8, 2020 at 8:51 PM 向伟(识月) <shiyue.xw at alibaba-inc.com> wrote:
>
> Hi,
>
> We am trying to take advantage of the characteristics of memory sharing with AppCDS, and we expected that the
> JVM internal packages and common packages can be shared with AppCDS.
>
> In the user scenario, there are some common base packages for different Java processes with "-cp common_path"
> Process A: -cp common_path:pathA
> Process B: -cp common_path:pathA:pathB
> Process C: -cp common_path:pathC
>
> I check the code in JDK11, and it uses SharedPathsMiscInfo to do the consistency check for class path.
> The below usage can work in JDK11
> Dump stage:
> -cp common_path
>
> Runtime stage:
> -cp common_path:new_path
>
> But I find that SharedPathsMiscInfo has been removed in the latest JDK code.
>
> I need the information:
> 1. the new flow to do the consistency check.
The check now uses the shared classpath table only,
FileMapInfo::validate_shared_path_table(). SharedPathsMiscInfo was a
redundant data structure, henenced removed.
> 2. constraint condition about the memory sharing among the different Java processes.
Memory sharing can only be achieved when the same archive file is
memory mapped in different JVM processes running the same JVM
binaries. What I've found was that in some cloud environments,
different copies of the same shared archive file might be used for
different containers and therefore disabled the sharing. Oftentimes,
that's intentional.
Best,
Jiangli
>
> Is there any user guide to use the memory sharing feature for AppCDS?
>
> Thanks,
> Wei Xiang
More information about the hotspot-runtime-dev
mailing list