Memory consumed by a thread

前端 未结 2 1927
独厮守ぢ
独厮守ぢ 2020-12-14 03:45

I need to monitor the amount of memory consumed by threads spawned by my application. The idea is to take corrective actions, if a greedy thread consumes too much of memory.

2条回答
  •  渐次进展
    2020-12-14 04:25

    Java VisualVM can be used "to monitor a local application and view real-time, high-level data on the memory heap, thread activity, and the classes loaded in the Java Virtual Machine (JVM). Monitoring an application imposes low overhead and can be used for extended periods."

    See also How to monitor Java memory usage? for other possibilities.

提交回复
热议问题