简体   繁体   English

Java(Solr)线程转储有多贵?

[英]How expensive are Java (Solr) thread dumps?

As part of some ongoing maintenance, we have been taking regular thread dumps for all threads in the JVM at a one minute interval. 作为一些持续维护的一部分,我们一直在为JVM中的所有线程定期进行线程转储。 (Eg curl http://localhost:8983/solr/admin/threaddump.jsp ) (例如curl http://localhost:8983/solr/admin/threaddump.jsp

What are the performance / other negative impacts of continuing this practice indefinitely? 无限期地继续这种做法有什么表现/其他负面影响?

Generally, JVM thread dumps are cheap, low impacting, regardless of the applications. 通常,无论应用程序如何,JVM线程转储都很便宜,影响很小。 Jmap -histos on the other hand, can be very performance impacting. 另一方面,Jmap -histos可能会对性能产生很大的影响。 I work in maintance, we do a lot of thread dumps, never seen a direct crash caused by thread dumping. 我在maintance工作,我们做了很多线程转储,从未见过线程转储导致的直接崩溃。

The only problem with running dumps once a minute is too much information. 每分钟运行一次转储的唯一问题是信息太多。

Are you appending the dump to a separate file? 您是否将转储附加到单独的文件? In my experience you have to look at dumps over time to catch things like transient lock contention. 根据我的经验,您必须随着时间的推移查看转储以捕获瞬态锁争用等问题。

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

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