简体   繁体   English

Windows 10 上的 Apache Tomcat 9

[英]Apache Tomcat 9 on Windows 10

VMware ESXi 6.5 and later (VM version 13) VMware ESXi 6.5 及更高版本(VM 版本 13)
2x CPU (Xeon E5-2620 v3) 2x CPU (至强 E5-2620 v3)
16,384 MB memory 16,384 MB 内存
Guest OS: Windows 10 Pro 1809 (build 17763.55)来宾操作系统:Windows 10 Pro 1809(内部版本 17763.55)

Performance of the VM is very sluggish, even through the VMware console connection.即使通过 VMware 控制台连接,VM 的性能也非常缓慢。 Looking at the Resource Monitor, the tomcat9.exe process is the main hog of CPU time.查看资源监视器,tomcat9.exe 进程是 CPU 时间的主要消耗者。 This process has between 150-180 threads running and average CPU utilisation of around 75% with overall CPU hovering around 90-100%.这个过程有 150-180 个线程在运行,平均 CPU 利用率约为 75%,整体 CPU 徘徊在 90-100% 左右。
I have been reading that Tomcat should be able to run on minimal resources so there must be something else going on here.我一直在读到 Tomcat 应该能够在最少的资源上运行,所以这里肯定有其他事情发生。 Unfortunately I know very little about Tomcat so am at a loss of what to look for.不幸的是,我对 Tomcat 知之甚少,所以我不知道要寻找什么。 I have rebooted the VM and have nothing running on it (apart from the Resource Monitor).我已经重新启动了虚拟机并且没有任何东西在上面运行(除了资源监视器)。
Surely Tomcat should not be monopolising the CPU like this?当然Tomcat不应该像这样垄断CPU吗?

It also seems like a Java process is high on the CPU utilisation list.在 CPU 利用率列表中,Java 进程似乎也很高。 Conversely, we have another instance using Tomcat 8 on Windows 7 which is not taxing the CPU at all.相反,我们有另一个在 Windows 7 上使用 Tomcat 8 的实例,它根本不会占用 CPU。

In this specific case, increasing the amount of memory available to the Java Virtual Machine (JVM) solved the problem.在这种特定情况下,增加 Java 虚拟机 (JVM) 可用的内存量解决了这个问题。

Refer this article for How to Increase Java Memory in Windows请参阅本文以了解如何在 Windows 中增加 Java 内存

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM