I have a java application, which is run with following settings:
/usr/bin/java ... -XX:+UseG1GC -Xms18G -Xmx22G ...
At the same time I can see that java binary uses 27617528 of RSS (32453352 virt) on server.
Why it's so and how can I limit java memory for sure?