Fork me on GitHub
#clj-on-windows
<
2021-12-22
>
borkdude15:12:48

@seancorfield as you are using WSL2 as your primary dev env (for me its on a machine I use for heavy duty tasks and Windows testing), I wondered about your memory setting for WSL2. If you don't limit memory for WSL2, eventually it can eat up your whole RAM and starve Windows. So I've set the limit to 112GB (of a total of 128GB) for WSL2. But if you would have a laptop with only 16GB, I wonder how much you would have to give to Windows for it to still function properly. E.g. a divide of 8 / 8 only leaves 8GB for WSL2 which is a bit on the low side for what I typically do.

seancorfield16:12:07

@borkdude I haven't changed the defaults (and I have 16GB on the laptop). I run Docker with Percona, Redis, and two Elastic Search instances and a bunch of Clojure stuff and VS Code. No problems so far.

borkdude16:12:06

How long do you typically run WSL without restarting?

seancorfield20:12:59

@borkdude Sorry, on vacation so I've been away from my house for half the day... I leave WSL running "all the time", unless it wants to reboot for a Windows update.

seancorfield21:12:33

It says it's been up for 5 days right now.

borkdude21:12:38

Ah I see. It's good to hear you didn't have problems yet, some people do, as WSL, once it claims memory, never releases it.

naomarik10:12:03

once every a month i sometimes run this to reclaim memory: āžœ ~ cat freemem.sh #!/bin/bash # PATH="/bin:/usr/bin:/sbin:${PATH}" # REGEX="^SReclaimable" # MEMINFO="/proc/meminfo" # THRESHOLDKB="50000" # IFS=' # ' # LINE=($(egrep $REGEX $MEMINFO)) # for i in ${LINE[@]}; do # NUMPRE=$(echo $i | tr -s ' ') # NUM=$(echo $NUMPRE | cut -d ' ' -f2) # if [ $NUM -gt $THRESHOLDKB ]; then # sync && sysctl -w vm.drop_caches=3 # fi # done echo "sync && echo 3 > /proc/sys/vm/drop_caches" | sudo sh

borkdude10:12:08

is this also for WSL2?

naomarik10:12:17

yeah

šŸ‘ 1
naomarik10:12:58

my uptime 10 days (my son hit the restart button my PC cause it's a flashy LED) but i pretty much never restart

naomarik10:12:11

and memory nowhere near being consumed yet

borkdude21:12:19

Have a nice vacation :)

seancorfield21:12:28

My biggest memory user is Mailbird šŸ™‚ then WSL.

seancorfield21:12:41

Oh, it's only a vacation from work, not from OSS šŸ™‚

borkdude21:12:03

sounds like my vacations ;)

borkdude21:12:07

I was amazed today that I could just run emacs.exe under cmd.exe and pwsh.exe and it all just worked. Even clojure-lsp auto-installed itself and all. https://twitter.com/borkdude/status/1473599014859902990

borkdude21:12:51

I mean, in the terminal, not gui

seancorfield21:12:13

Yeah, the integration is amazing really. My only gripe is that WSLg doesn't support "snap" for windows yet, but the team told me "it's coming!"...

borkdude21:12:32

The above doesn't use WSL btw, it's Windows emacs.exe

borkdude21:12:04

but I start pwsh.exe or cmd.exe through an ssh connection to WSL to test Windows stuff, although I can run it directly via a Remote Desktop as well

borkdude21:12:58

but I agree, the integration is awesome... if someone gave me a powerful laptop, I might be temped to switch over ;)

borkdude21:12:38

