search

Home  >  Q&A  >  body text

java web一般占多少内存

我一个web应用打包之后36M作用,但是跑起来占用内存7,800M,这正常么?如果不正常怎么去检测是哪个地方占用了大量内存啊?

大家讲道理大家讲道理2892 days ago463

reply all(3)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:39:18

    How much memory a program takes up when running has nothing to do with the amount of your code. It has something to do with how your code is written. A few lines of code can also cause the memory to explode. To analyze the memory usage, just dump the heap memory and see if The program has always maintained 7,800M of memory, indicating that there is no memory leak or other problem.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:39:18

    Use jmap -histo your pid to see where a lot of memory is occupied

    reply
    0
  • 迷茫

    迷茫2017-04-18 09:39:18

    Have you set the heap size? These are the parameters Xmx Xms

    reply
    0
  • Cancelreply