Encountered a strange Cluster behavior on a central logging cluster where about 50 filebeats are ingesting data.
It seems that most of the CPU is used for security operations.
Here is what GET _nodes/hot_threads
is saying:
::: {xxxx}{MNIchlz2RlKrZLGI7VKt9Q}{RopZnvbASKi2kTTGLNhO9g}{10.244.16.4}{10.244.16.4:9300}{cdhilmrstw}{ml.machine_memory=10737418240, ml.max_open_jobs=20, xpack.installed=true, transform.node=true}
Hot threads at 2021-06-22T15:50:58.684Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true:
59.4% (297ms out of 500ms) cpu usage by thread 'elasticsearch[xxxxx][management][T#4]'
4/10 snapshots sharing following 31 elements
java.base@15.0.1/sun.security.provider.ByteArrayAccess.l2bBig(ByteArrayAccess.java:449)
java.base@15.0.1/sun.security.provider.SHA5.implDigest(SHA5.java:131)
java.base@15.0.1/sun.security.provider.DigestBase.engineDigest(DigestBase.java:210)
java.base@15.0.1/sun.security.provider.DigestBase.engineDigest(DigestBase.java:189)
java.base@15.0.1/java.security.MessageDigest$Delegate.engineDigest(MessageDigest.java:680)
java.base@15.0.1/java.security.MessageDigest.digest(MessageDigest.java:391)
java.base@15.0.1/com.sun.crypto.provider.HmacCore.engineDoFinal(HmacCore.java:233)
java.base@15.0.1/javax.crypto.Mac.doFinal(Mac.java:580)
java.base@15.0.1/javax.crypto.Mac.doFinal(Mac.java:623)
java.base@15.0.1/com.sun.crypto.provider.PBKDF2KeyImpl.deriveKey(PBKDF2KeyImpl.java:194)
java.base@15.0.1/com.sun.crypto.provider.PBKDF2KeyImpl.<init>(PBKDF2KeyImpl.java:118)
java.base@15.0.1/com.sun.crypto.provider.PBKDF2Core.engineGenerateSecret(PBKDF2Core.java:69)
java.base@15.0.1/javax.crypto.SecretKeyFactory.generateSecret(SecretKeyFactory.java:340)
org.elasticsearch.license.CryptUtils.deriveSecretKey(CryptUtils.java:187)
org.elasticsearch.license.CryptUtils.decrypt(CryptUtils.java:135)
org.elasticsearch.license.CryptUtils.decrypt(CryptUtils.java:115)
org.elasticsearch.license.SelfGeneratedLicense.verify(SelfGeneratedLicense.java:72)
org.elasticsearch.license.LicenseService.getLicense(LicenseService.java:569)
org.elasticsearch.license.LicenseService.getLicense(LicenseService.java:559)
org.elasticsearch.license.LicenseService.getLicense(LicenseService.java:350)
org.elasticsearch.license.TransportGetLicenseAction.masterOperation(TransportGetLicenseAction.java:56)
org.elasticsearch.license.TransportGetLicenseAction.masterOperation(TransportGetLicenseAction.java:25)
app//org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:99)
app//org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction.lambda$doStart$3(TransportMasterNodeAction.java:166)
app//org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$$Lambda$6117/0x00000008019cd488.accept(Unknown Source)
app//org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:73)
app//org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:737)
app//org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
java.base@15.0.1/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
java.base@15.0.1/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
java.base@15.0.1/java.lang.Thread.run(Thread.java:832)
2/10 snapshots sharing following 24 elements
java.base@15.0.1/javax.crypto.Mac.doFinal(Mac.java:580)
java.base@15.0.1/javax.crypto.Mac.doFinal(Mac.java:623)
java.base@15.0.1/com.sun.crypto.provider.PBKDF2KeyImpl.deriveKey(PBKDF2KeyImpl.java:194)
java.base@15.0.1/com.sun.crypto.provider.PBKDF2KeyImpl.<init>(PBKDF2KeyImpl.java:118)
java.base@15.0.1/com.sun.crypto.provider.PBKDF2Core.engineGenerateSecret(PBKDF2Core.java:69)
java.base@15.0.1/javax.crypto.SecretKeyFactory.generateSecret(SecretKeyFactory.java:340)
org.elasticsearch.license.CryptUtils.deriveSecretKey(CryptUtils.java:187)
org.elasticsearch.license.CryptUtils.decrypt(CryptUtils.java:135)
org.elasticsearch.license.CryptUtils.decrypt(CryptUtils.java:115)
org.elasticsearch.license.SelfGeneratedLicense.verify(SelfGeneratedLicense.java:72)
org.elasticsearch.license.LicenseService.getLicense(LicenseService.java:569)
org.elasticsearch.license.LicenseService.getLicense(LicenseService.java:559)
org.elasticsearch.license.LicenseService.getLicense(LicenseService.java:350)
org.elasticsearch.license.TransportGetLicenseAction.masterOperation(TransportGetLicenseAction.java:56)
org.elasticsearch.license.TransportGetLicenseAction.masterOperation(TransportGetLicenseAction.java:25)
app//org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:99)
app//org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction.lambda$doStart$3(TransportMasterNodeAction.java:166)
app//org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$$Lambda$6117/0x00000008019cd488.accept(Unknown Source)
app//org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:73)
app//org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:737)
app//org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
java.base@15.0.1/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
java.base@15.0.1/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
java.base@15.0.1/java.lang.Thread.run(Thread.java:832)
4/10 snapshots sharing following 5 elements
app//org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:737)
app//org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
java.base@15.0.1/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
java.base@15.0.1/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
java.base@15.0.1/java.lang.Thread.run(Thread.java:832)
50.7% (253.5ms out of 500ms) cpu usage by thread 'elasticsearch[centrallogging-prod-001-dci-001-master-2][management][T#2]'
2/10 snapshots sharing following 31 elements
java.base@15.0.1/sun.security.provider.ByteArrayAccess.l2bBig(ByteArrayAccess.java:449)
java.base@15.0.1/sun.security.provider.SHA5.implDigest(SHA5.java:131)
java.base@15.0.1/sun.security.provider.DigestBase.engineDigest(DigestBase.java:210)
java.base@15.0.1/sun.security.provider.DigestBase.engineDigest(DigestBase.java:189)
java.base@15.0.1/java.security.MessageDigest$Delegate.engineDigest(MessageDigest.java:680)
java.base@15.0.1/java.security.MessageDigest.digest(MessageDigest.java:391)
java.base@15.0.1/com.sun.crypto.provider.HmacCore.engineDoFinal(HmacCore.java:233)
java.base@15.0.1/javax.crypto.Mac.doFinal(Mac.java:580)
java.base@15.0.1/javax.crypto.Mac.doFinal(Mac.java:623)
java.base@15.0.1/com.sun.crypto.provider.PBKDF2KeyImpl.deriveKey(PBKDF2KeyImpl.java:194)
java.base@15.0.1/com.sun.crypto.provider.PBKDF2KeyImpl.<init>(PBKDF2KeyImpl.java:118)
java.base@15.0.1/com.sun.crypto.provider.PBKDF2Core.engineGenerateSecret(PBKDF2Core.java:69)
java.base@15.0.1/javax.crypto.SecretKeyFactory.generateSecret(SecretKeyFactory.java:340)
org.elasticsearch.license.CryptUtils.deriveSecretKey(CryptUtils.java:187)
org.elasticsearch.license.CryptUtils.decrypt(CryptUtils.java:135)
org.elasticsearch.license.CryptUtils.decrypt(CryptUtils.java:115)
org.elasticsearch.license.SelfGeneratedLicense.verify(SelfGeneratedLicense.java:72)
org.elasticsearch.license.LicenseService.getLicense(LicenseService.java:569)
org.elasticsearch.license.LicenseService.getLicense(LicenseService.java:559)
org.elasticsearch.license.LicenseService.getLicense(LicenseService.java:350)
org.elasticsearch.license.TransportGetLicenseAction.masterOperation(TransportGetLicenseAction.java:56)
org.elasticsearch.license.TransportGetLicenseAction.masterOperation(TransportGetLicenseAction.java:25)
app//org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:99)
app//org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction.lambda$doStart$3(TransportMasterNodeAction.java:166)
app//org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$$Lambda$6117/0x00000008019cd488.accept(Unknown Source)
app//org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:73)
app//org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:737)
app//org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
java.base@15.0.1/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
java.base@15.0.1/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
java.base@15.0.1/java.lang.Thread.run(Thread.java:832)
2/10 snapshots sharing following 30 elements
java.base@15.0.1/sun.security.provider.ByteArrayAccess.l2bBig(ByteArrayAccess.java:449)
java.base@15.0.1/sun.security.provider.SHA5.implDigest(SHA5.java:131)
java.base@15.0.1/sun.security.provider.DigestBase.engineDigest(DigestBase.java:210)
java.base@15.0.1/java.security.MessageDigest$Delegate.engineDigest(MessageDigest.java:686)
java.base@15.0.1/java.security.MessageDigest.digest(MessageDigest.java:418)
java.base@15.0.1/com.sun.crypto.provider.HmacCore.engineDoFinal(HmacCore.java:240)
java.base@15.0.1/javax.crypto.Mac.doFinal(Mac.java:580)
java.base@15.0.1/javax.crypto.Mac.doFinal(Mac.java:623)
java.base@15.0.1/com.sun.crypto.provider.PBKDF2KeyImpl.deriveKey(PBKDF2KeyImpl.java:194)
java.base@15.0.1/com.sun.crypto.provider.PBKDF2KeyImpl.<init>(PBKDF2KeyImpl.java:118)
java.base@15.0.1/com.sun.crypto.provider.PBKDF2Core.engineGenerateSecret(PBKDF2Core.java:69)
java.base@15.0.1/javax.crypto.SecretKeyFactory.generateSecret(SecretKeyFactory.java:340)
org.elasticsearch.license.CryptUtils.deriveSecretKey(CryptUtils.java:187)
org.elasticsearch.license.CryptUtils.decrypt(CryptUtils.java:135)
org.elasticsearch.license.CryptUtils.decrypt(CryptUtils.java:115)
org.elasticsearch.license.SelfGeneratedLicense.verify(SelfGeneratedLicense.java:72)
org.elasticsearch.license.LicenseService.getLicense(LicenseService.java:569)
org.elasticsearch.license.LicenseService.getLicense(LicenseService.java:559)
org.elasticsearch.license.LicenseService.getLicense(LicenseService.java:350)
org.elasticsearch.license.TransportGetLicenseAction.masterOperation(TransportGetLicenseAction.java:56)
org.elasticsearch.license.TransportGetLicenseAction.masterOperation(TransportGetLicenseAction.java:25)
app//org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:99)
app//org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction.lambda$doStart$3(TransportMasterNodeAction.java:166)
app//org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$$Lambda$6117/0x00000008019cd488.accept(Unknown Source)
app//org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:73)
app//org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:737)
app//org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
java.base@15.0.1/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)