On 4/9/2014 11:53 PM, Toke Eskildsen wrote: >> This does not happen with the 'old' method 'facet.method=enum' - memory >> usage is stable and solr is unbreakable with my hold-reload test. > > The memory allocation for enum is both low and independent of the amount > of unique values in the facets. The trade-off is that is is very slow > for medium- to high-cardinality fields.
This is where it is extremely beneficial to have enough RAM to cache your entire index. The term list must be enumerated for every facet request, but if the data is already in the OS disk cache, this is very fast. If the operating system has to read the data off the disk, it will be *very* slow. If facets are happening on lots of fields and are heavily utilized, facet.method=enum should be used, and there must be plenty of RAM to cache all or most of the index data on the machine. The default method (fc) will create the memory structure that Toke has mentioned for *every* field that gets used for facets. If there are only a few fields used for faceting and they have low cardinality, this is not a problem, and the speedup is usually worth the extra heap memory usage. With 40 facets, that is not supportable. Thanks, Shawn