提问者:小点点

WSO2中的高CPU负载EI6.6.0


我们已经在RHEL 8Linux机器上部署了WSO2EI6.6.0解决方案。我们看到WSO2java进程消耗了更多的CPU负载,并且它们无法正常运行,一旦我们重新启动,所有的负载都为0。我们已经尝试更改配置文件,但仍然没有运气,下面是参考。

Java参数:-Xms256m-Xmx512m-Xss256m

passthru-http.properties。

# Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# WSO2 Inc. licenses this file to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file except
# in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

## This file contains the configuration parameters used by the Pass-through HTTP transport

## Pass-through HTTP transport specific tuning parameters
http.socket.timeout=180000

#worker_pool_size_core=400
#worker_pool_size_max=500
worker_pool_size_core=100
worker_pool_size_max=100
worker_thread_keepalive_sec=60
#worker_pool_queue_length=-1
#io_threads_per_reactor=2
io_buffer_size=16384
#http.max.connection.per.host.port=32767

# This property is crucial for automated tests
http.socket.reuseaddr=true

## Other parameters
#http.user.agent.preserve=false
#http.server.preserve=true
http.headers.preserve=Content-Type
#http.connection.disable.keepalive=false
rest.dispatcher.service=__MultitenantDispatcherService
# URI configurations that determine if it requires custom rest dispatcher
rest_uri_api_regex=\\w+://.+:\\d+/t/.*|\\w+://.+\\w+/t/.*|^(/t/).*
rest_uri_proxy_regex=\\w+://.+:\\d+/services/t/.*|\\w+://.+\\w+/services/t/.*|^(/services/t/).*

# Message size validation based on the message size in bytes.
#message.size.validation.enabled=true
#valid.max.message.size.in.bytes=81920

以下是我们的线程:"HTTPS-Listener I/O调度器-1"#157 prio=5os_prio=0 cpu=5582.51ms elapsed=87405.7ds tid=0x00007f8600af1800 nid=0x8181 runnable[0x00007f7fbffe6000]java. lang.Thread.State:RUNNABLE atsun.nio.ch.EPoll.等待(java.base@11.0.16/本地方法)atsun.nio.ch.EPollSelectorImp.doSelect(java.base@11.0.16/EPollSelectorImpl.java:120)atsun.nio.ch.SelectorImp.lockAndDoSelect(java.base@11.0.16/SelectorImpl.java:124)-锁定

"HTTPS-监听器I/O调度器-2"#158 prio=5os_prio=0 cpu=783854.24ms elapsed=87405.63s tid=0x00007f8600942800 nid=0x8182 runnable[0x00007f7faffe5000]java. lang.Thread.State:RUNNABLE atsun.nio.ch.IOUtil.draw(java.base@11.0.16/本机方法)atsun.nio.ch.EPollSelectorImp.clear中断(java.base@11.0.16/EPollSelectorImpl.java:266)-锁定

"HTTPS-Listener I/O调度程序-3"#159 prio=5os_prio=0 cpu=5569.42ms elapsed=87405.60s tid=0x00007f86010fa800 nid=0x8183 runnable[0x00007f7f9ffe4000]java. lang.Thread.State:在sun.nio.ch运行。sun.nio.chEPoll.don(java.base@11.0.16/本地方法)。sun.nio.chEPollSelectorImp.doSelect(java.base@11.0.16/EPollSelectorImpl.java:120)。SelectorImp.lockAndDoSelect(java.base@11.0.16/SelectorImpl.java:124)-锁定

"HTTPS-侦听器I/O调度程序-4"#160 prio=5os_prio=0 cpu=5519.55ms elapsed=87405.52s tid=0x00007f8600b35000 nid=0x8184 runnable[0x00007f7f8ffe3000]java. lang.Thread.State:RUNNABLE atsun.nio.ch.EPoll.don(java.base@11.0.16/本地方法)atsun.nio.ch.EPollSelectorImp.doSelect(java.base@11.0.16/EPollSelectorImpl.java:120)atsun.nio.ch.SelectorImp.lockAndDoSelect(java.base@11.0.16/SelectorImpl.java:124)-锁定

"HTTPS-Listener I/O调度器-5"#161 prio=5os_prio=0 cpu=763010.04ms elapsed=87405.49s tid=0x00007f8600dbf800 nid=0x8185 runnable[0x00007f7f7ffe2000]java. lang.Thread.State:RUNNABLE atsun.nio.ch.EPoll.don(java.base@11.0.16/本地方法)atsun.nio.ch.EPollSelectorImp.doSelect(java.base@11.0.16/EPollSelectorImpl.java:120)atsun.nio.ch.SelectorImp.lockAndDoSelect(java.base@11.0.16/SelectorImpl.java:124)-锁定

"HTTPS-Listener I/O调度器-6"#162 prio=5os_prio=0 cpu=5530.21ms elapsed=87405.41s tid=0x00007f86004d3000 nid=0x8186 runnable[0x00007f7f6ffe1000]java. lang.Thread.State:RUNNABLE atsun.nio.ch.EPoll.don(java.base@11.0.16/本地方法)atsun.nio.ch.EPollSelectorImp.doSelect(java.base@11.0.16/EPollSelectorImpl.java:120)atsun.nio.ch.SelectorImp.lockAndDoSelect(java.base@11.0.16/SelectorImpl.java:124)-锁定

"HTTPS-Listener I/O调度器-7"#163 prio=5os_prio=0 cpu=5558.50ms elapsed=87405.36s tid=0x00007f8600040800 nid=0x8187 runnable[0x00007f7f5ffe0000]java. lang.Thread.State:RUNNABLE atsun.nio.ch.EPoll.don(java.base@11.0.16/本地方法)atsun.nio.ch.EPollSelectorImp.doSelect(java.base@11.0.16/EPollSelectorImpl.java:120)atsun.nio.ch.SelectorImp.lockAndDoSelect(java.base@11.0.16/SelectorImpl.java:124)-锁定

