AR
04/06/2025, 3:00 PMdruid.lookup.namespace.numBufferedEntries apply per lookup in the "cachedNamespace" - meaning would it create a buffer with 100K entries for each lookup?
Single Cached Lookup
There isn't much info on how to use this. Would the Lookup APIs work for this type of lookup as well?
Finally, the max heap size for the historical process is specified as 24GB in the documentation. Is this a hard limit? As we plan to have some large lookups, can we set the max heap size > 24GB?
Thanks,
AR.Gian Merlino
04/07/2025, 6:43 PMThere are 2 flavours of Lookups in the documentation - Globally Cached Lookups and Single Cached Lookup. Which one should be preferred in this scenario?
druid-lookups-cached-global is more commonly used, supports more sources, and should be preferred all else being equal. it always caches the full lookup in memory
druid-lookups-cached-single is more niche, it doesn't support as many source and options, but it has one main feature that druid-lookups-cached-global doesn't: it has a mode where it can partially cache. this can be useful if you have a very large lookup and don't want to store the whole thing in memory at once. although, note that it will affect query performance, since it basically means druid would sometimes need to fetch lookup k/vs from a remote service during a query.Gian Merlino
04/07/2025, 6:45 PMThe implementation seems to be a single Java Concurrent map containing a Concurrent map for each lookup. Is this understanding correct?yes, that's how it works
Gian Merlino
04/07/2025, 6:49 PMThere seems to be a limit of 10% of heap on the lookup size. Is this per lookup or total size of all the lookups in the "cachedNamespace"?i think you're talking about
maxHeapPercentage. that is per-lookup and note that it's just a soft limit: a warning is logged but the lookup is still loaded. it's meant to help you identify lookups that have become largeGian Merlino
04/07/2025, 6:50 PMWe were also looking at the off heap option. In this case, would all the lookups in the "cachedNamespace" be off heap?yes, the on/off heap switch is for the entire extension
Gian Merlino
04/07/2025, 6:59 PMWouldi think it's total across all lookups but i am not 100% sure on this. maybe 50% sureapply per lookup in the "cachedNamespace" - meaning would it create a buffer with 100K entries for each lookup?druid.lookup.namespace.numBufferedEntries
Gian Merlino
04/07/2025, 7:00 PMSingle Cached Lookup
There isn't much info on how to use this. Would the Lookup APIs work for this type of lookup as well?yes, the lookup APIs work the same way on both implementations
Gian Merlino
04/07/2025, 7:03 PMFinally, the max heap size for the historical process is specified as 24GB in the documentation. Is this a hard limit? As we plan to have some large lookups, can we set the max heap size > 24GB?where are you referring to? there isn't a 24 GB limit on heap size for historicals that i'm aware of; it can be bigger than that. you should use one of the garbage collectors that works better on large heaps though, like Shenandoah or ZGC, and you should use a later JDK like 17 or 21. (currently we don't officially support JDK 21, but it should work if you want to use it. the main reason we don't officially support is an issue remaining with the unit tests segfaulting -- see https://github.com/apache/druid/issues/14502)
AR
04/08/2025, 4:43 AMA general rule-of-thumb for sizing the Historical heap is...., with an upper limit of ~24GiB.(0.5GiB * number of CPU cores)
Having a heap that is too large can result in excessively long GC collection pauses, the ~24GiB upper limit is imposed to avoid this.Is this only a recommendation and not a hard limit? Thanks, AR.
Gian Merlino
04/08/2025, 3:16 PMGian Merlino
04/08/2025, 3:17 PMAR
04/08/2025, 4:33 PMGian Merlino
04/08/2025, 4:52 PMGian Merlino
04/08/2025, 4:53 PM