Windows Linux subsystem problem

5 views
Skip to first unread message

Roger Kaufman

unread,
Aug 21, 2023, 11:46:38 AM8/21/23
to anti...@googlegroups.com
Hi All,

I don't know if anyone has tried a linux system in Windows. I installed
Ubuntu 22.04.2 LTS from the windows store.

I currently used Cygwin 64 because it is so well integrated with
Windows. Any .exe, .com, .bat file can be run from the command line.

To do this with the linux sub-system there is a function that can be
added to the .bashrc. This works as long as the executable is in the path.
https://superuser.com/questions/1546664/git-bash-in-windows-requires-exe-extension-for-some-but-not-all-programs

The showstopper is that the executable's can take as long as 20 seconds
to exit. There doesn't seem to be any notable use of
resources when it happens. This makes it not of practical use so I'm
staying with Cygwin 64 for a bash shell at present.

Also there is no way to backup/restore individual files in the
sub-system as it seems to reside inside glob file as seen from the
windows file system.

Roger

Adrian Rossiter

unread,
Aug 21, 2023, 3:59:01 PM8/21/23
to anti...@googlegroups.com
Hi Roger

On Mon, 21 Aug 2023, Roger Kaufman wrote:
> I don't know if anyone has tried a linux system in Windows. I installed
> Ubuntu 22.04.2 LTS from the windows store.
...
> The showstopper is that the executable's can take as long as 20 seconds to
> exit. There doesn't seem to be any notable use of

I only use it occasionally, just to check if the Antiprism packages for
Ubuntu are working on it. That is strange about the long exit time
for native executables.

Adrian.
--
Adrian Rossiter
adr...@antiprism.com
http://antiprism.com/adrian

Roger Kaufman

unread,
Aug 22, 2023, 4:16:24 PM8/22/23
to anti...@googlegroups.com
Hi Adrian,

On 8/21/2023 3:58 PM, Adrian Rossiter wrote:
> I only use it occasionally, just to check if the Antiprism packages for
> Ubuntu are working on it. That is strange about the long exit time
> for native executables.

I've tried a number of things, one as drastic as completely
uninstalling/reinstalling WSL but the problem remains.

https://superuser.com/questions/1762576/why-are-exe-very-slow-when-run-from-wsl2-filesystem

The problem seems to be that exe files which are executed inside the
filesystem are much slower. I've been able to confirm the example.

roger@interocitor:~$ time /mnt/c/WINDOWS/system32/whoami.exe
interocitor\roger

real    0m0.091s
user    0m0.000s
sys     0m0.002s

roger@interocitor:~$ cp /mnt/c/WINDOWS/system32/whoami.exe .
roger@interocitor:~$ time ./whoami.exe
interocitor\roger

real    0m20.143s
user    0m0.001s
sys     0m0.000s

One thing I learned along the way is that I still had WSL 1 installed.
If no longer needed, it can be uninstalled by unchecking 'windows
subsystem for linux' in the Programs and Features/Windows Features
sub-panel.

WSL 2 is no longer stock and is installed from the Windows store.

The problem above occurred in Ubuntu and Debian installs, then I
discovered the issue was not in the distributions.

I am running Windows 11.

Roger

Roger Kaufman

unread,
Aug 25, 2023, 1:54:56 PM8/25/23
to anti...@googlegroups.com
Hi Adrian,


On 8/22/2023 4:17 PM, Roger Kaufman wrote:
I've tried a number of things, one as drastic as completely uninstalling/reinstalling WSL but the problem remains.

https://superuser.com/questions/1762576/why-are-exe-very-slow-when-run-from-wsl2-filesystem

The problem seems to be that exe files which are executed inside the filesystem are much slower. I've been able to confirm the example.

To test vr1tovr2.exe (and core files), I ended putting them all in my C:/bin directory since this will be available in all subsystems under Window (Cygwin, and WSL/Ubuntu). Doing it this way, the x3dview script (which can reside in HOME/bin) (using the -v parameter) was just as fast in both systems. Note that I also have a Windows install of view3dscene.exe (for the -x paramter) so it is also outside the WSL2 file system.

These is a procedure to be able to have the HOME directory outside of WSL2 in the Windows files system but that file system isn't Posix. Such that the default Windows files system isn't case sensitive e.g you can't have both a.off and A.off.

https://superuser.com/questions/1727140/wsl-2-0-ubuntu-relocating-home-directory

The specific note is:

mkdir C:\lhome
# directory must be empty
fsutil.exe file setCaseSensitiveInfo C:\lhome\ enable

The problem is that not only the HOME directory is affected and /usr/local would also be subject to the problem. I suppose this directory could be linked to /mnt/c/something

For now I'm going to wait to see if Microsoft gets this fixed (and keep using Cygwin64 bash).

As for backing up individual files, the whole HOME directory could be copied and gziped onto a Windows drive perhaps as a cron job.

Roger
Reply all
Reply to author
Forward
0 new messages