Max_file_descriptors - Value differs in log file and through API


(havetobe unknown) #1

Hello,

When I change the value for "max_file_descriptors" - say to 130000 for
example - using the MAX_OPEN_FILES variable in init script, I noticed a
strange behavior. The value dispalyed through API seems correct as shown
below (ES version is 0.90.5) :

curl -XGET 'http://localhost:9200/_nodes/_local?process=true&pretty=true'

{
"ok" : true,
"cluster_name" : "es-clust",
"nodes" : {
"5PHUSFl2TmW-3yCdisBWZg" : {
"name" : "es-01",
"transport_address" : "inet[/10.0.8.107:9300]",
"hostname" : "es-01",
"version" : "0.90.5",
"http_address" : "inet[/10.0.8.107:9200]",
"attributes" : {
"master" : "true"
},
"process" : {
"refresh_interval" : 1000,
"id" : 2633,
"max_file_descriptors" : 200000
}
}
}
}

At the same time, I set the -Des.max-open-files=true JVM option to have
the value written in ES log file. This doesn't return the same value :

[2013-12-19 10:14:28,614][INFO ][bootstrap ] max_open_files
[97518]

[2013-12-19 10:14:28,727][INFO ][node ] [es-01]
version[0.90.5], pid[2633], build[c8714e8/2013-09-17T12:50:20Z]
[2013-12-19 10:14:28,733][INFO ][node ] [es-01]
initializing ...
[2013-12-19 10:14:28,742][INFO ][plugins ] [es-01] loaded
[], sites [HQ, head]
[2013-12-19 10:14:31,431][INFO ][node ] [es-01]
initialized
[2013-12-19 10:14:31,431][INFO ][node ] [es-01]
starting ...
[2013-12-19 10:14:31,528][INFO ][transport ] [es-01]
bound_address {inet[/10.0.8.107:9300]}, publish_address
{inet[/10.0.8.107:9300]}
[2013-12-19 10:14:36,095][INFO ][cluster.service ] [es-01]
new_master
[es-01][5PHUSFl2TmW-3yCdisBWZg][inet[/10.0.8.107:9300]]{master=true},
reason: zen-disco-join (elected_as_master)
[2013-12-19 10:14:36,127][INFO ][discovery ] [es-01]
es-ket/5PHUSFl2TmW-3yCdisBWZg
[2013-12-19 10:14:36,131][INFO ][http ] [es-01]
bound_address {inet[/10.0.8.107:9200]}, publish_address
{inet[/10.0.8.107:9200]}
[2013-12-19 10:14:36,132][INFO ][node ] [es-01] started

I found that the value displayed in log file never gets higher than 97518.
If I set a value under this apparent "limit" - say 75000 for instance - the
result seems (nearly) correct in log file (as well as through the API) :

[2013-12-19 10:28:38,002][INFO ][bootstrap ] max_open_files
[74975]

[2013-12-19 10:28:38,128][INFO ][node ] [es-01]
version[0.90.5], pid[2835], build[c8714e8/2013-09-17T12:50:20Z]
[2013-12-19 10:28:38,128][INFO ][node ] [es-01]
initializing ...
[2013-12-19 10:28:38,137][INFO ][plugins ] [es-01] loaded
[], sites [HQ, head]
[2013-12-19 10:28:41,019][INFO ][node ] [es-01]
initialized
[2013-12-19 10:28:41,020][INFO ][node ] [es-01]
starting ...
[2013-12-19 10:28:41,125][INFO ][transport ] [es-01]
bound_address {inet[/10.0.8.107:9300]}, publish_address
{inet[/10.0.8.107:9300]}
[2013-12-19 10:28:45,667][INFO ][cluster.service ] [es-01]
new_master
[es-01][giHKrLdWS5GDR42bnOdQjA][inet[/10.0.8.107:9300]]{master=true},
reason: zen-disco-join (elected_as_master)
[2013-12-19 10:28:45,689][INFO ][discovery ] [es-01]
es-ket/giHKrLdWS5GDR42bnOdQjA
[2013-12-19 10:28:45,694][INFO ][http ] [es-01]
bound_address {inet[/10.0.8.107:9200]}, publish_address
{inet[/10.0.8.107:9200]}
[2013-12-19 10:28:45,694][INFO ][node ] [es-01] started

So my question is, which value should I take into account ?

I assume - and hope :wink: - that the correct value is the one displayed
through the API but I'd like someone to confirm this.

Thank you

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/39da5398-d256-4c3e-99de-9fdb76ff9c7e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Jason Wee) #2

Works for me (es version 0.90.7), my settings

elasticsearch soft nofile 65536
elasticsearch hard nofile 131072

and calling the es api, and it show tallied.

"max_file_descriptors" : 131072

/Jason

On Thu, Dec 19, 2013 at 5:34 PM, havetobe unknown <havetobeunknown@gmail.com

wrote:

Hello,

When I change the value for "max_file_descriptors" - say to 130000 for
example - using the MAX_OPEN_FILES variable in init script, I noticed a
strange behavior. The value dispalyed through API seems correct as shown
below (ES version is 0.90.5) :

