I have java web (tomcat) application that consumes 10G of heap memory (represent data structure in memory). But it works when I will set e.g. Xmx to 20G.
When I set heap memory e.g. to 11G my application can not load all data - it enters in continuous full gc. Suppose that garbage collector also need memory to make full gc efficient. Does it correct? How much memory I should add for efficent work of gc? Thanks.