What does java “VM thread” do?

后端 未结 3 2100
盖世英雄少女心
盖世英雄少女心 2020-12-11 17:33

I use jstack to output the thread info. And there is a thread: \"VM Thread\" prio=10 tid=0x0878b400 nid=0x760a runnable

What is this thread used to do? It takes 50%

3条回答
  •  心在旅途
    2020-12-11 17:58

    How do you know that this thread is taking 50% usage? Being runnable doesn't mean its consuming cpu.

    AFAIK this is used for internal java operation, possibly involved in GC.

    Which version of java are you using? I would check you have an up to date version of Java and see if this still happens.

    I would suggest you memory profile your application to see how much objects you are creating and see if you can reduce your object count to reduce any GC work load.

提交回复
热议问题