[External] : Re: WSL building performance and questions

erik.joelsson at oracle.com erik.joelsson at oracle.com
Mon May 8 17:57:03 UTC 2023


On 5/8/23 10:42, - wrote:
> Thank you for your quick response!
> I just took a few hours and successfully set up and built from WSL 1.
> It indeed is even faster than cygwin.
> Meanwhile, it's fascinating that the relative directory problem
> doesn't exist on WSL 1, that passing build/jmh/jars allows configure
> to locate JMH just fine.
>
> Since WSL 1 and WSL 2 have such dramatic differences, should we
> briefly mention in building documentation that building with WSL
> should be primarily done with WSL 1, given now the default WSL
> installed from Microsoft Store only supports WSL 2?

I assumed the documentation had been updated to reflect that already 
back when the problems with WSL 2 were discovered, but looking now, 
there is nothing there. I suppose WSL 1 was still default at that time. 
Yes, I think we should update the documentation, especially if the 
default has changed to WSL 2.

/Erik

> Gratefully,
> Chen Liang
>
> On Mon, May 8, 2023 at 8:36 AM <erik.joelsson at oracle.com> wrote:
>> Hello Chen,
>>
>> On 5/5/23 22:42, - wrote:
>>> Hello,
>>> While I was trying to diagnose the problem that JMH benchmarks can't
>>> be run on a fresh cygwin or WSL environment,
>>> https://bugs.openjdk.org/browse/JDK-8305669 I found myself troubled
>>> with path issues and slow building speed with a Windows target.
>>> Meanwhile the linux target is totally fine.
>>>
>>> 1. When I pass --with-jmh=build/jmh/jars in WSL configuration, it
>>> always fails to find the relative directories (not present on linux
>>> configuration). C:\\...\\jdk\\build\\jmh\\jars doesn't work. Only
>>> /mnt/c/.../jdk/build/jmh/jars work. Is this a bug?
>> I would say it's a bug.
>>> 2. My Windows WSL build is extremely slow. My windows target has
>>> almost stalled that it stuck on creating benchmark jar without even
>>> progressing to indify. And it seems WSL (Ubuntu) itself is only using
>>> 400MB of RAM with almost no CPU usage. However, these problems don't
>>> happen for my Linux target builds; meanwhile my cygwin builds are
>>> blazingly fast. What could be the cause of this slowness?
>>>
>> Are you running WSL 1 or 2? From what I've heard, WSL 2 doesn't work
>> well when having to interact with native Windows tools (which the
>> windows build has to do). Most reports I've heard about WSL 1 say it's
>> slightly faster than Cygwin, but different people and different
>> environments have different results.
>>
>> /Erik
>>
>>



More information about the build-dev mailing list