高CPU占用

huangapple 未分类评论46阅读模式
英文:

High CPU consumption

问题

我最近在处理一个多线程应用程序,其 CPU 消耗比正常情况高出一倍还多。
有 4 个变量应保持一致,因此我为它们使用了 'volatile' 关键字。
它们仅用于监控,不干扰应用程序流程。
最近我在我的应用程序上遇到了 CPU 消耗翻倍的情况,想知道是否可能是这种情况。
为了澄清,所有线程都是这些变量的读写者。

英文:

I’m dealing lately with more than doubled cpu consumption than normal in my multi-threaded app.
There are 4 variables that should be consistent and therefore i use ‘volatile’ key word for them.
They are just for monitoring and don’t interfere the app flow.
lately I encountered the doubled CPU consumption on my app and wondered if it’s may be the case.
for clarification all the threads are readers and writers of those variables.

huangapple
  • 本文由 发表于 2020年5月5日 06:44:26
  • 转载请务必保留本文链接:https://java.coder-hub.com/61602869.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定