Locked memory exceeded

Curious how this is happening:

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND 105 27647 124 93.5 409500956 15397724 ? SLl 21:52 72:26 /usr/lib/jvm/java-7-oracle/bin/java -Xms10g -Xmx10g -Xss256k <snip>

I've got 20GB of RAM, ES_HEAP_SIZE set to 10g and using mlockall. So how could ES be using 15GB?

That's not heap, that's virtual memory.

So it's normal / expected? I've been using ES in a few places for a few months now under pretty heavy use and haven't seen it go over the allocated 50% til now. The column I'm looking at is RSS btw.

Yeah don't worry too much, it's just the OS caching file that ES uses. This is why we recommend giving 50% of system RAM to it, it allows the OS to do this to make things fast.

So maybe I've misunderstood. I thought the main reason to keep heap size under ~50% of available RAM was because the OS filesystem cache only uses available ie free, unused memory for the filesystem cache, and further that the OS filesystem cache will never ever show up as part of the memory used by the ES java process.