Home  >  Q&A  >  body text

linux java 程序运行慢原因查找?

测试环境中,自己在一台linux的机器中部署java程序,运行特别慢,之前速度还是可以的。同样的程序在其他机器上运行很快。

针对这种情况,应该怎么入手去查找原因呢?

伊谢尔伦伊谢尔伦2715 days ago446

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-18 10:25:31

    The question is not very detailed

    1. First check whether the entire Javaapplication is slow or just a certain request

    2. Look at the machine’s CPU load, CPU utilization, and I/O conditions

    3. If there is no problem with 2, then look at the GC status of the applicationJava

    4. If there is no problem in 3, then dump all

      and see what the threads are doingJava

    5. If you rely on external services (database/other services), check whether the health of other services is good

    6. If there are many dependencies, you need to analyze where the slowness is based on the calling link (starting from the reverse proxy, to Tomcat, to the application (including cache, database), then to page rendering and finally to browser parsing)

    7. reply
      0
  • 黄舟

    黄舟2017-04-18 10:25:31

    Ping and check the network situation
    iostat jstack

    reply
    0
  • Cancelreply