"HTTPS-Listener I/O调度器-8"#164 prio=5os_prio=0 cpu=5556.33ms elapsed=87405.34s tid=0x00007f8600b42000 nid=0x8188 runnable[0x00007f7f4ffdf000]java. lang.Thread.State:RUNNABLE atsun.nio.ch.EPoll.don(java.base@11.0.16/本地方法)atsun.nio.ch.EPollSelectorImp.doSelect(java.base@11.0.16/EPollSelectorImpl.java:120)atsun.nio.ch.SelectorImp.lockAndDoSelect(java.base@11.0.16/SelectorImpl.java:124)-锁定

"HTTPS-Listener I/O调度器-9"#165 prio=5os_prio=0 cpu=5540.08ms elapsed=87405.26s tid=0x00007f8601149000 nid=0x8189 runnable[0x00007f7f3ffde000]java. lang.Thread.State:RUNNABLE atsun.nio.ch.EPoll.don(java.base@11.0.16/本地方法)atsun.nio.ch.EPollSelectorImp.doSelect(java.base@11.0.16/EPollSelectorImpl.java:120)atsun.nio.ch.SelectorImp.lockAndDoSelect(java.base@11.0.16/SelectorImpl.java:124)-锁定

"HTTPS-Listener I/O调度器-10"#166 prio=5os_prio=0 cpu=5562.65ms elapsed=87405.19s tid=0x00007f8600177800 nid=0x818a runnable[0x00007f7f2ffdd000]java. lang.Thread.State:RUNNABLE atsun.nio.ch.EPoll.don(java.base@11.0.16/本地方法)atsun.nio.ch.EPollSelectorImp.doSelect(java.base@11.0.16/EPollSelectorImpl.java:120)atsun.nio.ch.SelectorImp.lockAndDoSelect(java.base@11.0.16/SelectorImpl.java:124)-锁定

"HTTPS-Listener I/O调度器-11"#167 prio=5os_prio=0 cpu=5535.88ms elapsed=87405.18s tid=0x00007f86005ac000 nid=0x818brunnable[0x00007f7f1ffdc000]java. lang.Thread.State:RUNNABLE atsun.nio.ch.EPoll.don(java.base@11.0.16/本地方法)atsun.nio.ch.EPollSelectorImp.doSelect(java.base@11.0.16/EPollSelectorImpl.java:120)atsun.nio.ch.SelectorImp.lockAndDoSelect(java.base@11.0.16/SelectorImpl.java:124)-锁定

"HTTPS-Listener I/O调度器-12"#168 prio=5os_prio=0 cpu=5551.89ms elapsed=87405.15s tid=0x00007f86015da800 nid=0x818c runnable[0x00007f7f0ffdb000]java. lang.Thread.State:RUNNABLE atsun.nio.ch.EPoll.don(java.base@11.0.16/本地方法)atsun.nio.ch.EPollSelectorImp.doSelect(java.base@11.0.16/EPollSelectorImpl.java:120)atsun.nio.ch.SelectorImp.lockAndDoSelect(java.base@11.0.16/SelectorImpl.java:124)-锁定

"超文本传输协议-nio-9763-BlockPoller"#169 daemon prio=5os_prio=0 cpu=1087.26ms elapsed=87404.95s tid=0x00007f8649348800 nid=0x818d runnable[0x00007f7efffda000]java. lang.Thread.State:RUNNABLE atsun.nio.ch.EPoll.等待(java.base@11.0.16/本地方法)atsun.nio.ch.EPollSelectorImp.doSelect(java.base@11.0.16/EPollSelectorImpl.java:120)atsun.nio.ch.SelectorImp.lockAndDoSelect(java.base@11.0.16/SelectorImpl.java:124)-锁定

"超文本传输协议-nio-9763-exc-1"#170 daemon prio=5os_prio=0 cpu=0.13ms elapsed=87404.81s tid=0x00007f8649352000 nid=0x818f等待条件[0x00007f7eeffd9000]java. lang.Thread.State:WAITING(停车)at jdk.interal.misc.Unsaf.park(java.base@11.0.16/本地方法)-停车等待

"超文本传输协议-nio-9763-exec-2"#171 daemon prio=5os_prio=0 cpu=0.17ms elapsed=87404.77s tid=0x00007f8649353000 nid=0x8190等待条件[0x00007f7edffd8000]java. lang.Thread.State:WAITING(停车)at jdk.interal.misc.Unsaf.park(java.base@11.0.16/本地方法)-停车等待

"超文本传输协议-nio-9763-exec-3"#172 daemon prio=5os_prio=0 cpu=0.13ms elapsed=87404.66s tid=0x00007f8649354800 nid=0x8192等待条件[0x00007f7ecffd7000]java. lang.Thread.State:WAITING(停车)at jdk.interal.misc.Unsaf.park(java.base@11.0.16/本地方法)-停车等待

"超文本传输协议-nio-9763-exec-4"#173 daemon prio=5os_prio=0 cpu=0.14ms elapsed=87404.64s tid=0x00007f8649356800 nid=0x8193等待条件[0x00007f7ebffd6000]java. lang.Thread.State:WAITING(停车)at jdk.interal.misc.Unsaf.park(java.base@11.0.16/本地方法)-停车等待


共1个答案

匿名用户

当您观察到这个问题时,我们应该使用这个脚本来捕获一些线程转储和线程使用转储吗?然后您可以按照这个留档来识别哪些线程消耗更多CPU。在这里分享高CPU线程和堆栈跟踪。