How is JVM memory usage calculated
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm tuning my elastic search cluster and see that the memory usage doesn't line up.
Running "free
" on my instance:
free
total used free shared buff/cache available
Mem: 30881324 17072320 238216 49736 13570788 13313528
Swap: 0 0 0
We see that there is 30GB
on the machine.
ES was tuned to use 50% of available memory (or max 30GB for oop reasons)
And I can verify here the -Xms
and -Xmx
flags are set to 15078m
:
/bin/java -Xms15078m -Xmx15078m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -XX:+HeapDumpOnOutOfMemoryError -Des.path.home=/usr/share/elasticsearch -Des.path.conf=/etc/elasticsearch -Des.distribution.flavor=default -Des.distribution.type=rpm -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -p /var/run/elasticsearch/elasticsearch.pid --quiet
But when running "top" we see a different story.
%MEM
is at 59%
, many times will show 85%
or more (triggering nagios alerts):
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24366 elastic+ 20 0 54.9g 17.5g 1.6g S 267.7 59.3 1849:57 java
memory java elasticsearch
add a comment |Â
up vote
0
down vote
favorite
I'm tuning my elastic search cluster and see that the memory usage doesn't line up.
Running "free
" on my instance:
free
total used free shared buff/cache available
Mem: 30881324 17072320 238216 49736 13570788 13313528
Swap: 0 0 0
We see that there is 30GB
on the machine.
ES was tuned to use 50% of available memory (or max 30GB for oop reasons)
And I can verify here the -Xms
and -Xmx
flags are set to 15078m
:
/bin/java -Xms15078m -Xmx15078m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -XX:+HeapDumpOnOutOfMemoryError -Des.path.home=/usr/share/elasticsearch -Des.path.conf=/etc/elasticsearch -Des.distribution.flavor=default -Des.distribution.type=rpm -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -p /var/run/elasticsearch/elasticsearch.pid --quiet
But when running "top" we see a different story.
%MEM
is at 59%
, many times will show 85%
or more (triggering nagios alerts):
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24366 elastic+ 20 0 54.9g 17.5g 1.6g S 267.7 59.3 1849:57 java
memory java elasticsearch
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm tuning my elastic search cluster and see that the memory usage doesn't line up.
Running "free
" on my instance:
free
total used free shared buff/cache available
Mem: 30881324 17072320 238216 49736 13570788 13313528
Swap: 0 0 0
We see that there is 30GB
on the machine.
ES was tuned to use 50% of available memory (or max 30GB for oop reasons)
And I can verify here the -Xms
and -Xmx
flags are set to 15078m
:
/bin/java -Xms15078m -Xmx15078m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -XX:+HeapDumpOnOutOfMemoryError -Des.path.home=/usr/share/elasticsearch -Des.path.conf=/etc/elasticsearch -Des.distribution.flavor=default -Des.distribution.type=rpm -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -p /var/run/elasticsearch/elasticsearch.pid --quiet
But when running "top" we see a different story.
%MEM
is at 59%
, many times will show 85%
or more (triggering nagios alerts):
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24366 elastic+ 20 0 54.9g 17.5g 1.6g S 267.7 59.3 1849:57 java
memory java elasticsearch
I'm tuning my elastic search cluster and see that the memory usage doesn't line up.
Running "free
" on my instance:
free
total used free shared buff/cache available
Mem: 30881324 17072320 238216 49736 13570788 13313528
Swap: 0 0 0
We see that there is 30GB
on the machine.
ES was tuned to use 50% of available memory (or max 30GB for oop reasons)
And I can verify here the -Xms
and -Xmx
flags are set to 15078m
:
/bin/java -Xms15078m -Xmx15078m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -XX:+HeapDumpOnOutOfMemoryError -Des.path.home=/usr/share/elasticsearch -Des.path.conf=/etc/elasticsearch -Des.distribution.flavor=default -Des.distribution.type=rpm -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -p /var/run/elasticsearch/elasticsearch.pid --quiet
But when running "top" we see a different story.
%MEM
is at 59%
, many times will show 85%
or more (triggering nagios alerts):
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24366 elastic+ 20 0 54.9g 17.5g 1.6g S 267.7 59.3 1849:57 java
memory java elasticsearch
memory java elasticsearch
asked Aug 7 at 7:44
Avner Barr
1011
1011
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460987%2fhow-is-jvm-memory-usage-calculated%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password