JDK-8294437 : java/nio/channels/FileChannel tests slow on Windows
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2022-09-27
  • Updated: 2024-01-02
  • Resolved: 2022-10-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20
20 b18Fixed
Related Reports
Relates :  
Description
The following tests take much longer to execute on Windows, as compared to other platforms:
java/nio/channels/FileChannel/TransferTo6GBFile.java - 91 seconds
java/nio/channels/FileChannel/Transfer4GBFile.java - 85 seconds
java/nio/channels/FileChannel/Transfer2GPlus.java - 85 seconds

On other platforms the same tests complete under a second.
The tests are run in exclusive mode, which means that they are never run in parallel, which slows down tier2 testing even more.

We can probably speed up these tests by making sure that the test files are created with StandardOpenOption.SPARSE.
Comments
Changeset: a4f2078b Author: Daniel JeliƄski <djelinski@openjdk.org> Date: 2022-10-03 17:42:56 +0000 URL: https://git.openjdk.org/jdk/commit/a4f2078bd60d06795099c52ca8d437a8128eb8f6
03-10-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10464 Date: 2022-09-28 10:58:43 +0000
28-09-2022

one more test to examine: java/nio/channels/FileChannel/LargeMapTest.java - 172 seconds it's slow on all platforms, but again much slower on Windows, and could see some improvement from sparse files
28-09-2022

[~alanb] I chatted with Brian briefly; he said he was not looking into these tests at the moment, and I could take them if I wanted to.
27-09-2022

[~djelinski] Can you check with [~bpb] as I think he is already looking to changing these tests to use sparse files.
27-09-2022

Thanks. One other thing is that I think the tests run with exclusive.dirs set so that they don't running concurrently with each other. This has a bit impact on macOS systems with HDD. The tests will of course run concurrently with tests in other directories.
27-09-2022