wentao jin
09/06/2021, 8:42 AMRichard Startin
09/06/2021, 9:20 PMcom.jayway.jsonpath.spi.cache.CacheProvider.setCache(new NOOPCache());
but you need to do it before anything else in the same ClassLoader
calls CacheProvider.getCache
to make sure the registration works.
To really confirm this is related to contention, it would be great to get a contention profile from async-profiler without overriding the cache provider. You can run it as a native agent as outlined here, and use this JVM setting:
-agentpath:/path/to/libasyncProfiler.so=start,event=lock,file=contention.html
(Or set
-agentpath:/path/to/libasyncProfiler.so=start,event=cpu,file=cpu.html
to get a cpu profile which should identify the bottleneck without proving the issue is contention)
Getting a look at the flamegraph will really help to understand whether this is contention or just slow JSON path evaluation.wentao jin
09/07/2021, 7:53 AMPinot Server Flavor: 28vcpu.110mem.2000ssd
"transformConfigs": [
{
"columnName": "correlationId",
"transformFunction": "jsonPathString(report,'$.identifiers.correlationId','')"
}
...
]
I have done several times profiling, each time lasts 1 minute. The result is basically the same. Lock wait of LRUCache and CPU usage of JsonPath are both high.wentao jin
09/07/2021, 7:57 AMwentao jin
09/07/2021, 8:02 AMRichard Startin
09/07/2021, 8:09 AMRichard Startin
09/07/2021, 8:10 AMRichard Startin
09/07/2021, 8:10 AMwentao jin
09/07/2021, 8:23 AMwentao jin
09/07/2021, 9:25 AMCacheProvider.setCache(new NOOPCache());
Below is flamegraphs after use NOOPCache.Richard Startin
09/07/2021, 9:26 AMRichard Startin
09/07/2021, 9:27 AMRichard Startin
09/07/2021, 9:29 AMwentao jin
09/07/2021, 9:29 AMwentao jin
09/07/2021, 9:30 AMRichard Startin
09/07/2021, 9:31 AMRichard Startin
09/07/2021, 9:32 AMwentao jin
09/07/2021, 9:32 AMwentao jin
09/07/2021, 9:35 AMRichard Startin
09/07/2021, 9:42 AMConcurrentHashMap
cache you have implemented if it solves your problem, but I'm not sure it will be suitable for every pinot user if it caches every jsonpath.
Since pinot has a guava dependency, we could instead use guava's cache with a sensible size limit and register it to avoid jayway's own LRUCache. If you're interested, it could be a nice open source contribution to propose.Richard Startin
09/07/2021, 9:42 AMwentao jin
09/07/2021, 1:39 PMRichard Startin
09/07/2021, 1:42 PMMayank
Richard
09/07/2021, 6:29 PMwentao jin
09/08/2021, 12:53 AM