How to really free up huge pages in Linux for use by the new process?

Really can't find much about this .. hope someone can help. I wind a bunch of 100 GB Java to serve as a large data cache. To avoid conflicts with things like the file system cache, and because it works better overall, I highlight this on large pages.

I reserved 51,200 x 2 MB huge pages, and it all started just fine. However, when I kill the process and restart, it looks like Linux leaves some of these pages as "rsvd".

# less /proc/meminfo | grep Hug
AnonHugePages:         0 kB
HugePages_Total:   52000
HugePages_Free:    50952
HugePages_Rsvd:     1634
HugePages_Surp:        0
Hugepagesize:       2048 kB

As far as I know, I have nothing else in the system configured to request or reserve these pages. Does Linux allow me to see what holds these reserved and / or invalid reservations?

Of all that I find Google, they are not actually used, just Linux keeps them in reserve, although it does not allow me to use them when restarting my huge JVM.

Any help would be great.

+3
source share
1 answer

You can probably force Java to reuse objects still in memory. However, starting the next one will remove this, and everything else is also saved and not used

echo 3 | sudo tee /proc/sys/vm/drop_caches 

- "" . - , ram linux

http://www.linuxatemyram.com/

. , , - ,

+1

Source: https://habr.com/ru/post/1656659/


All Articles