So it means that ES will not flush until it gets 50000 operations (index in
this case). As a result, there's always 50000 documents get
flushed/committed to Lucene
at a single time. So it's intuitive for us that Lucene will not create
segments that has under 50000 documents.
But in our benchmark with this settings, we found out that there's lots of
segments with, say, ~3000 documents, and the segment's size is far less
than 300mb (the flush threshold).
My questions are:
How do these small segments get generated given that we flush 50000
documents at a time?
Does avoid generating small segments helps indexing speed and merge speed?
We are using ElasticSearch v1.0.1 and we also set these when benchmarking:
The indexing buffer could also fill up which will flush to a segment. Also
the translog flush is not "exactly" deterministic, for example
"index.translog.interval" determines how often to check if the translog
needs to be flushed or not. Anyway, I wouldn't worry about it if I were
you. About the merge, I'd probably leave the defaults alone unless you are
absolutely sure changing them helps you. The more segments there are, the
more time it could take to do a merge.
I'm curious about this because we're benchmarking our bulk indexing. And
we've found out that the fastest bulk indexing strategy to be:
bulk indexing with 0 replica, no refresh, let ES do as little merge as
possible
when indexing finished, optimize segments
replicates
Is there some readings about the details/internals of lucene? We've the
book Lucene in Action but it's mainly about core concepts and usage.
在 2014年3月28日星期五UTC+1下午8时32分46秒,Binh Ly写道:
The indexing buffer could also fill up which will flush to a segment. Also
the translog flush is not "exactly" deterministic, for example
"index.translog.interval" determines how often to check if the translog
needs to be flushed or not. Anyway, I wouldn't worry about it if I were
you. About the merge, I'd probably leave the defaults alone unless you are
absolutely sure changing them helps you. The more segments there are, the
more time it could take to do a merge.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.