JDK-8209383 : Performance regression in Startup3-Jetty-* in Windows needs investgation
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 12
  • Priority: P3
  • Status: Resolved
  • Resolution: Won't Fix
  • OS: windows_2008,windows_7
  • CPU: x86_64
  • Submitted: 2018-08-10
  • Updated: 2020-10-28
  • Resolved: 2020-10-28
Related Reports
Relates :  
Description
Theres a noticeable performance regression with Startup-Jetty on Windows/x64 that needs to be investigated. Happens with both Windows 7 and Windows Server 2008.

WXD   -7.40%
WXS   -6.81%

The regression reproduces when ran on the same machine (ie, triage).
The regression reproduces when ran on a different machine (ie, re-traige).
A JVMswap run indicates the cause is in the JDK (ie, not the JVM).

Comments
I think it's time to close this one. I tried the patch a few months ago, but it resulted in some test failures. Further work would be needed to find a working fix. But I would like to make the case that his is not vital to fix: * the regression doesn't happen by default, with the G1 collector * if needed, there is a workaround - the cache can be re-enabled with the "sun.io.useCanonCaches" This issue can be reopened later, if necessary.
28-10-2020

As a point of interest, the test failures all appear to be in the area of capitalization / upper/lower case.
30-06-2020

I tried the patch on jdk/jdk, but am seeing some test failures: sun/security/tools/jarsigner/SameName.java java/io/File/WinDeviceName.java java/io/File/MaxPathLength.java
26-06-2020

7-13% improvements with v2 - and higher statistical significance. Seems we're neutralizing the regression caused by JDK-8207005 and then some, with this.
24-08-2018

Thanks Claes. I've attached another version of the patch, wcanonicalize_v2.patch. It might squeeze out some more. Please give it a try as well - thanks.
23-08-2018

5-10% improvements on Jetty startup on Windows with the patch. 2 out of 4 tests are statistically significant, one borderline.
23-08-2018

Trying it out, thanks!
23-08-2018

Attached a small patch with some possible performance improvements for the existing canoncalization code, please try it out.
23-08-2018

Disabling the file cache increases time spent in the native canonicalization layer, and there's a possibility there are inefficiencies here that has simply been hidden away due the cache in the java layer. Markus has agreed to take a look at possible optimizations.
22-08-2018

This is more or less expected, based on testing done for JDK-8207005. Actually, I thought G1 would also be affected, so I'm glad to see that it doesn't seem to be. I will look into if there's anything we can/should do.
13-08-2018

[~bchristi] Hi Brent you can evaluate if this is worth further work, we only observe the regression on Windows with ParGC -thanks, Eric
13-08-2018

This regression only happens on Windows with parallel gc, not the default G1, and the cache can be turned back on with "sun.io.useCanonCaches" as shown in 8207005.
13-08-2018

This appears to be due to changeset: 51039:ae39e5a991ed user: bchristi date: Wed Jul 11 14:32:42 2018 -0700 files: src/java.base/share/classes/java/io/FileSystem.java description: 8207005: Disable the file canonicalization cache by default Reviewed-by: alanb, bpb
13-08-2018