This discussion is archived
3 Replies Latest reply: Apr 3, 2009 3:51 PM by 807557 RSS

Java Real-Time System HotSpot(TM) Client VM warning: unable to lock pages i

807557 Newbie
Currently Being Moderated
Error:

Java Real-Time System HotSpot(TM) Client VM warning: unable to lock pages into memory

I'm getting this error, although I have assigned all the needed privilegs to root and I am logged in as root. I have done everything described in the guidelines to get the privilegs, but still this warning occurs.
But my application still works completely with no appreciable differences.

So my question is: Does this warning affect the performance of my application?? Or can I live with this warning?

Gordon
  • 1. Re: Java Real-Time System HotSpot(TM) Client VM warning: unable to lock pag
    807557 Newbie
    Currently Being Moderated
    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.

    David Holmes
  • 2. Re: Java Real-Time System HotSpot(TM) Client VM warning: unable to lock pag
    807557 Newbie
    Currently Being Moderated
    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:
    ... -XX:ScopedSize=500000000 ...
    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.

    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?

    Thanks,
    Gordon
  • 3. Re: Java Real-Time System HotSpot(TM) Client VM warning: unable to lock pag
    807557 Newbie
    Currently Being Moderated
    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.

    David