Elasticsearch overcommit (VSZ) 300-900%


I dont know why i have very high VSZ (virtual memory size) ~ 800-900%, heap 4gb in settings

 PID  PPID CMD                                           RSS    VSZ %MEM %CPU
11554     1 /usr/bin/java -Xms4g -Xmx4g java            4974936 46637680 36.3 0.0

I'm use LXD container with ubuntu 18.04 with limit to resources -- 13gb Ram and 4 core

Elasticsearch version 6.6.0

Configs JVM for Elastic
cat /etc/elasticsearch/jvm.options



















cat /proc/meminfo

MemTotal:       13671872 kB
MemFree:         4857240 kB
MemAvailable:    6115816 kB
Buffers:               0 kB
Cached:          1258576 kB
SwapCached:            0 kB
Active:          8171968 kB
Inactive:         464476 kB
Active(anon):    7367932 kB
Inactive(anon):      124 kB
Active(file):     804036 kB
Inactive(file):   464352 kB
Unevictable:           0 kB
Mlocked:        33652304 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:              2772 kB
Writeback:             0 kB
AnonPages:      73933548 kB
Mapped:          3917012 kB
Shmem:              9500 kB
Slab:               0 kB
SReclaimable:          0 kB
SUnreclaim:            0 kB
KernelStack:      125056 kB
PageTables:       288648 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    157965700 kB
Committed_AS:   122171068 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:    512000 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:     2520896 kB
DirectMap2M:    109289472 kB
DirectMap1G:    24117248 kB

cat /proc/sys/vm/overcommit_ratio

cat /proc/sys/vm/overcommit_memory

That all looks fairly normal to me. What is your question?

why ES use 46637680 VSZ?
in the HTOP --- 44.5G VIRT

my heap size only 4Gb


VSZ includes lots of things that aren't on the heap (or even in-memory) -- libraries, memory-mapped indices, and so on. It doesn't relate to the memory usage of the process, if that's what you are asking.

thank for answer

can i reduce this VSZ size used by ES?

Hello, 111266.
I've earlier posted one advice Is there a way to limit RES memory used by ES however I've found that it might be hard to get a point.

Not really, but I'm not really understanding why you want to do this. Virtual memory isn't really a limited resource.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.