curl -XGET 'http://localhost:9200/_nodes/_local?process=true&pretty=true'

{
"ok" : true,
"cluster_name" : "es-clust",
"nodes" : {
"5PHUSFl2TmW-3yCdisBWZg" : {
"name" : "es-01",
"transport_address" : "inet[/10.0.8.107:9300]",
"hostname" : "es-01",
"version" : "0.90.5",
"http_address" : "inet[/10.0.8.107:9200]",
"attributes" : {
"master" : "true"
},
"process" : {
"refresh_interval" : 1000,
"id" : 2633,
"max_file_descriptors" : 200000
}
}
}
}

At the same time, I set the -Des.max-open-files=true JVM option to have
the value written in ES log file. This doesn't return the same value :

[2013-12-19 10:14:28,614][INFO ][bootstrap ]
max_open_files [97518]

[2013-12-19 10:14:28,727][INFO ][node ] [es-01]
version[0.90.5], pid[2633], build[c8714e8/2013-09-17T12:50:20Z]
[2013-12-19 10:14:28,733][INFO ][node ] [es-01]
initializing ...
[2013-12-19 10:14:28,742][INFO ][plugins ] [es-01] loaded
[], sites [HQ, head]
[2013-12-19 10:14:31,431][INFO ][node ] [es-01]
initialized
[2013-12-19 10:14:31,431][INFO ][node ] [es-01]
starting ...
[2013-12-19 10:14:31,528][INFO ][transport ] [es-01]
bound_address {inet[/10.0.8.107:9300]}, publish_address {inet[/
10.0.8.107:9300]}
[2013-12-19 10:14:36,095][INFO ][cluster.service ] [es-01]
new_master [es-01][5PHUSFl2TmW-3yCdisBWZg][inet[/10.0.8.107:9300]]{master=true},
reason: zen-disco-join (elected_as_master)
[2013-12-19 10:14:36,127][INFO ][discovery ] [es-01]
es-ket/5PHUSFl2TmW-3yCdisBWZg
[2013-12-19 10:14:36,131][INFO ][http ] [es-01]
bound_address {inet[/10.0.8.107:9200]}, publish_address {inet[/
10.0.8.107:9200]}
[2013-12-19 10:14:36,132][INFO ][node ] [es-01] started

I found that the value displayed in log file never gets higher than
97518. If I set a value under this apparent "limit" - say 75000 for
instance - the result seems (nearly) correct in log file (as well as
through the API) :

[2013-12-19 10:28:38,002][INFO ][bootstrap ]
max_open_files [74975]

[2013-12-19 10:28:38,128][INFO ][node ] [es-01]
version[0.90.5], pid[2835], build[c8714e8/2013-09-17T12:50:20Z]
[2013-12-19 10:28:38,128][INFO ][node ] [es-01]
initializing ...
[2013-12-19 10:28:38,137][INFO ][plugins ] [es-01] loaded
[], sites [HQ, head]
[2013-12-19 10:28:41,019][INFO ][node ] [es-01]
initialized
[2013-12-19 10:28:41,020][INFO ][node ] [es-01]
starting ...
[2013-12-19 10:28:41,125][INFO ][transport ] [es-01]
bound_address {inet[/10.0.8.107:9300]}, publish_address {inet[/
10.0.8.107:9300]}
[2013-12-19 10:28:45,667][INFO ][cluster.service ] [es-01]
new_master [es-01][giHKrLdWS5GDR42bnOdQjA][inet[/10.0.8.107:9300]]{master=true},
reason: zen-disco-join (elected_as_master)
[2013-12-19 10:28:45,689][INFO ][discovery ] [es-01]
es-ket/giHKrLdWS5GDR42bnOdQjA
[2013-12-19 10:28:45,694][INFO ][http ] [es-01]
bound_address {inet[/10.0.8.107:9200]}, publish_address {inet[/
10.0.8.107:9200]}
[2013-12-19 10:28:45,694][INFO ][node ] [es-01] started

So my question is, which value should I take into account ?

I assume - and hope :wink: - that the correct value is the one displayed
through the API but I'd like someone to confirm this.

Thank you

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/39da5398-d256-4c3e-99de-9fdb76ff9c7e%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHO4itwTS_5k7R8A_qaTFkUo0tW0WV4x2c6CUdyyXJ054fvgNA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Jörg Prante) #3

What operating system is this? And are you on a virtual machine?

Jörg

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFFft8Yae%3D78xjrwRaK-UmFKVra8jGxxKbX%3DDnDNnfM_A%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


(havetobe unknown) #4

@ Jason

I don't use limits.conf to set the limits for file descriptors. I directly
set a variable in the init script but the principle stays the same. The
value returned throug ES API is also correct for me. It's the value
displayed in ES log file which differs (when using the -des.max-open-files
JVM option).

@Jörg

OS is a Debian Squeeze (7.2) up-to-date running in a VM (Vsphere)

Thanks for your time

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/51fc1010-22d4-4893-a9f4-50104387eb87%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #5