12 comments

  • lacuno-cloud 2 minutes ago
    I am not sure about WSL in general right now - no matter if WSL3 is more performant.

    For me, Claude bypassed my sudo security by executing `wsl.exe -u root`. The Claude does not need any sudo password :)

  • jesse_dot_id 1 hour ago
    I jumped ship from Windows a couple of years ago after having used it since the early 90's. One of the primary reasons was how much I had to fight with WSL2 in my day-to-day work. But now it's becoming even more apparent that Microsoft does not care about its operating system. I don't even know what they could do to get me back. Trust continues to be a huge problem in the AI era of Microsoft.
    • pizza234 3 minutes ago
      I had the opposite experience.

      I'm a hardcore Linux user, but it's a fact of life that laptops are not very well supported. There are some that are very compatible, but generally speaking, I need to trade off software (Linux compatibility) for hardware (laptop choice) or viceversa.

      WSL allowed me to choose any laptop I want and run the subset of Linux that matters for me. For my use case (that is, not quickly accessing huge amounts of files, performance was ok - as a matter of fact, the author of the article got a very reasonable performance loss on realworld tasks (-4% ~ -16%).

      The only thing that I found truly irritating is attaching USB storages, but I ended living with that.

    • throwa356262 1 hour ago
      WSL has been god send for corporate employees who get a windows laptop but need to do real work.

      But everyone knows that performance of WSL is nowhere near native linux on the same machine.

      • simonjgreen 19 minutes ago
        Delightful way to write off an enormous cohort of people and huge variety of work.
        • throwa356262 1 minute ago
          I spend most of times in meetings and filling excel sheets.
      • pjmlp 23 minutes ago
        Some of us also do real work on Windows, ask Valve.
        • mhh__ 15 minutes ago
          Sure and there are billion dollar systems at every bank that runs entirely on VBA macros in excel doesn't mean its not structurally flawed.
          • pjmlp 14 minutes ago
            Worse is better, isn't that the UNIX motto?
            • gchamonlive 11 minutes ago
              Only when it's misunderstood
      • zeryx 37 minutes ago
        Honestly the performance hit of WSl even being alive and running in the background of my XPS was so bad I just ssh into a workstation and do everything on there instead. Trying to get windows to just be usable is such a massive pain in the ass.
      • secondcoming 31 minutes ago
        Luckily I'm allowed use Hyper-V for Linux work
        • pjmlp 24 minutes ago
          Guess where WSL runs on?
    • chris_money202 52 minutes ago
      Did you work out of /mnt/c?
      • jesse_dot_id 15 minutes ago
        My problems weren't performance related, aside from the occasional catastrophic memory leak; most of my biggest headaches were related to networking.
      • DiabloD3 43 minutes ago
        I suspect they did. 100% of cases where people complain WSL2 was slow and I helped debug was this specific incorrect usage.
    • shevy-java 1 hour ago
      For me Win11 was the final stop.

      I still use Win10 for a few things, including testing stuff works there too, via java. I switched to Linux in 2004 or so, though.

  • 1718627440 1 hour ago
    WSL2 is a different product from WSL1, not a different version. Is WSL3 now a different version of WSL2 or another separate product?
    • whs 22 minutes ago
      It's the same thing. Seems like the major version bump is to advertise WSLc, which is like Apple containers - an SDK for launching Linux containers as part of a Windows app.
    • pilif 1 hour ago
      Looks like a different version of WSL2 with a newer kernel and newer VM host software
      • pjmlp 1 hour ago
        An evolution, better said.

        Now there is virtio support, finally no need to depend on external CLI tools for what should have been in the box on day on.

        Until now, even for Windows containers, we needed some Docker compatible CLI tool.

  • armcat 2 hours ago
    Great job in benchmarking! I wasn't even aware of the WSLc (WSL3) release. For others, the release info is available here: https://github.com/microsoft/WSL/releases/tag/3.0.1

    EDIT: stumbled on the previous HN post here: https://news.ycombinator.com/item?id=49970507

    • Randomno 1 hour ago
      Is it accurate to call this WSL3? WSL 2 was released in 2019, but WSL 2.0.0 was released in 2023 https://github.com/microsoft/WSL/releases/tag/2.0.0
      • armcat 18 minutes ago
        No I think it's more accurate to call it WSL Containers, or WSLc, but the release is indeed WSL 3.0.*.
    • pjmlp 1 hour ago
      That is quite relevant, and compose ability is on the way, or for some workloads Aspire would be an alternative I guess.

      Unfortunately most companies are too cheap to pay for Docker Desktop, and having Windows containers depend on a third party tool has been a problem in such customers.

      Because using Rancher Desktop or Podman isn't also a given, due to similar issues.

  • binsquare 1 hour ago
    Lot of the WSL2 lag is not the VM itself, it's the 9P file sharing and interop.

    I found that seems like anything under /mnt/c goes through 9P

    • chris_money202 53 minutes ago
      You’re not supposed to work out of the /mnt/c. A lot of people make this mistake and then complain that WSL is slow. On the native linux file system WSL is 100x faster for everything
      • LeBit 11 minutes ago
        On my work laptop I made the lazy/naive mistake of mounting my projects from macOS into devcontainers running in Colima.

        vscode extensions using ripgrep in parallel in the background (there are many!) are killing the vm.

        I now decided to follow Mitchell Hashimoto choice and use VMware Fusion and simply do all my work inside of it.

      • binsquare 15 minutes ago
        From the perspective of user empathy, wsl seems to be designed for that use case. but the implementation/defaults can be improved
    • pjmlp 1 hour ago
      There is virtio support now, and to be fair 9P was never an issue for me.
      • DiabloD3 43 minutes ago
        9P is very slow for certain operations (such as, for example, git from either direction).

        virtio is not enabled by default because its buggy in certain corner cases, and will be enabled by default when it stops doing that. That said, I do have that enabled, it is certainly faster.

        • pjmlp 34 minutes ago
          Since nowadays I use WSL to run immutable containers, and not really classical Linux Desktop, it isn't something that bothers me.

          Agents take more time than building Docker images.

    • usrusr 1 hour ago
      And yet I had results perfectly within the range of "good enough" having an ai harness muck about in a work folder in a docker mount on a 9P mapped drive under permanent observation by an intelliJ instance on the Windows side before some buggy Windows update made it occasionally lock up under `npm i` sized filesystem loads. Crazy how far we've come.
  • xaduha 1 hour ago
    I find that stuff that it offers over a normal Hyper-V VM is stuff that I don't need, leaky abstractions galore.
    • pjmlp 20 minutes ago
      Nowadays I use it mostly for Linux containers.
    • shevy-java 1 hour ago
      Well, you can use linux-tools on windows too. I kind of compiled most of LFS/BLFS on it, and it works. So it just gives you more options.
  • tonymet 2 days ago
    Despite the container support getting most of the attention, I discovered a measurable performance improvement with WSL3 by accident. Luckily I had another machine to upgrade so I ran an AB test comparing WSL 2 to WSL3 .

    If you want a real bump in performance, I have a clever trick . Hardware isn’t cheap these days, so we demand the most of our software.

    • Leonard_of_Q 1 hour ago
      > If you want a real bump in performance, I have a clever trick . Hardware isn’t cheap these days, so we demand the most of our software.

      Good trick: get rid of the superfluous Windows layer which stands between that expensive hardware and your target OS. It takes up valuable memory, CPU time and storage space, introduces latency where you don't want it, exfiltrates data to unknown destinations and can decide to "upgrade" itself without warning.

      Good tricks need catchy names to succeed so how about NoSL?

  • la_fayette 1 hour ago
    ok great benchmark! I work with herdr/pi for dev work and need to use a windows machine from my company. WSL currently unfortunately lags so much when typing, not sure why when using herdr... Using powershell, some features are missing, so i can't wait to try WSL3 and hope for improvements.
    • TZubiri 1 hour ago
      ... does it lag on the shell or does it lag when you are in some vibecoded "TUI" njs monstrosity? Because if the latter, the issue is probably not cause of wsl...
      • la_fayette 1 hour ago
        The TUIs alone work fine, so something must be done by herdr to make it slow...
      • ricardobeat 1 hour ago
        herdr might be the culprit there, it can significantly slow down tui apps with its terminal capture. This happens on mac/linux, WSL will surely make it worse.
  • shevy-java 1 hour ago
    WSL is one of the few good ideas Microsoft had in the last ... 5000 years or so.
  • PunchyHamster 1 hour ago
    Amazing they managed to make virtualisation that slow in WSL2
  • cdud3 2 hours ago
    And yet it's still factors faster without a whole Windows around it.
    • pjmlp 1 hour ago
      Unfortunately that acquisition option isn't available in most physical stores, where normies buy their computers, even though there isn't a single OEM not running some distro on their data centers.
      • Leonard_of_Q 1 minute ago
        You can get a refund for that useless Windows licence but that is a bridge too far for most "normies" whether they buy their computers in brick-and-mortar stores or online. If that process could be streamlined somehow..
      • TZubiri 1 hour ago
        everything I use it for executes virtually instantly, 60% slower than virtually instantly is still virtually instantly.

        If something is slow on WSL, but not on bare metal linux, it means that the application is slop that only works when MAXING OUT your CPU, it's slop, the app is the slop

        • dspillett 13 minutes ago
          Most of the overhead in virtualisation of the sort used by WSL2+ is not CPU throughput, but other hardware access (mostly IO, but for GUI apps display access can have a significant penalty). Things that are just spinning a couple of CPU cores doing number-crunching work and similar see significantly less penalty in VMs than those that perform much IO, unless of course there is much competition for host resources or for some other reason they get passed around cores so see many more L1 cache & TLB misses.

          Some things need to max out the CPU, certain compile steps for instance, that is not slop that is code doing its job. Others need significant IO, often random IO, certain other compile/link steps for example, that is not slop. Sometimes if you knew your code was likely to be run in a VM rather than on bare metal you might design it slightly differently to reduce its sensitivity to the detrimental effects, but not having done so doesn't make your code slop. There might be some room to blame slop for UI slowness as a lot of code out there updates their display in an in inefficient manner that is actually noticeable on bare metal too, especially when it unnecessarily uses 3D accelerated compositing or similar and something causes that to fall back to software rendering, but even then if it works well enough in the intended environment calling it slop is perhaps unfair.

        • pjmlp 1 hour ago
          Yeah, I haven't dual booted in decades, it started with Windows 7 and VMWare Workstation for me.

          The Year of Desktop Linux is delivered on VMs.

  • bewareofscams 1 hour ago
    [dead]