Live data from Hacker News

A Review of Linux on Surface Pro 4

binwang.me

61–70 of 229 posts

Re: A Review of Linux on Surface Pro 4

#61
post #24

Disables Swap and Zram, gets OOM killed, surprised pikachu face Joking aside, is there an actual legitimate reason to do this on a workstation? I understand why you would want to disable swap on something like a kubernetes cluster node but in my head, heaving at-least zram enabled is a good thing on a workstation so you *don't* get OOM killed... I call on thee, Linux wizards of HN, to help me understand the reasoning…

compiling clang on ubuntu 20.04, the link step used up all my ram and started swapping on the nvme.

htop froze, so i hit ctrl-c, but nothing happened. no mouse movement, no ssh'ing in, just totally hard-locked. i ended up having to physically powercycle the machine.

after that i turned off swap so that it killed the process rather than the machine (and remembered to pass -DLLVM_PARALLEL_LINK_JOBS=1)

Re: A Review of Linux on Surface Pro 4

#62

Earlier quoted context omitted.

Unfortunately, there is a huge amount of cargo-culted cruft lying around in various Linux-on-workstation-wiki guide sites that hasn’t been modernized since the 2000’s. I don’t normally like to rant without providing a solution, but this is a problem I see my friends bump up against all the time when I tell them it’s finally the year of the Linux desktop. When something goes wrong they land on the same search results…

I have had systems completely die from hitting swap a few years ago. This is not a 2000s problem.

I’ve learned to disable swap on my scientific computing machines where we’re working on giant datasets. It’s better for the machine to crash when it exhausts its RAM than go to swap.

In my experience a machine is never going to recover when a workload pushes it into swapping because something has gone awry and that situation is not going to fix itself.

Re: A Review of Linux on Surface Pro 4

#63
post #45

Earlier quoted context omitted.

Unfortunately, there is a huge amount of cargo-culted cruft lying around in various Linux-on-workstation-wiki guide sites that hasn’t been modernized since the 2000’s. I don’t normally like to rant without providing a solution, but this is a problem I see my friends bump up against all the time when I tell them it’s finally the year of the Linux desktop. When something goes wrong they land on the same search results…

This is OS-agnostic. I love the old fact that you should have twice the amount of swap as your RAM size. I could rant but, no. Just don't. Today, don't buy a computer (regardless of size) with less than 32 GB of ram. Yes, this applies to fruity products as well. Part from making it a more enjoyable experience it will also extend the usable life of the computer immensely. (The weird crap about apple computers not need…

> I love the old fact that you should have twice the amount of swap as your RAM size.

With a 32GB memory, 256GB ssd-disk laptop, it would be really weird to set up 64GB of the disk for swap.

Re: A Review of Linux on Surface Pro 4

#65
post #63
post #45

Earlier quoted context omitted.

This is OS-agnostic. I love the old fact that you should have twice the amount of swap as your RAM size. I could rant but, no. Just don't. Today, don't buy a computer (regardless of size) with less than 32 GB of ram. Yes, this applies to fruity products as well. Part from making it a more enjoyable experience it will also extend the usable life of the computer immensely. (The weird crap about apple computers not need…

> I love the old fact that you should have twice the amount of swap as your RAM size. With a 32GB memory, 256GB ssd-disk laptop, it would be really weird to set up 64GB of the disk for swap.

Maybe I was unclear, I despise that rule.

(also, a computer with 32 GB and 256 GB disk is a very weird combination not quite fitting a typical general purpose computer)

Re: A Review of Linux on Surface Pro 4

#66

I never liked the Surface series that much. It looks very nice, until you actually start working with them. Then they feel like a weird tablet with slow Windows on it. You can optimize it a little, but not much. Quite expensive as well and sometimes support is horribly slow. I gave my wife an old Lenovo Yoga 2 in 1. That thing works nice using it as a flipped tablet to watch Netflix, but here also the performance isn…

> ... with slow Windows on it.

Was yours a 4GB ram model like the article author's?

Re: A Review of Linux on Surface Pro 4

#67
post #62

Earlier quoted context omitted.

I have had systems completely die from hitting swap a few years ago. This is not a 2000s problem.

I’ve learned to disable swap on my scientific computing machines where we’re working on giant datasets. It’s better for the machine to crash when it exhausts its RAM than go to swap. In my experience a machine is never going to recover when a workload pushes it into swapping because something has gone awry and that situation is not going to fix itself.

There are many reasons this situation could happen outside of your context and swapping on SSDs is comparatively harmless compared to the old days of HDDs. Random example: swapping due to VM. You just stop VMs.

Re: A Review of Linux on Surface Pro 4

#68
post #53
post #46

Earlier quoted context omitted.

I have similar experiences. I've been digging into this more over the years and my two conclusions are: (a) Linux memory management is overall rather complex and contains many rather subtle decisions that speed up systems. (b) Most recommendations you find about it are old, rubbish, or not nuanced enough. Like one thing I learned some time ago: swap-out in itself is not a bad thing. swap-out on it's own means the ker…

It is not just advice. Default configs of most distros are set up for server-style work, even on workstation distros. So they’ll have CPU and IO schedulers optimized for throughput instead of latency, meaning a laggy desktop under load. The whole virtual memory system still runs things like it is on spinning rust (multiple page files in cache, low swappiness, etc). The only distro without this problem is Asahi. It’s…

> Default configs of most distros are set up for server-style work, even on workstation distros. So they’ll have CPU and IO schedulers optimized for throughput instead of latency, meaning a laggy desktop under load. The whole virtual memory system still runs things like it is on spinning rust (multiple page files in cache, low swappiness, etc).

LOL. A Ken Colivas problem, circa 2008, still there :-)))

Re: A Review of Linux on Surface Pro 4

#69
post #24

Disables Swap and Zram, gets OOM killed, surprised pikachu face Joking aside, is there an actual legitimate reason to do this on a workstation? I understand why you would want to disable swap on something like a kubernetes cluster node but in my head, heaving at-least zram enabled is a good thing on a workstation so you *don't* get OOM killed... I call on thee, Linux wizards of HN, to help me understand the reasoning…

Unfortunately, there is a huge amount of cargo-culted cruft lying around in various Linux-on-workstation-wiki guide sites that hasn’t been modernized since the 2000’s. I don’t normally like to rant without providing a solution, but this is a problem I see my friends bump up against all the time when I tell them it’s finally the year of the Linux desktop. When something goes wrong they land on the same search results…

Swapping in any form always sucks, period. The machine starts behaving strangely and does not tell you why because it's trying it's hardest to hide the fact that it ran out of resources.

Experience has shown me over and over that you just want to feel the limits of the machine hard and fast so you can change what you're asking of it rather than thinking that there is some perf issue or weird bug.

It's the idea that swap is somehow useful that's old. It's not, it never worked right for interactive systems. It's a mainframe thing that needs to die.

Re: A Review of Linux on Surface Pro 4

#70

I never liked the Surface series that much. It looks very nice, until you actually start working with them. Then they feel like a weird tablet with slow Windows on it. You can optimize it a little, but not much. Quite expensive as well and sometimes support is horribly slow. I gave my wife an old Lenovo Yoga 2 in 1. That thing works nice using it as a flipped tablet to watch Netflix, but here also the performance isn…

IMO the advantage of the Surface is that it's one of the only tablets out there which is (a) reasonably priced for what you get, (b) has a x64 processor, and (c) can have Linux installed on it without too much difficulty. So if you want a Linux tablet, the Surface may end up being one of your only viable options.
Post reply on HN