I was wondering if anyone else has had the the same Lucene (not Solr) situation?
When I open a Lucene index I warm it with a typical query and then keep the searcher cached for a period of time so that many queries can use it. I then re-open it and repeat. Because I am running Lucene 3.6 on Linux, as I understand it most of my open index data resides in the filesystem cache rather than the JVM heap. What I find is that the response time for queries increases over time - unless I keep re-warming the searcher by re-running my typical query. Has anyone else had this issue? If so, is re-warming the only way to keep he query responsive? How often works best?
Some background
- the machine is always very busy doing other non-Lucene file processing, which makes me suspect the F/S cache pages are being replaced over time
- my indexer does not run in the same JVM as my query server, so NRT etc. isn't relevant
Thanks!
Chris
Which directory are you using?
You can try playing with
swappiness
as explained http://wiki.apache.org/lucene-java/ImproveSearchingSpeed.Another option would be using
mlockall
as explained in http://jprante.github.io/applications/2012/07/26/Mmap-with-Lucene.html.