Making windows less slow (Defender)

Hey! Totally feel your pain… I just switched over to Windows from Ubuntu primarily because i also use the Adobe line and have been doing more UI stuff where I needed the Adobe apps.For a while i simply dual booted and would switch depending on what I needed: Ubuntu for coding/life and windows for Adobe. I discovered that by putting a SSD onto my windows in increased my overall and boot speed by like 300% windows simply cant stop its self from constantly running background shit it seems and my big bottleneck was the hard drive. May be worth looking into for you.

Honestly I’m thinking about switching back to ubuntu still and trying to figure out a way to run my adobe programs virtually… I wonder if this had been done.

Right. Before you complain about “legacy cruft” again, please look at why MS will never do that:

Enterprise. It’s not about “expensive phone calls” but more about: “Why does our flagship app not work anymore? This is costing us millions per minute!”

Also, yes, Apple is “aggressive”. I’d call their style of legacy removal “actively hostile” but hey.

Plus, I really don’t think Docker is the epitome of good software. That you have problems with it is kind of a given.

Enterprise - good point, Windows is then clearly not for you and me.

I don’t think of Docker that way - I do think of it as useful, but definitely not user friendly for my specific purposes.

I agree, Apple has been too aggressive (or user hostile) lately - it’s the main reason I dumped them (over hostility mostly around hardware upgrades/repairs). But I think their willingness to dump ancient tech is net positive (even if they shouldn’t have removed all my physical ports on the hardware just yet…)

I’m running on a brand new Yoga 730 15IKB, with NVMe SSD. It’s not that - the build process just stalls for 20 seconds at a time at various stages during rebuilds. This VM idea is sort cool (rebuilds are so much faster) but now I’m having nightmares with disappearing .git files, and endless permission problems. I’m not sure this has at all been worth it…

Thoughts on running Adobe on Ubuntu - you can use a VM (likely slow) or try wine. I used to run wine with older versions of the Adobe/Macromedia stuff somewhat successfully. I may set up a dual boot partition scheme, and run Windows in a VM from Ubuntu if I need it (and vise versa) eventually.

Every time I see a thread like this, I think that maybe we need a page on the Meteor guide about how to make Meteor fast (aka acceptably slow) on Windows

For app sizes I normally deal with I don’t have serious issues, but enough people have that some guidance on setting up a VM or other options would be nice

1 Like

If anyone ends up using Virtualbox, make sure not to use the built-in shared folder functionality. The IO performance is atrocious. NFS, Samba, or rsync are all much better choices.

I’m using samba, but I’m not sure how to solve the file permissions issues. If I add files from windows over smb, Linux can’t access it, if I create a file in Linux, I can’t modify it in Windows over the network.

I just got a new error, along with continued extreme slowness. Basically, it kept getting slower and slower, then when I tried to ctrl+c - I got a GC error - something to do with wasm. I don’t know if the memory leak is somewhere in my code in meteor (I’m not doing anything with wasm on the server, at least not that I’m aware of, maybe some library).

Can application memory leaks have an impact on rebuild times in this way, or does that hint at a meteor problem? I can imagine an application memory leak may cause that big stall after build, before the server become responsive again - GC on application code. I’ll see about dumping some memory profiles.

I’m going to fire this all up on a mac I recently borrowed (or try the VM thing again), and see if things behave any differently on there. I tried disabling almost all the server side stuff I have going, and that didn’t have the positive impact I was hoping for.

I asked @jlukic & apparently if you use Samba the right way of doing it is to use smbpasswd and authenticate, rather than using Samba with an anonymous user.

https://help.ubuntu.com/community/How%20to%20Create%20a%20Network%20Share%20Via%20Samba%20Via%20CLI%20(Command-line%20interface/Linux%20Terminal)%20-%20Uncomplicated%2C%20Simple%20and%20Brief%20Way!

I use Win + VM for all my dev.

IMO the way to solve meteor rebuild issues is just to put an Optane 900p as your main HD and a reasonably fast CPU.

Generally, enable SMB3 and always use authed login. From windows you may have to type username as “\VM-Name/Username” instead of “Username” (but maybe not). You’ll need to setup a password with smbpasswd instead of just using your linux password.

I use this gist to remind me of the salient issues when setting up new machines

3 Likes

These are great tips. Thanks so much, I’ll let you know how it goes!

For what it’s worth, I’m on a newish Yoga 730 15IKB laptop, with NVMe SSD, i7 8550U - and I disabled the horrendous Vantage “Intelligent Cooling” solution, which really just slows the CPU down to 400Mhz under load - people have literally returned these units over that setting (seemingly, without every figuring out why it did slowed down like that - it was just this ill-considered setting)… Anyway, it shouldn’t be this slow (whatever it is, I blame Windows), and it’s really not at all this slow under Ubuntu in a VM.

