<@UDQU92KBK> <@UGRJA9TEH> <@UDT7GFEG6> pinot-serve...
# troubleshooting
s
@Mayank @Xiang Fu @Jackie pinot-server ram usage is getting increased over time without adding garbage collection params in jvmopts in pinot/values.yaml helm .. before we were using jvmopts like "*jvmOpts: "-Xms256M -Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -Xloggc:/opt/pinot/gc-pinot-controller.log"*" but after migrating to jdk 11 with these jvmopts .. the pods started crashing and we have to remove these jvmopts and only using the below jvmopts ie "*jvmOpts: "-Xms2M -Xmx8G  -Xloggc/opt/pinot/gc pinot controller.logjavaagent/opt/pinot/etc/jmx_prometheus_javaagent/jmx_prometheus_javaagent-0.12.0.jar=8008:/opt/pinot/etc/jmx_prometheus_javaagent/configs/pinot.yml" - server* " but without using garbage collection params .. we are seeing an increase in pinot-server ram usage over time and ram is getting exhausted every day by more than half gb .. what should be the jvmopts we should provide in helm for jdk11 so that pods dont crash and gc happens properly and heap is free .. also for 16 gb server ram .. what should be xmx value for server pod..
x
you can still use
-XX:+UseG1GC
s
what should be the pinot server xmx value in jvmopts in helm if ram provided is 16 gb per pinot-server pod
r
@Sadim Nadeem my guess is you have a high cardinality inverted index (do you?) and that means you have a lot of `SoftReference`s, which would be cleared more aggressively by G1 on JDK8 than JDK11. If that's it, the issue should be fixed here: https://github.com/apache/pinot/pull/7493
The best way to figure this out is to look at a live heap dump, or use JFR
OldObjectSample
(do NOT do this in production, it has very high overhead) - see here http://hirt.se/blog/?p=1055
s
yes I do have inverted index on many columns some of which have high cardinality
I see the PR https://github.com/apache/pinot/pull/7493 merged 14 hours ago .. when can we expect this to be released or ci cd has made this release ready and pinot pull policy always will upgrade pinot to latest release after we do helm upgrade in our pinot installation in k8s cluster? @Xiang Fu @Jackie @Mayank @Richard Startin
r
Would you be able to confirm the suspected cause with a live heap dump (
jmap -dump:live,file=dump.bin <pid>
)? If my guess is correct, there should be a lot of
ImmutableRoaringBitmap
by retained size.
Do not send share the heap dump because the strings will contain sensitive data, but getting a screenshot of top retained size by type either from MAT or JVisualVM heapdump viewer would confirm the guess.
s
ok let me check
👍 1
@Xiang Fu pinot server pods are running successfully after adding useG1GC... Thanks
Hope that ram won't get exhausted anymore over time anymore
And this config will take care of all the garbage collection
🤞 1
Hi .. I still see pinot server ram memory getting exhausted over time even after adding useG1Gc in jvmopts in pinot/values.yaml helm .. @Xiang Fu @Jackie @Richard Startin @Mayank can you please confirm if i have 16 gb pinot ram server size .. what should be the xmx value in jvmopts means heap memory size for server pods .. right now we ar eusing 8 gb heap for 16 gb server pods .. is it ok? ..
as suggested by @Richard Startin .. inverted indexing may cause memory leak cc: @Subbu Subramaniam
is it necessary to install MAT or JVisualVM heapdump viewer and need to confirm the same
x
why you say server ram is exhausted? the cmd you ran is for k8s pod memory usage, which is expected, as you configure 16gb ram, pinot uses all of them(heap and off-heap). You need to observe the jvm usage metrics to see gc behavior
s
Ok @Xiang Fu .. Which tool is recommended for observing jvm usage metrics
s
I did the last helm upgrade for pinot on friday2 PM UTC 1st october .. should I expect the fixes https://github.com/apache/pinot/pull/7493 getting pulled automatically since we have pull policy : always in the pinot helm chart pinot/values.yaml
x
pinot image is published daily, it’s irrelevant to the helm
s
how to get the latest image deployed in k8s
I mean how the containers will be created from latest image without redeploying
x
please read k8s basics 😛 In short, set ImagePullPolicy to Always then delete all the pods.
Just use google and stackoverflow.
s
got it
r
as suggested by @Richard Startin  .. inverted indexing may cause memory leak cc: @Subbu Subramaniam
is it necessary to install MAT or JVisualVM heapdump viewer and need to confirm the same (edited)
We don't know there is a memory leak, we just know you've found a behaviour change in JDK11, and needed to increase
-Xmx
to get things working. This is why I suggested taking a heap dump - you don't need to install anything to do that, just run
jmap -dump:live,file=dump.bin <pid>
where
<pid>
is the PID of the server process. Once you have that heap dump exported, you can analyse it with JVisualVM or Eclipse MAT, and you only need to install these on your laptop so you can look at the heap dump. Knowing the top 10 types by retained size would support or conclusively disprove the suggestion that this is caused by soft reference processing changes in G1 between JDK8 and JDK11.
s
sure will check and update
@Xiang Fu @Mayank is there any specific order in which kubectl delete command should be run like first for deleting zookeeper pods then broker pods.. then controller pods.. then server pods ..in order to get the latest image deployed with latest features/fixes I mean when running the kubectl delete command kubectl delete po dev-pinot-zookeeper-0 dev-pinot-zookeeper-1 dev-pinot-zookeeper-2 dev-pinot-broker-0 dev-pinot-broker-1 dev-pinot-broker-2 dev-pinot-controller-0 dev-pinot-controller-1 dev-pinot-controller-2 dev-pinot-server-0 dev-pinot-server-1 dev-pinot-server-2 -n dev-pinot is the order correct .. or no issue with any order ..
x
do server/broker/controller order
for zk, it’s not using pinot image, so you don’t need to touch it
s
thanks @Xiang Fu
@Xiang Fu please confirm if tables and data will remain intact even after performing above kubectl delete on server/broker/controller and no data loss will happen
from pinot
x
yes
s
ok