14 ms·
I genuinely don't get this. WSL's backing filesystem (NTFS) completely runs like ass. It's dire. 10x the latency on everything at least compared to Linux runnin
by setquk 8y ago
I genuinely don't get this. WSL's backing filesystem (NTFS) completely runs like ass. It's dire. 10x the latency on everything at least compared to Linux running natively on the same hardware. This is because all small writes end up in MFT contention and the entire of Unixy type things are based on lots of small writes.
Plus on top of that, everything is rammed with telemetry on windows now, the QA has gone down the toilet leading to a hosed machine at least three times in the last two years for me and there is no clear direction they are going in other than "throw poo on everything and see where it sticks". Any bets you make are risky.
And honestly when I read about powershell and chocolatey used there I laugh because a huge amount of friction for me came from that direction. powershell's principle is based on the principle of most surprise. Like when I tell it to download something, I don't expect to have to futz with IE browser settings (WTF?!?!). And chocolatey sucks - the repository it pulls from is full of abandoned and broken crap and missing packages (.net SDKs are my favourite pain point here) where people have thought "hey it'll be good to port this" and then leave it to rot.
That's the status quo for me and I'm not happy.
I'm going the other way to OSX. It mostly just works and that's all I want and there's a local support network for the hardware which is decent and doesn't involve me shipping it off to some third party and losing it for 2 weeks.
- AnIdiotOnTheNet 8y ago> powershell's principle is based on the principle of most surprise. I don't think that's true at all. Compare powershell command names to UNIX command names for example. You can rest assured that Get-X will not change things and that there is almost certainly a Set-X that will, for example. You can tab complete variable names, cmdlet names, cmdlet switches, etc. Additionally, by piping objects instead of text, you aren't caught off guard by things like spaces in a path name. > Like when I tell it to download something, I don't expect to have to futz with IE browser settings (WTF?!?!). It definitely does have some flaws though, I'll give you that. As an aside, you can use Invoke-WebRequest with the `-UseBasicParsing` switch to leave IE out of it. They definitely should have done that the other way around.
- setquk 8y agoThe last point is the point really. The entire objectivity of it is ruined by weird edge cases and knowledge. The car only goes straight if both rear windows are open. You have to say "beetlejuice" three times before putting it in reverse etc etc.
- AnIdiotOnTheNet 8y agoYou sure you aren't describing an average UNIX command?
- setquk 8y agoNo because you don't have to google for an hour to find the "don't punch me in the dick" flag.
- AnIdiotOnTheNet 8y agoInstead you just have to google how to use `tar` properly. Again. You can tab complete powershell cmdlet switches. And MSDN has extensive and good documentation. Here's the page for Invoke-WebRequest. Notice the very first switch listed. Further note that Microsoft realized they screwed this up and deprecated the switch in PS 6.0 since it is now the default. https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-6 https://docs.microsoft.com/en-us/powershell/module/microsoft...
- setquk 8y agoNo googling because it hasn't changed in the last 20 years. How do you unzip a 20 gig file in powershell? 1. You can use the windows shell via complicated series of calls. This runs like ass as the windows built in decompression is terrible. Also it only works properly if there's a desktop session running so over WinRM it does with a COM error. 2. Find out which version of powershell you have, hope it's 5.0 or later or install the right WMF version and then run expand-archive. And it still runs like ass. But oh no we can't because now we have to push WMF 5.0 to 150 servers which is going to take DAYS with SCCM. Some kit is on Windows 2012, some on 2012 R2 and some on 2016 because it's so damn hard migrating stuff as it has to be done by hand so you have a mix of stuff leading to a nightmare from hell. 3. Import System.IO.Compression and call .Net to do it then wrap it in a cmdlet called Expand-Archive, then wonder why it breaks when someone pushes out WMF 5.0+ 4. Push 7za.exe out with ansible and run that. This is the problem. No good outcome for really simple tasks. Friction for all of them. Edit: I'm being 100% honest here and say I hate it with such a passion because I've lived in the same building as it for several years, not because I'm not aware of how it works.
- nailer 8y agoI switched to Powershell/Windows after 20 years of bash/Linux and MacOS (see https://github.com/mikemaccana/powershell-profile/ https://github.com/mikemaccana/powershell-profile/) > WSL's backing filesystem (NTFS) completely runs like ass. Yep you're right, and I've asked Microsoft about this and they're working on it: https://twitter.com/mikemaccana/status/1047941737719762946 https://twitter.com/mikemaccana/status/1047941737719762946 > powershell's principle is based on the principle of most surprise. Really? I find it quite consistent. Here's a bash to powershell conversion: https://github.com/mikemaccana/powershell-profile/#how-does-powershell-actually-differ-from-bash-day-to-day https://github.com/mikemaccana/powershell-profile/#how-does-... The general syntax is very much designed rather than grown, you can predict most commands, and using 'select' and 'where' to pick the keys you care about in your output is way better than scraping with regexs. > Like when I tell it to download something, I don't expect to have to futz with IE browser settings (WTF?!?!). That sucks. I haven't ever had to do that. I'm not sure why.
- setquk 8y agoWRT NTFS I don't think they can fix it without releasing another major version of it and that comes with some insane level of risk based on the early churn in NTFS. I don't have an appetite for that. They tried to fork it with ReFS but that went pretty much nowhere. Powershell is amazingly consistent for sure but each little bit of consistency has numerous inconsistencies in it which aren't exactly stable, hence the whole web request nightmare. Also things like different methods of getting the date return timezone and non timezone aware things. They nearly had it but rushed it out of the door. Also things like WinRM are totally unreliable and don't scale well due to the runtime performance being dire (try arguing with ansible/WinRM failures on a daily basis). I think a lot of people using object pipelines miss the major point of designing test pipelines which is the first step is to make your pipeline easily parseable. So for example dates as unix dates, colon separated etc. Then you don't need to use regex and stuff. For that little bit of compromise first you end up with something which is several orders of magnitude faster than the UTF-16 and serialisation backed powershell pipelines. Try grepping a few gig of data with it :) On your last point, you're lucky. This comes up a lot in corporate networks and proxies and occasionally randomly out of the blue.
- z3phyr 8y agoYou could consider one of the BSDs, if you want to go to the path of MacOS. I practically found them to be objectively pleasing once the machine is set up.
- setquk 8y agoI've used FreeBSD since 2.0.5. It's what led me to MacOS X :)
- favorited 8y agoHasn't getting a compatible machine set up been one of the most difficult parts? I've never tried BSD outside of a FreeBSD VM for tinkering (though I'd like to) – has general HW compatibility improved?
- setquk 8y agoI’ve never had a problem with it myself even on mid range kit (DL580 sized)
- rhinoceraptor 8y agoIt seems to run best if you have all Intel for the CPU, networking and graphics, and your machine is at least a year or two old. I would assume Thinkpads are the best supported hardware.
- int_19h 8y agoIt works great on Thinkpad X1 Carbon gen6.
- truthwhisperer 8y agotrue, ninja sponsored content by Microsoft. As a true developper i want to have access to the lowest level of system devices and (II) i want to have full access to source code so i can really see what is going on instead some "magic happens inside". NEXT
- dpkonofa 8y agoI feel the same way. I used to use my Windows machine for everything and didn't even own a Mac but working on a Mac has been a real joy comparatively, especially for dev work. Now, my Windows machine is relegated to just being a gaming rig and I'm 100% happy with that. When I heard that WSL was a thing, I went back to try and get that setup and, between trying to turn off Cortana, navigating the god-awful new Control Panel/Settings, and the terrible overall performance, I don't know how someone could subject themselves to that in a professional capacity. Windows to me is infuriating and I'm pretty technically proficient. I feel bad for the droves of users that end up on it and don't have a choice, especially those that aren't technically skilled. It's just bad now.
- AnIdiotOnTheNet 8y ago> I don't know how someone could subject themselves to that in a professional capacity. Active Directory. Well, AD and a bunch of applications that are critical to the business only operating and supported on Windows. But the other OSs don't have anything as good for management of the environment as AD is.
- setquk 8y agoAD only works if all your clients are windows. In 2018, not all of them are. We're out of a monoculture now. Doing AD SSO on other platforms is a proper pain in the butt. For example when Microsoft deprecated some of the old protocols a few years back they broke RHEL entirely for 2 years. Not sure there is another solution though. OAuth and various cloud logins etc isn't, yet.
- AnIdiotOnTheNet 8y ago> AD only works if all your clients are windows. Uh, yeah, that's kinda my point. Outside of SV, pretty much every client is, and for this reason.
- dijit 8y agoThis is increasingly not the case though.
- kminehart 8y agoyeah. I tried switching to using my gaming desktop with WSL. I used an X server to run a terminal emulator that isn't terrible so I could get the best of Linux and Windows without having to reboot. Add in zsh auto completion and then it all went to shit with the latency. Some commands could take MINUTES to complete.
- merb 8y ago> Like when I tell it to download something, I don't expect to have to futz with IE browser settings (WTF?!?!) You Can use Power Shell Core. Which is way bettet, Cross Plat and does not need ie settings fiddling. I use it to script on cross Platform Tools mostly
- setquk 8y agoPowershell core has telemetry. I won't entertain that risk. This is covered in my original point.
- joeyaiello 8y agoFull disclaimer: I'm the PM for PowerShell Core. I'm a huge privacy advocate, but telemetry doesn't have to be a dirty word. With PowerShell Core, we went through an RFC process to define our telemetry goals and implementation[1], we publish our data to a public dashboard[2], and all of the telemetry source code is out there in the open[3]. Our telemetry enables to help drive prioritization and decisions around platform/OS usage, and disabling it as simple as setting an environment variable[4]. If there are any other ways we could make our telemetry implementation more palatable without seriously reducing its usefulness, we're absolutely open to suggestions. [1]: https://github.com/PowerShell/PowerShell-RFC/issues/50 https://github.com/PowerShell/PowerShell-RFC/issues/50 [2]: https://aka.ms/psgithubbi https://aka.ms/psgithubbi [3]: https://github.com/PowerShell/PowerShell/blob/master/src/Microsoft.PowerShell.ConsoleHost/host/msh/Telemetry.cs https://github.com/PowerShell/PowerShell/blob/master/src/Mic... [4]: https://docs.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-core-61?view=powershell-6#telemetry-can-only-be-disabled-with-an-environment-variable https://docs.microsoft.com/en-us/powershell/scripting/whats-...
- felixgallo 8y ago"without seriously reducing its usefulness" -- can you describe more clearly what the usefulness is that you are attempting to retain, and why that is important to your customers?
- 8y ago
- awesomepeter 8y agoI can understand all of that. I'd also rather use OSX, but the new Macbook Pro's have such a garbage of a keyboard that I'd even rather use Windows and the slow WSL (though I use native linux myself).
- setquk 8y agoI just bought a 2018 MacBook Air. The keyboard is different and could do with a little more travel but I don't have a problem with it really. It's better than the wobbly piece of crap on my 2013 MBP.
- awesomepeter 8y agoIt's fine if you can live with it. I can only compare it to typing on an absolute hard surface and my hands get worn out fast from that. I hate it, I wish I didn't so I could use the otherwise ok hardware :)
- setquk 8y agoWant to buy my MacBook Pro? ;)
- Joeri 8y agoI use a mix of mac and windows machines, and all of my dev work is on windows. I mostly agree with the points you mention but they also don't matter that much to me day-to-day. Windows upgrades have lately had a poor quality track record. I've had a bunch of cheap windows laptops break, all consumer-class machines running windows 10 home. My work thinkpad has been absolutely reliable though, partly because it's a thinkpad (better driver situation), and partly because it's windows pro. I only get feature updates after they've rolled out to everyone else, so by that time all the bugs are sorted out. Everyone knows not to upgrade a mac to a new major release when it's .0, you wait until .1 or .2. Windows home doesn't give you that option, windows pro does. WSL performance is indeed not great, but getting better with every release. I side-step it by doing the heavy stuff natively. I only use WSL for typical shell scripting, and as soon as I need to run something more I'll figure out a way to solve it natively. There's almost always a way (couldn't figure out hadoop development, had to run a linux VM to do that). Did java, scala, node, php, python all without seeing a bash shell. I see WSL as an escape hatch, not as a daily driver. I don't use chocolatey. I don't expect windows to do package management well, so I don't even try. I only set up a windows machine at most once a year, and it's not that much work. I do use ninite to get the basics on it faster. As for the telemetry ... I don't see the harm. There hasn't been a single person reporting real harm (that I'm aware of, someone will now prove me wrong) and they've been doing this telemetry for years. I just wish they used their telemetry instead of shipping bugs that their insider program reported and they subsequently ignored.
- acct1771 8y agoThey're making their money other places. That telemetry should not be expected to improve the product 9/10 times.
- sys_64738 8y ago> WSL's backing filesystem (NTFS) completely runs like ass. It's dire. 10x the latency on everything at least compared to Linux running natively on the same hardware. This is because all small writes end up in MFT contention and the entire of Unixy type things are based on lots of small writes. Does this matter? It seems good enough to me to use as a development environment to the extent that GNU/Linux and GNU/Windows are equal/or for development purposes.
- FrancoisBosun 8y ago10 years ago, on the exact same hardware, running a Rails application test suite in a Linux VM through VirtualBox was nearly 2x faster than running natively on the Windows side of things. This must be a combination of things, namely Ruby on Windows was super slow back then, but the filesystem impacted things as well.
- WorldMaker 8y ago10 years ago WSL didn't even exist. Also, Ruby on Windows has always been an afterthought with a lot of dumb bugs, incomprehensible setup requirements, and terrible performance. Ruby is the biggest reason I use WSL today.
- setquk 8y agoWe have GitHub repositories with 10’s of thousands of files in so yes.
- Nullabillity 8y agoNix runs way slower on Windows, since it caches by hashing all source code on each compile.
- PascLeRasc 8y agoAlso you can't interact with the WSL directory outside in a graphical text editor or File Explorer. There's going to be someone who responds to this saying it works for him, and I'm very happy for you. Every time I create a folder in the WSL directory in File Explorer it's permanently un-cd-able in WSL, and vice versa. Editing text files outside corrupts them. Yes, I've tried reinstalling. WSL is just a shitty implemention on a shitty OS. Linux and OS X work perfectly and they have package managers and I can control updates.
- bproven 8y agoYeah - I generally touch files or create dirs in WSL first to get around it. Otherwise it is a cluster. If i could just use Linux @ work I'd be much happier.
- CodeCube 8y agoThe trick here is to not use any windows program to modify anything on the WSL file system (because of the unix permission system). But it works vice-versa ... so you can use any unix program to modify a file on the windows file system. So my hack there is to simply make a symlink in my unix dir (`~/dev`, usually) that points to a folder on the windows file system ... that way I just do all my work in ~/dev and it's all good.
- setquk 8y agoWhat’s the point then? Cygwin works better than this.
- norswap 8y agoI was nodding along, until you said that "on OSX things mostly just work". Oh boy. I have fought homebrew, I have fought Apple destroying permissions on each update, and the OS having embarassing mistakes. Linux: not much better. Everything sucks, they just suck in a variety of different flavors.
- setquk 8y agoYes you’re right there I suppose. The point is I pick the sandwich with the least amount of shit in it if I can.
- banachtarski 8y agoIt depends on domain. I hate working with MacOS APIs far more than either Windows or Linux. They don't give a damn about backwards compatibility, force you to use programming languages nobody uses on any other platform (no, I don't care how "nice" it is), and change without a moment's notice. They actively shun and deprecate open source solutions, and seem to go out of their way to be that special snowflake. You could say certain things perform better on Mac, but other things (like graphics) are utter garbage due to the lack of first party driver support. You can install bootcamp on a Mac and get better games and graphics editing performance immediately for example. That plus the overexpensive hardware and lack of a real keyboard and I'm just done.
- jessedhillon 8y agoI've had a pretty good experience running MacPorts instead of homebrew. It's easily been the best package management experience I've on a non-Linux OS.
- derimagia 8y agoInteresting, had the opposite experience. Homebrew does almost everything very nicely for me. Macports not as much, although to be fair this was years ago.
- 8y ago
- derefr 8y ago> IE browser settings Those are the OS web settings. As used by all OS services, e.g. BITS (https://docs.microsoft.com/en-us/windows/desktop/bits/background-intelligent-transfer-service-portal https://docs.microsoft.com/en-us/windows/desktop/bits/backgr...) and the Live Tile updater; and any app that doesn't embed its own network stack (e.g. Steam, most Mail apps, etc.) People just think of this control panel as "the IE browser settings" because people use Firefox and Chrome, which do embed most of a network stack (for portability), and therefore ignore most of the OS network settings in favor of their own embedded configuration-points.
- holtalanm 8y agoYou hit the nail on the head with your description of Chocolatey. I've found scoop to be a lot better (https://scoop.sh https://scoop.sh) for package management on Windows 10 than Chocolatey.
- baldfat 8y ago> 10x the latency on everything at least compared to Linux running natively on the same hardware. The vast majority of my real world experience has not been that at all. Then I looked up the benchmarks https://www.phoronix.com/scan.php?page=article&item=wsl-february-2018&num=6 https://www.phoronix.com/scan.php?page=article&item=wsl-febr... Also I use older Desktops and I have very quick experience running my scripts and Ranger. Having Ranger alone is HUGE for my workflow. Then I have awk, sed and grep at my finger tips? Personally I would take Windows 10 WSL over any of my AppleOS experience. I really think the machines know I don't like Apple because for the past 25 years they always lockup, crash or over write what i do with them.
- setquk 8y agoThe file IO / compile benchmarks are realistic workloads. Look at: https://www.phoronix.com/scan.php?page=article&item=wsl-february-2018&num=2 https://www.phoronix.com/scan.php?page=article&item=wsl-febr...
- justinmchase 8y agoThey're working on it: https://github.com/Microsoft/WSL/issues/1932 https://github.com/Microsoft/WSL/issues/1932
- sjuut 8y agoI had to exclude my Ubuntu WSL setup from Windows Defender. Processes like ‘apt’ we’re really slow because of it
- nickjj 8y agoMaybe it depends on other things besides WSL. I wonder if your system is mis-configured or has a weird combination of hardware. For example I use WSL and it doesn't run like ass. All I did was disable the Windows Firewall and HD monitoring tools. Everything else is stock Windows 10 Pro (stable channel). Here's some numbers. NOTE: All of this is running in WSL, and to make matters "worse", it also includes running these things through Docker for Windows with WSL configured to communicate with Docker for Windows. - A large Rails app (15k+ lines, 50+ gems, etc.) takes less than 100ms to pick up a code change with a Docker volume. I can see code changes before I'm able to even move my eyes to a browser to reload the page. It's awesome. - Flask, Phoenix and Node apps also pick up code changes nearly instantly and the overall development experience is awesome. This is all through Docker as well. - 100kb+ of SCSS running through a bunch of Webpack loaders compiles in less than 3 seconds in "watch" mode, without any type of caching. Slower than native Linux? Yes, probably, but it's not slow enough where it's an issue. There's a lot of low hanging fruit to optimize too. I didn't even try to make it faster because it doesn't have a negative effect on my daily development. Long story short, combine WSL with a good terminal and Docker, and you have yourself a great development box. This is with ~$700 worth of computer parts on a 5 year old workstation, with an early generation SSD and I don't even keep my source code on the SSD (it's volume mounted into Docker with a spinning disk 1TB drive).
- glennpratt 8y ago> here's a local support network for the hardware which is decent and doesn't involve me shipping it off to some third party and losing it for 2 weeks. Small heads up, every serious hardware issue I've had with MacBook Pros involved them being shipped to a third party for a couple weeks. Sure, they might try a thing or two in the Apple Stores, but then it's shipped off. YMMV
- setquk 8y agoThey replaced the screen on mine in store. I think it depends on what tier of shop you’re in as some of them don’t have full service ability.
- glennpratt 8y agoIn my case they were massive flagship stores that Chat support suggested I go to with an appointment. Pretty sure it had to do with the complexity of the repair both times.
- tniemi 8y agoFor me the main problem with NTFS is the file locking. With Unix you can pretty much delete any file at any time (sudo ftw!) but not with WSL. Opening a file in an editor on the Windows side is often enough to lock things up. (The case sensitivity is another sore point, but that can be averted by using only lowercase.)
- setquk 8y agoThat’s a very good point. The file locking semantics are different and totally incompatible.
- Iwan-Zotow 8y ago> WSL's backing filesystem (NTFS) completely runs like ass. It's dire. 10x the latency on everything at least compared to Linux running natively on the same hardware. This is because all small writes end up in MFT contention and the entire of Unixy type things are based on lots of small writes. that is hard to emphasize more than it is - doing C++ dev on WSL is complete garbage, lots of small write on compile, SLLLOOOOOOWWWWWWWW...
- setquk 8y agoOh hell that must be horrible. It’s bad enough compiling small things.
- pokemongoaway 8y agoExactly. Windows as a host OS does not make any sense! Yesterday I logged into a fresh AWS emi of their latest Windows. Then I moved the mouse to Internet Explorer and I clicked... Then it said: you cannot run IE as administrator. Wow...