rmi.transport.tcp.tcptransport Connectionhandler消耗大量CPU

发布于 2024-10-20 14:46:47 字数 534 浏览 2 评论 0原文

我正在运行一个第三方 RMI 服务器应用程序,只提供一种方法 ("getImage()" 以 byte[] 形式返回图像。 此方法的实现(通过 SOAP-WS 获取图像) )是我提供的。

运行此 RMI 服务器的问题是 CPU 消耗较高(使用 jvisualvm 测量):65% 的 cpu 时间用于 “sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()”位居第二位的是 “sun.net.www.http.KeepAliveCache.run()”,占 15%。 “真实”作品(缩放图像)排在第四位。 服务器运行在win 2003服务器上。我猜资源/连接处理有问题?但这是实现问题还是 Windows 配置问题?

另一个观察结果是:如果 cpu 利用率很高,那么内存利用率也会上升 - 问题是:这是因为 gc 无法完成其工作还是因为许多图像等待传递。我只能说内存用于byte[]

那么有什么想法该怎么做吗?

提前谢谢

i am running an third party RMI-Server app providing exactly one method ("getImage()" returns an image as byte[]). The implementation of this method (getting the image via a SOAP-WS) is provide by me.

The problem on running this RMI-Server is the high CPU consumption (measured with jvisualvm): 65% of cpu time go into "sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()" and on second place with 15% is "sun.net.www.http.KeepAliveCache.run()". The "real" work (scaling the image) comes on 4th place.
The server is running on win 2003 server. i guess there is something wrong with resource/connection handling?? but is this an implementation problem or a windows configuration-problem?

another observation is: if cpu utilization is high the memory utilization goes also up - the question is: is this because the gc can't do its work or many images waiting to be delivered. all i can say the memoryis used for byte[].

so any ideas what to do?

thx in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

栀梦 2024-10-27 14:46:47

sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run() 是在编组参数之后和编组结果之前调用服务器中的远程实现的方法。这些计时可能意味着通过线路返回图像作为 RMI 结果比缩放图像需要更多时间。

sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run() is the method that calls your remote implementations in the server, after marshalling the arguments and before marshalling the result. The timings probably mean that it takes more time to return the image over the wire as the RMI result than it does to scale the image.

提赋 2024-10-27 14:46:47

我只能推测字节数组可能是图像,但它可以是任意数量的东西。

顺便说一句,你正在运行多核机器吗?我也遇到了这个问题,发现 VisualVM 指出了同样的罪魁祸首,四核 Win7 机器上的 CPU 利用率约为 50%,单核 winXP 上的 CPU 利用率为 100%。我正在为服务器运行 Jetty。

抱歉,我还不能回答真正的问题,但希望在这里听到解决方案或很快能够在这里分享一个解决方案。既然您几个月前遇到了这个问题,也许您已经找到了一个并且可以分享?

I can only speculate that the byte array could be the image but it could be any number of things.

BTW are you running a multi core machine? I am also having this problem and found that VisualVM pointed at that same culprit at around 50% CPU utilization on the quad core Win7 machine and 100% on single core winXP. I am running Jetty for the server.

Sorry I can't answer the real question yet, but hope to hear a solution here or to be able to share one here soon. Since you ran into this a few months back maybe you already found one and can share?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文