正如在下面的问题中提到的,我们看到部署在RHEL上的spring云网关应用程序的cpu利用率很高。以下链接中提供了详细信息
https://github.com/spring-cloud/spring-cloud-gateway/issues/1908
根据@spencergibb给出的建议,我已经尝试了最新版本的网关和引导,但在PST期间仍然看到高cpu利用率。看起来大部分的使用率都是由反应器"epoll“线程完成的。
有没有任何可以尝试提高性能的反应器/网络优化?似乎除了"epoll“之外还有使用NIO的选项-这个开关可能吗?
我可以在日志中看到下面的警告。这是否与这种高cpu利用率有关-
[2020-08-21 13:45:38,537] [] [15854] [main] [DEBUG] [i.n.u.internal.NativeLibraryLoader] - Unable to load the library 'netty_transport_native_epoll_x86_64', trying other loading mechanism.
java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll_x86_64 in java.library.path
[2020-08-21 13:45:38,567] [] [15884] [main] [DEBUG] [i.n.u.internal.NativeLibraryLoader] - Successfully loaded the library /tmp/libnetty_transport_native_epoll_x86_6488
16793540849624173.so
[2020-08-21 13:45:38,568] [] [15885] [main] [DEBUG] [r.netty.resources.DefaultLoopEpoll] - Default Epoll support : true
[2020-08-21 13:45:38,569] [] [15886] [main] [DEBUG] [r.netty.resources.DefaultLoopKQueue] - Default KQueue support : false
[2020-08-21 13:45:38,581] [] [15898] [main] [DEBUG] [i.n.c.MultithreadEventLoopGroup] - -Dio.netty.eventLoopThreads: 12发布于 2020-08-21 15:26:48
您可以通过系统属性或通过服务器/客户机级的配置来控制将使用的传输。因为您在Spring Gateway中,所以最好通过系统属性来控制它。使用-Dreactor.netty.native=false。Here你可以找到更多关于配置线程等的信息。
对于Spring Gateway的链接问题,尝试将JMeter从Spring Gateway中分离出来。在同一台机器上运行它们是不好的。
https://stackoverflow.com/questions/63517483
复制相似问题