简体   繁体   English

在Linux系统上使用Java / Eclipse TPTP进行16线程/ 16核心代码分析

[英]16 Thread / 16 core code profiling with Java / Eclipse TPTP on Linux system

I have developed a nice multi-Threaded genetic algorithm in Java that runs on a 16-core system running CentOS with 128GB of RAM. 我已经用Java开发了一个不错的多线程遗传算法,该算法在运行CentOS的16核系统上运行,并具有128GB的RAM。

I want to use a code profiler to see if I can figure out which portion of the code is getting bogged down when I increase the number of mutations in my simulation beyond a certain point. 我想使用代码探查器来查看当我将模拟中的突变数量增加到超过某个特定点时是否可以找出代码的哪一部分陷入了困境。 Memory doesn't seem to be the issue. 内存似乎不是问题。

So I installed VNC and Eclipse 3.6SR2 on the server and installed the TPTP plugin. 因此,我在服务器上安装了VNC和Eclipse 3.6SR2,并安装了TPTP插件。

PROBLEM: The biggest issue is that it doesn't look like eclipse is using more than one core when I am doing the TPTP "execution time analysis" (I checked using 'top'). 问题:最大的问题是,当我执行TPTP“执行时间分析”(我使用“ top”进行检查)时,eclipse似乎并没有使用多个内核。 Normally when the program is run from the command line it uses as many cores as there are threads in the program. 通常,从命令行运行程序时,它使用的内核数与程序中线程的数量一样多。

Is there a way to fix this in the eclipse configuration? 有没有办法在Eclipse配置中解决此问题?

Get a real profiler like YourKit and add the agent to your application at startup. 获取像YourKit这样的真实探查器,并在启动时将代理添加到您的应用程序中。

Then you can open an SSH tunnel with the port where the agent is running and you can remotely profile your application. 然后,您可以使用代理运行所在的端口打开SSH隧道,并且可以远程分析应用程序。 It has a quite good documentation and a healthy community in their forums. 在他们的论坛中,它具有相当好的文档和健康的社区。 And in my opinion YourKit is great for multithreaded applications, I use it a lot. 我认为YourKit非常适合多线程应用程序,我经常使用它。

No need for VNC and installing Eclipse on a production server. 不需要VNC并在生产服务器上安装Eclipse。

Disclaimer: My company develops JProfiler 免责声明:我的公司开发JProfiler

A profiler that uses JVMTI should not change the multi-core thread distribution with respect to a regular execution. 使用JVMTI的探查器不应更改常规执行的多核线程分配。 TPTP may not be the best option for you. TPTP可能不是您的最佳选择。

There are several powerful Java profilers in the market. 市场上有几种功能强大的Java分析器。 The most well-known free option is VisualVM and a commmercial alternative with much more powerful analytic capabilities in the area of multi-threading and monitor contention analysis is JProfiler - there's a fully functional free trial. 最著名的免费选项是VisualVM,而在多线程和监视器争用分析领域中具有更强大的分析功能的商业替代产品是JProfiler-有一个功能齐全的免费试用版。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM