lucene - MaxOpenFiles based on Indexes X Shards X Replicas X Documents -
problem
currently have elasticsearch cluster running out of file descriptors, , checking elasticsearch setup documentation page saw recommended set number of file descriptors on machine 32k or 64k , digging bit on search results found some people set limit threshold higher (128k or unlimited).
the exception i'm getting quite common exhaustion of file descriptors:
caused by: org.apache.lucene.store.lockreleasefailedexception: cannot forcefully unlock nativefslock held indexer component question
is there equation number of file descriptors should expect required elasticsearch / lucene based on number of indexes, shards, replicas , / or documents? or foor number of files elasticsearch indexes?
i wouldn't set try , error, , unlimited number of file descriptors isn't possible situation.
i know little elasticsearch try answer lucene perspective.
i'm afraid there's no easy way of finding out how many descriptors need.
first, depends on directory implementation (which depends on underlying os, if use fsdirectory.open(file)).
secondly, depends on merge policy (which may depend on lucene version, unless elasticsearch overrides it).
finally, can depend on various exotic circumstances, such garbage collection behaviour (if bits depend on finalizers free resources). had instance of lucene leaking file descriptors until manually switched -d64 mode on.
above said, recommend set monitoring script gathers stats on week or , come range fitting typical usage. add variance unexpected cases.
p.s. struggling imagine case these days file descriptors genuine problem. c10k problem? can elaborate on this?
Comments
Post a Comment