I have hosted metabase in ec2 aws machine ( 4 cores /16 gb machine), and data processing using aws rds postgres (13.2) , which is backed by ALB to target ,there metabase jar is running with 0.46.2 version,
Not sure why my jar is taking around 400% of CPU , please help me to resolve this ASAP
Thanks for replying ! please find the below details,
Users: around 1000
Usage : end users are using from different places like every day
Logs: i have taken java thread traces by using jstack and most of the java threads are in waiting state and only two threads are Running not able to figure it out ,about this latency issues , and my server specifications are mentioned above.,
"snowplow-emitter-pool-1-request-thread-49" #531 prio=5 os_prio=0 cpu=23.75ms elapsed=47052.89s tid=0x00007ff39013e000 nid=0x203b waiting on condition [0x00007ff33b2e2000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.14/Native Method)
- parking to wait for <0x00000006c8400350> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(java.base@11.0.14/LockSupport.java:194)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.14/AbstractQueuedSynchronizer.java:2081)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.14/ScheduledThreadPoolExecutor.java:1170)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.14/ScheduledThreadPoolExecutor.java:899)
at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.14/ThreadPoolExecutor.java:1054)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.14/ThreadPoolExecutor.java:1114)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.14/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.14/Thread.java:829)
"qtp1835456362-19325" #19325 prio=5 os_prio=0 cpu=0.60ms elapsed=102.89s tid=0x00007ff3683f4800 nid=0x2c2 waiting on condition [0x00007ff3701b0000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.14/Native Method)
- parking to wait for <0x00000006c33b37b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.14/LockSupport.java:234)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@11.0.14/AbstractQueuedSynchronizer.java:2123)
at org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:219)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.idleJobPoll(QueuedThreadPool.java:1017)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1067)
at java.lang.Thread.run(java.base@11.0.14/Thread.java:829)