Docker performance is better on Windows + WSL too compared to Apple (I'm still not on M1)

seancorfield21:12:34

I'm on my last Mac -- a 2012 iMac (27") -- and it's HD is getting flaky (so much so that O/S upgrades refuse to run so I'm still on 10.12). I've had Macs since '92 because I preferred Mac OS over Windows (but I've used every Windows since 3.11). Until Windows 8. I've been on Insider builds of Windows for six or seven years now on my laptops and my current one is a Surface Laptop 3 and I love it. With WSL, I really enjoy working on Windows and overall prefer Windows 11 (and 10) to macOS. So when this desktop dies, I'll get a Windows machine to replace it.

borkdude21:12:10

I recently upgraded to Windows 11, it was smooth, everything still worked

naomarik10:12:00

i haven't been paying too much attention to windows 11, but saw one video awhile back. apparently you can run gui stuff without an xserver running (or it comes with its own not sure), so you can use emacs within WSL2 or any linux application and it will work with audio.

borkdude10:12:24

yes, I know, it's called wslg

naomarik10:12:04

how's your experience with it? is it good?

naomarik10:12:27

i've been using X410 which is a purchased app, worked a lot better than free solutions for me

borkdude10:12:01

I use wsl2 on a PC that I only access remotely, so I don't use sound, but the wslg works well. I compiled emacs with gtk support and the resolution is good as well. But I primarily access this machine in Terminal or via ssh

borkdude10:12:10

I've been using X410 before that, now I uninstalled it

Richie14:02:33

I was using gui emacs through wslg and everything worked great when it worked. I had issues with the clipboard so I wasn't able to continue using it though. I never figured out what caused it so I didn't know how to avoid it. The clipboard would just stop copying into or out of wslg. Have you had that issue? Do you know if it's resolved?

borkdude14:02:47

@UPD88PGNT Don't know, perhaps @U051BLM8F has some idea since he's using emacs + wslg too

Richie15:02:49

I meant to include the https://github.com/microsoft/wslg/issues/15 somewhere for reference. Sorry for necro spam.

bozhidar09:02:30

I see you've found the relevant ticket, I guess this will be addressed a some point. I wrote a short article about this https://emacsredux.com/blog/2022/01/04/dealing-with-clipboard-issues-on-windows-11-wslg/

Richie15:02:34

Thank you! I have not seen this.

seancorfield21:12:52

I'm on build 22523 right now. Voice Access just got rolled out and it's very impressive.

seancorfield21:12:06

My WSLg version is 1.0.29 right now. Not sure what's the released version? cat /mnt/wslg/versions.txt will tell you.

borkdude21:12:17

I'll have a look, powering on my PC

borkdude21:12:51

$ cat /mnt/wslg/versions.txt
WSLg ( x86_64 ): 1.0.26+Branch.main.Sha.26ce2c09b86442f3c7f4f6462f770ed2afa76a25
Mariner: VERSION="1.0.20210224"
FreeRDP: b05321cd4e6a862aef76163a69db4e1910245736
weston: 46756d0e77e5c01b5995fbbee6f3ab0db9b30612
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:

seancorfield21:12:04

Same version of Mariner, FreeRDP, and pulseaudio. My weston is b49e194... Interesting.

seancorfield21:12:30

I'm glad MS is doing a lot more stuff for developers these days. And a lot of OSS stuff too.

borkdude21:12:14

Indeed. I have a beast of a machine here with a 3950x 16 core Ryzen processor and 128GB of memory. I installed Tailscale on it, and when I have it powered on, I can connect to it from anywhere on the world via RDP

borkdude21:12:09

and of course via ssh/WSL2, but I have to be logged in for that first. Sometimes this machine reboots itself and for the life of me I haven't figured out how I can disable that, but when it does, I can connect via Tailscale and start stuff up again

seancorfield21:12:15

I still like having a portable dev setup that I can use when I'm offline šŸ™‚

borkdude21:12:57

I like portability too, I have two Macbooks for that. I use this machine for heavy duty work and Windows testing

borkdude21:12:09

For some things I need "real" linux, macOS doesn't qualify there, and I can use that machine for those things too

borkdude21:12:24

I expected that I would switch over to the PC, but I've never actually had a keyboard connected to it for more than an hour, I do everything from my laptop since it's just more convenient to be able to sit in different places

borkdude21:12:18

Do you perhaps have any recommendations for (local) backup software? Time Machine has failed on me and I migrated to Acronis True Image, but they have moved to a subscription model now

borkdude21:12:00

On the plus side, Acronis works under Windows too

seancorfield22:12:46

Between OneDrive and GitHub, I stopped using actual backup software. I have so little stuff actually on a local drive that isn't also "somewhere else".

seancorfield22:12:52

(we have an Office 365 Home subscription so we have 1TB on OneDrive included -- plus all my photos and music are up on Google/YouTube now... that's how I migrated away from stuff on the Mac)

borkdude22:12:12

Makes sense. I use Dropbox. I've been migrating out of the Apple Photo stuff to raw folders to become less reliant on that ecosystem.

seancorfield22:12:35

DropBox is expensive for anything beyond the basic service.

borkdude22:12:44

I use Dropbox to share my stuff with my accountant, I pay 10 euros a month, but yeah, I could move to something else probably

borkdude22:12:33

I have 2TB storage there. I'm only at 8.5%

seancorfield22:12:18

I have a basic DropBox account for my ebooks since Manning and PragProg have integrations with it. I have ~100 tech books in PDF form there.

borkdude22:12:48

I use that too yes

borkdude22:12:28

So Microsoft Office 365 is 99 EUR/dollar a year for 6 persons in total? Or per person?

seancorfield22:12:22

For five or six licenses, installations, yeah. I don't remember the details.

borkdude22:12:02

that's a pretty good deal it seems

seancorfield22:12:35

We have Office on three machines here, plus two phones and an iPad I think. Maybe two iPads. The device licenses are free, so we're only using three actual licenses. And I get Skype credit too. 60 minutes a month I think?

borkdude22:12:16

Makes sense.

borkdude22:12:35

I've never used OneDrive. Does it work similarly to Dropbox, as in, I could use this to share a (mutable) folder with my accountant?

seancorfield22:12:44

Yeah, you can have shared folders, public folders, shared files, full read/write control.

borkdude22:12:04

Thanks, just installed it. I'll play around and perhaps migrate, thanks!

1