多线程应用程序有哪些有用的JVM选项? [英] What are the useful JVM options for a multithreaded application?
问题描述
我正在开发一个创建大量线程并严重依赖String操作的应用程序.
该应用程序一次可以运行24小时,并且需要始终保持快速响应.
我试图将对象的创建减到最少.该应用程序目前运行良好,无需进行任何配置.
I am working on an application that creates a lot of threads and relies heavily on String manipulation.
The application works for a good 24 hrs at a time and needs to be always very responsive.
I am trying to keep the creation of objects to a minimum. The application is doing well without any configuration at the moment.
但是我想知道的是,使用特定的JVM配置是否有任何优势(或劣势)?
请多多包涵,关于JVM/GC配置的话题我还很陌生:
我开始阅读: http://www.oracle.com /technetwork/java/javase/tech/vmoptions-jsp-140102.html
对此主题的任何提示将不胜感激.
But I was wondering for my own knowledge if there were any advantages (or disavantages) in using a specific JVM configuration?
Please bear with me, I am pretty new on on the subject of the JVM/GC configuration:
I started reading: http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
Any tips on the subject would greatly be appreciated.
预先感谢
推荐答案
通常,关于调整JVM的最佳建议是不要.除非使用默认设置遇到与JVM相关的特定问题,否则请不要理会它们.
Generally, the best intial advice concerning tweaking your JVM is don't. Unless you are experiencing specific JVM-related problems with the default settings, leave them alone.
如果您确实需要弄乱设置,我建议您设置一个有代表性的测试用例,并使用一个高级分析器,例如
If you do need to fiddle around with the settings, I would recommend you set up a representative testcase and use an advanced profiler such as JProfiler.
此外,您应该真正阅读有关HotSpot VM的技术文档,特别是《内存管理白皮书》,您可能会发现所有这些文档
Furthermore, you should really read the technical documentation regarding the HotSpot VM, specifically the Memory Management Whitepaper, all of which you may find here.
这篇关于多线程应用程序有哪些有用的JVM选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!