Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
8.5, 8.5.1
-
None
-
None
Description
I sent this to the mailing list
I'm moving from 8.3.1 to 8.5.1, and started getting Out Of Memory Errors while running our normal tests. After profiling it was clear that the majority of the heap was allocated through FuzzyQuery.
LUCENE-9068 moved construction of the automata from the FuzzyTermsEnum to the FuzzyQuery's constructor.
I created a little test ( FuzzyHammer.java ) that fires off fuzzy queries from random UUID strings for 5 minutes
FIELD_NAME + ":" + UUID.randomUUID().toString().replace("-", "") + "~2"
When running against a vanilla Solr 8.31 and 8.4.1 there is no problem, while the memory usage has increased drastically on 8.5.0 and 8.5.1.
Comparison of heap usage while running the attached test against Solr 8.3.1 and 8.5.1 with a single (empty) shard and 4GB heap:
And with 4 shards on 8.4.1 and 8.5.0:
I'm guessing that the memory might be being leaked if the FuzzyQuery objects are referenced from the cache, while the FuzzyTermsEnum would not have been.
Query Result Cache on 8.5.1:
~316mb in the cache
QRC on 8.3.1
<1mb
With an empty cache, running this query field_s:e41848af85d24ac197c71db6888e17bc~2 results in the following memory allocation
8.3.1: CACHE.searcher.queryResultCache.ramBytesUsed: 1520 8.5.1: CACHE.searcher.queryResultCache.ramBytesUsed: 648855
~1 gives 98253 and ~0 gives 6339 on 8.5.1. 8.3.1 is constant at 1520
Attachments
Attachments
Issue Links
- is caused by
-
LUCENE-9068 Build FuzzyQuery automata up-front
- Closed
- relates to
-
LUCENE-9350 Don't cache automata on FuzzyQuery
- Closed
- links to