This content has been marked as final. Show 3 replies
The real-time VM uses page locking to avoid non-determinism due to swapping. This means that the real-time VM depends on free physical memory, not virtual memory.
The warning is telling you (not so clearly) that there was not enough free physical memory to lock the VM's pages. As a result you will incur swapping and you will run less deterministically.
In JRTS 2.2 we have changed the behaviour so that the inability to lock the VM into memory during startup causes immediate VM termination - with a suitable error message. If you are okay with running with swapping then you can specify -XX:-RTSJLockPagesInMemory to explicitly indicate that.
Determinism is an important issue in my application. That's why page locking should be active in my application. When I'm determining the ScopedMemory size via VM like:
Then page locking works with a size of 500 mb very well. But when I try to set the ScopedSize value to 1 gb, then the exception (unable to lock page...) is thrown. So it seems as if I had all the required rights, but the huge size is not supported.
... -XX:ScopedSize=500000000 ...
The System has about 6 gb of DDR2Ram and minimum 5 gb are free during starting the VM. So are there any other parameters except ScopedSize that I can change, to allow the VM to lock memory with a size of about 1 gb? Or where is the problem with locking such big sizes?
From what we have observed on Solaris the maximum physical memory that the 32-bit VM is able to get typically ranges from 2.5-3GB, even for system with >> 4GB of RAM. We don't know why this limitation seems to exist.
A key point with the scoped memory backing store size, ScopedSize, is that whatever value you specify on the command-line the VM has to grab twice that amount as internally we have to use a double-buffering scheme to allow scopes to be re-used while the GC is actively scanning them. Hence your 1GB becomes 2GB and combined with heap, immortal etc the total amount gets to the 2.5GB boundary.