5 ms·
Huh, I had the opposite experience trying to use wsl1 with a rails app, which required lots of workarounds. Postgres never worked for example natively. Severa
by tarr11 6y ago
Huh, I had the opposite experience trying to use wsl1 with a rails app, which required lots of workarounds.
Postgres never worked for example natively. Several npm modules would fail when running webpack.
wsl2 worked perfectly for these cases.
I wonder if people are mounting an ntfs volume in wsl2 which is really slow and janky?
- tyingq 6y agoThere's examples of people using the Linux filesystem and having the issue. From reading the issue and related ones, it sounds like it might be related to some sort of unpredictable unclean VM shutdown.
- cambalache 6y agoI develop Rails in WSL1 just fine. > Postgres never worked for example natively. That's a minor incovenience at worst. I will stay put in WSL1. If I wished a VM I would have just installed VMWare and run some Linux ISO image from it.
- pydry 6y agoI mean, why not do that? I tried WSL because I thought it would be faster than a heavyweight VM. Turned out it's dog slow in comparison. Honestly don't see a use for it.
- shawnz 6y agoI find the opposite, WSL1 is much faster for pretty much every usage except workloads that involve reading/writing lots of files.
- pydry 6y agoThe difference on I/O is enough to make WSL unusable. I wasted a day trying to figure out if I had a problem with anti-virus or something that was blocking me before realizing that WSL I/O is just... well, slow. People kept telling me to upgrade to WSL2 to solve that but the version of windows I had didn't allow it. Might have been a blessing in disguise given the data corruption bugs.
- alexhutcheson 6y agoWhat version of Windows doesn’t have WSL2?
- shawnz 6y agoYou need at least Win 10 version 1903
- scpedicini 6y agoIt was introducing in windows 10 release 2004. A lot of users myself included are still stuck on the 1909 update because it does not show up in our list of automatic updates. This usually happens if Microsoft update determines that some of your hardware may cause BSODs with the new update.
- Koshkin 6y agoAny version from 1.0 to 10.1809.
- Dylan16807 6y agoWSL1 is much better integrated, which is useful for some things, especially when networking is involved. And it wastes less memory as a consequence. The root partition is slower, but I'm usually manipulating windows files anyway so both versions are similarly slow. I use WSL2 right now, but only because I need to mount a vhd that's formatted with BTRFS.
- birdyrooster 6y agoYou can’t compile anything with WSL1, did you notice that?
- Dylan16807 6y agoDo you mean kernel modules? You can compile programs just fine. There's a whole infrastructure around using visual studio code to run the UI natively and compile things inside the linux environment.
- Normal_gaussian 6y ago> That's a minor incnvenience at worst. The level of inconvenience purely depends on your stack and how its developed. Often things which don't bother me have huge effects on other members of my team, or on people working on other projects.
- dmurray 6y ago> That's a minor incovenience at worst. What a bizarre claim. It's irrelevant if you don't need Postgres, a minor inconvenience if you can easily adopt a workaround, and a show stopper if you were relying on accessing a local Postgres instance.
- cambalache 6y agoHave you developed in this environment? I have developed more than 20 sites in WSL1, all with PG as the DB. I have it running in the same machine in windows for developemnt(which you are running otherwise you wouldnt be in WSL).Instead of using "localhost" you use "127.0.0.1" in your configuration, that's it.
- dvdkon 6y agoI have scripts that rely on connecting to PostgreSQL via a UNIX socket, I couldn't use these scripts on WSL. A workaround wouldn't be too hard, but ideally WSL should be 100% Linux-compatible in my opinion.
- dmurray 6y agoNo, I haven't. Thanks for clarifying, that does make it sound like much less of a problem. Though it might still catch out some people, e.g. on a corporate machine where you're permitted to run WSL but not Postgres.
- loeg 6y agoCan't you just run Postgres natively on Windows? It's a database, you can talk to it from WSL over a local socket, no?
- cambalache 6y agoYes, that's what I do, and it is completely transparent. I dont know why people are so dumbfounded because I wrote it was a minor inconvenience at worst.
- macdice 6y ago> Postgres never worked for example natively We (postgres) did fix an ENOSYS (missing syscall) problem at some point so WSL could run Postgres. The surprising thing for me was how long it took for anyone to tell us it was broken/spewing warnings. That was forced when we changed a warning to a panic.