@s1monw @kimchy  4MB was mostly to make sure to not hit OOME because of the recycling. This may seem small, but for instance CacheRecycler only caches 10 instances at most by default as well. How should we decide on what should the default value be? Should it be a percentage of the heap size?

Also, these 4MB are per data-type and per-thread (unless using the queue recycler in which case it would be global), so since we have 5 data types  and making the assumption there are 20 search threads, this would give 4 * 5 * 20 = 400MB of cached data. Maybe we should change it to be only per-thread to make it easier to reason about (dividing it equally for byte[], double[], etc.)?