In the settings YaCy (admin console - basic configuration - performance - memory settings) i set limit the "Memory reserved for the JVM" in size 2000MB. But actually, the process uses is much more than 2000MB. Sometimes almost twice.

Steps To Reproduce

1. In the settings YaCy (admin console - basic configuration - performance - memory settings) i set limit the "Memory reserved for the JVM" in size 2000MB.
2. Restart Yacy
3. After some time, check status memory through htop or ubuntu system monitor and see that it is more increased.

the behavior you described looks ok to me.
You have a java process for YaCy that holds 6854M of virtual RAM, which doesn't need to be physical avalable. It is just a address-space to reach the index.
The Process holds 2261M reserved RAM, which is the real physical allocated RAM.

The Label 'Memory reserved for JVM' is not 100% correct. It means Heap-Memory for the JVM - because this is the parameter to configure on a JVM.
There are some other, smaler Memory-Types used by the JVM, that make the difference to your configured 2000M.

releasing Heap is not realypossible.
But You can try the following:
Shut down YaCy.
Open DATA/SETTINGS/yacy.conf in a text-editor.
Search for an entry of 'Xms' an change it to a lower value - maybe 1000m
Start YaCy again.

The Heap of a JVM has 2 parameters - Xmx (maximum Heap) and Xms (minimum Heap)
The Heap will start at a value of Xms an grow as needed up to Xms.
Usally it should also shrink if less Heap-Memory is needed, but shrinking does not work as fast as growing :-)

Using different values for Xms and Xmx has some cost in resources for this management - thats why it is not anabled by default.

Changing the 'Memory reserved for JVM' in the gui will overwrite Xms and Xmx to the new value.