Huge pages

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Wed Apr 10 00:27:19 PDT 2013


Hi,

in zero, compressedOops are not supportead as far as I know:

arguments.cpp

#ifdef CC_INTERP
  // Clear flags not supported by the C++ interpreter
  FLAG_SET_DEFAULT(ProfileInterpreter, false);
  FLAG_SET_DEFAULT(UseBiasedLocking, false);
  LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false));
  LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedKlassPointers, false));
#endif // CC_INTERP

Zero uses the C++ Interpreter.
In our port we enabled the C++ Interpreter to deal with compressed Oops.

Best regards,
  Goetz.

-----Original Message-----
From: ppc-aix-port-dev-bounces at openjdk.java.net [mailto:ppc-aix-port-dev-bounces at openjdk.java.net] On Behalf Of Tiago Stürmer Daitx
Sent: Dienstag, 9. April 2013 23:03
To: Volker Simonis
Cc: ppc-aix-port-dev at openjdk.java.net
Subject: Re: Huge pages

On Tue, 2013-04-09 at 19:21 +0200, Volker Simonis wrote:
> I can only imagine that your problem may be perhaps related to the use
> of compressed pointers (-XX:+UseCompressedOops) which is on by default
> for our port but off by default for the Zero-VM. As far as I can see,
> this can lead to a situation where different base addresses are tried
> for the allocation of the heap and where you may get such a warning
> although the actual allocation will later succeed for another heap
> address. But that's only a vague guess. Nevertheless you could try out
> if switching compressed pointers off (with -XX:-UseCompressedOops)
> will change something.

You nailed it. Disabling CompressedOops now enables the JVM to make use
of hugepages.

BTW the Zero VM does work with huge pages when CompressedOops is on (or
off, it doesn't matter).

> Can you please also run your java commands (both the port and the
> zero-vm) under 'strace -f -e trace=ipc' like this:
> 
> strace -f -e trace=ipc java  -XX:+UseConcMarkSweepGC -XX:
> +UseLargePages -XX:+UseSHM -Xmx756m -version
> 
> and post the IPC-relevant output for further investigation.


Zero VM (note: CompressedOops does not matter, the output is the same
but for the shmid)

[pid 40776] shmget(IPC_PRIVATE, 872415232, IPC_CREAT|SHM_HUGETLB|0600) =
458752
[pid 40776] shmat(458752, 0, 0)         = 0x3effcc000000
[pid 40776] shmctl(458752, IPC_RMID, 0) = 0


PPC (CompressedOops disabled)

[pid 40970] shmget(IPC_PRIVATE, 872415232, IPC_CREAT|SHM_HUGETLB|0600) =
524288
[pid 40970] shmat(524288, 0, 0)         = 0x3effcc000000
[pid 40970] shmctl(524288, IPC_RMID, 0) = 0


PPC (CompressedOops enabled)

[pid 41025] shmget(IPC_PRIVATE, 872415232, IPC_CREAT|SHM_HUGETLB|0600) =
557056
[pid 41025] shmat(557056, 0xcc000000, 0) = 0xcc000000
[pid 41025] shmctl(557056, IPC_RMID, 0) = 0




I did some additional testing with hugetlbfs and I'm able to use
hugepages on both PPC and Zero VM (with CompressedOops either on or off)
by running:

HUGETLB_PATH=/var/lib/hugetlbfs/global/pagesize-16MB hugectl
--force-preload --shm java -XX:+UseConcMarkSweepGC -XX:+UseLargePages
-XX:+UseSHM -Xmx756
m -showversion -jar SPECjvm2008.jar -wt 120 -it 300 --parseJvmArgs -i 1
--peak


Neither Zero VM nor PPC works with +UseHugeTLBFS though (even when
running hugeadm without --shm).

The only additional setting (besides yours) that I had to do was to run
"hugepages --create-global-mounts" (I used global mounts for simplicity,
any mount my user had access to would suffice).

Let me know if you need anything else. =)

Regards,
Tiago

-- 
Tiago Stürmer Daitx
tdaitx at linux.vnet.ibm.com
IBM - Linux Technology Center



More information about the ppc-aix-port-dev mailing list