(为什么)Tomcat/Java 在 Linux 上的性能比在 Windows 上更好?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2618507/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 14:15:28  来源:igfitidea点击:

(Why) does Tomcat/Java perform better on Linux than on Windows?

javawindowslinuxperformancetomcat

提问by ripper234

I just read this (one) studyin which Tomcat under Linux outperformed Windows.

我刚刚读了这篇(一)研究,其中 Linux 下的 Tomcat 性能优于 Windows。

From your experience, is this generally true? Any deep reason that could explain the performance difference?

根据您的经验,这通常是真的吗?任何可以解释性能差异的深层原因?

回答by Hyman

I don't thing such benchmarks can be so informative, then this one is 4 years old.

我不认为这样的基准可以提供如此丰富的信息,那么这个基准已经有 4 年历史了。

By the way these differences usually reside in certain choices related to how the operating system manages memory, cache and threads..

顺便说一下,这些差异通常存在于与操作系统如何管理内存、缓存和线程相关的某些选择中。

回答by duffymo

I take any benchmark with a grain of salt. It's possible to game any comparison.

我对任何基准都持保留意见。可以进行任何比较。

I find that one key is to try and spot any bias that the person doing the comparison might have. There was an infamous comparison of the Java EE Pet Store done with .NET several years back. The group doing the study had been paid by Microsoft. They didn't do all they could to optimize the Java EE solution, putting it in a bad light. The results were discredited as a result.

我发现一个关键是尝试发现进行比较的人可能存在的任何偏见。几年前有一个臭名昭著的 Java EE Pet Store 与 .NET 的比较。进行这项研究的小组由微软支付。他们没有尽其所能来优化 Java EE 解决方案,从而使之处于不利地位。结果被抹黑了。

Does WebPerformance.com have any Linux bias?

WebPerformance.com 是否有任何 Linux 偏见?

If not, there are a lot of factors that enter into such a result. I'd compare all of them carefully, and try to see if I could spot anything important that might have been left out.

如果不是,则有很多因素会导致这样的结果。我会仔细比较所有这些,并尝试看看我是否能发现任何可能被遗漏的重要内容。

回答by Artyom

Few points (mostly speculation):

几点(主要是猜测):

  • Tomcat developed by FOSS on FOSS software, so it is reasonable that it would perform better on FOSS software.
  • Linux is better operating system ;-)
  • Tomcat是由FOSS在FOSS软件上开发的,所以在FOSS软件上性能会更好是合理的。
  • Linux是更好的操作系统 ;-)

Generally. It depends on fine tuning experience... If you know windows well you'll tune it better for windows and if you know Linux better then...

一般来说。这取决于微调经验......如果你很了解windows,你会更好地为windows调优,如果你更了解Linux,那么......