After being in a similar position and having to move away from dual boot because of driver problems on linux, I just gave this tutorial a chance. https://nickjanetakis.com/blog/using-wsl-and-mobaxterm-to-create-a-linux-dev-environment-on-windows
Turns out it was a life saver if you are using meteor 1.8 (previous versions were giving me errors starting mongo). Basically, after following it, I was able to run meteor and most of the IDEs (VScode, webstorm, etc) from inside WSL (windows subsystem for linux) and see everything on Windows through an automatic X11 server created with mobaxterm. I think rebuilds times are not as fast as with a native ubuntu distro, but they are pretty close, and much better than with the Chocolatery installation.

If you give it a try and have problems I might be able to help.

Also, something I found useful from that post is a comment saying what you need to disable on windows defender to make it even faster

Also make sure to add C:\Users<username>\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_xxxxxxxxxxxxxxx to the Windows Defender exclusions list (or that of any other virus scanner you have installed) as per https://medium.com/@leandrw…
I tested this on a Python/node compile job 2 time with the exclusion off and 2 with it on. It took ~4m without the exclusion and ~1m40s with it.

1 Like

Even with Meteor 1.8 I can’t get meteor to start Mongo from WSL.

A few things that come to my mind about it not working
What version of Windows 10 are you using? (I tested everything with 1809)
What distro and distro version have you installed? ( I tested with latest ubuntu 18 from microssoft store and did a apt-get to update after install)
What npm dependencies have you installed?
(I’m using "@babel/runtime": "^7.1.2", "meteor-node-stubs":"^0.4.1", "core-js":"^2.5.7", "babel-runtime": "^6.26.0", "bcrypt": "^3.0.0" as core dependencies)

I have pretty much the same stuff as you. 1803, latest version of meteor (1.8), and the latest version of everything in my npm list (I use npm-check-updates to keep it up to date). I haven’t done apt-get update in a while (though I only set up Ubuntu from the store like a month ago). I’ll try that.

Update: Nope, still don’t work. It does other weird things too - like it tells me “npm” is not a meteor command the first time I run things. I can get i to accept npm eventually, but then when it installs it behaves differently from when I run it as root.

I don’t know if this will be of use for you, but I installed Fedora+KDE, VMWare Player + Win7 for the windows apps (photoshop and such) some years ago and never looked back. All works like a charm, I could even run demanding games if i wanted on my VM (I tried this to test how good VMW was when using hardware acceleration ), maybe you could give this a try, I use VM-Win7 constantly due to my job, almost 4 years of full work and the system (Fedora and VM-Win7) runs like butter.
Believe me, I tried the other way around, it will work at the start but will slowly become hell and things will start to fail.

1 Like

Next time I get a slow period I’m going to go Linux - not sure which distro, probably Ubuntu if I can make it less ugly, and do Windows in the VM like you suggest for Photoshop/InDesign and other “legacy” apps.

1 Like

For me the only thing to do UI wise in Ubuntu has been to move the left panel to bottom (can easily be done both in 16.04 with Unity and 18.04 with Gnome) and make it a bit smaller. Will be very familiar to anyone coming from windows and not much effort required.

Yeah, I did that in my VM. There’s even a way to get it to properly float in the middle. The top bar on Ubuntu could use a bit of work too - like, why is that even there? It just uses up some screen space. And the default color scheme is just a bit too orange.

I’m sure I can make it work!

I’m really curious about why this is so slow on Windows though - I mean, it’s a full 20 seconds between when the CLI says “Client modified – refreshing” and the server becomes responsive again. Why? If the server rebuilds (which is the real slow part of Meteor on Windows) it seems to stall in a similar completely silent way at various stages. My suspicion is that something pretty basic is happening here, I just don’t know where to start to debug/profile it.

Didn’t there used to be a way to run Ubuntu (from boot) from an image inside an NTFS drive? Is that still supported? I mean, Meteor is just unusably slow on Windows…

Update: I got file sharing to work correctly and solved the can’t resize Ubuntu problem. I think the problem as that I had installed both open-vm-tools and the tools installed with VMWare’s menu item. Once I got rid of open-vm-tools things started to work correctly. Hopefully this holds up - rebuild/refresh times are down from roughly a minute and a half (38 seconds rebuild, almost 50 seconds before the server becomes responsive at last check with a stop watch), to less than 10 seconds! I’ll take it!