ES seen to allocate more memory outside ES_HEAP_SIZE using "top"

I have a test Logstash setup feeding ES 2800 log/s. Total server memory
is 8G. ES_HEAP_SIZE is set to 3072m. After 6 hours
into import ES - as from 'top' - is seen to use 4.1G while BigDesk only
reports a "used" of 1.1G from the total HEAP of
"committed" of 2.9G. Please find the attached image. Why is this wide
variation in statistics? I'm unable to make up the
real memory usage of ES. Additional info that may help:

ES = v0.90.0
OS = Debian 6
Java = OpenJDK 6

Issue-relevant ES settings:

index.number_of_shards: 1
index.number_of_replicas: 0

index.translog.flush_threshold_ops: 50000
indices.memory.index_buffer_size: 40%

indices.store.throttle.type: merge
indices.store.throttle.max_bytes_per_sec: 5mb

index.fielddata.cache: soft
index.store.type: mmapfs
index.fielddata.cache.size: 20%

bootstrap.mlockall: true
ES_HEAP_SIZE=3072m
ES_DIRECT_SIZE=3072m
MAX_OPEN_FILES=65535
MAX_LOCKED_MEMORY=unlimited

Only 1 index template for Logstash indices only:

 curl -XPUT http://localhost:9200/_template/loggerstash 

http://10.0.4.24:9200/_template/loggerstash -d ' {

 "template" : "logstash*",
 "settings" : { "number_of_shards" : 1,
  "index.refresh_interval" : "10s",
  "index.store.compress.stored" : true }
  }'

If "top" is right, how to tackle this ever growing memory usage? If
not, how to deduce the real memory usage?

Re,

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Is the memory usage really 'growing' ?? Linux uses all free memory as
buffer cache to speed up disk reading, and the memory is freed/used when a
process actually needs it. The TOP is showing higher memory number because
Linux probably is caching some ES stuff in memory . Just from experience, I
would say don't worry about TOP showing little higher memory for the
process than ES_HEAP_SIZE.

1.1 GB is the current heap being used, while 3 GB is the max memory
committed to jvm . I'd say treat the ES_HEAP_SIZE as your true memory
usage, and think about increasing memory if you heap_used gets close to
heap_committed.

On Sunday, May 5, 2013 11:32:18 AM UTC-4, vims wrote:

I have a test Logstash setup feeding ES 2800 log/s. Total server memory
is 8G. ES_HEAP_SIZE is set to 3072m. After 6 hours
into import ES - as from 'top' - is seen to use 4.1G while BigDesk only
reports a "used" of 1.1G from the total HEAP of
"committed" of 2.9G. Please find the attached image. Why is this wide
variation in statistics? I'm unable to make up the
real memory usage of ES. Additional info that may help:

ES = v0.90.0
OS = Debian 6
Java = OpenJDK 6

Issue-relevant ES settings:

index.number_of_shards: 1
index.number_of_replicas: 0

index.translog.flush_threshold_ops: 50000
indices.memory.index_buffer_size: 40%

indices.store.throttle.type: merge
indices.store.throttle.max_bytes_per_sec: 5mb

index.fielddata.cache: soft
index.store.type: mmapfs
index.fielddata.cache.size: 20%

bootstrap.mlockall: true
ES_HEAP_SIZE=3072m
ES_DIRECT_SIZE=3072m
MAX_OPEN_FILES=65535
MAX_LOCKED_MEMORY=unlimited

Only 1 index template for Logstash indices only:

curl -XPUT http://localhost:9200/_template/loggerstash<http://10.0.4.24:9200/_template/loggerstash>-d '   {                              
                                                  
"template" : 

"logstash*",
"settings" : { "number_of_shards" : 1,
"index.refresh_interval" : "10s",
"index.store.compress.stored" : true }
}'

If "top" is right, how to tackle this ever growing memory usage? If not,
how to deduce the real memory usage?

Re,

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Note, the heap size and the direct memory are different parameters, you
have assigned 2 * 3072m to ES which is total of ~6 G.

In most cases you do not need to set ES_DIRECT_SIZE because OS is
handling it well enough.

Jörg

Am 05.05.13 17:32, schrieb sub:

ES_HEAP_SIZE=3072m
ES_DIRECT_SIZE=3072m

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.