Skip to content

linux vs hardened vs zen for high-end desktop?

Been using arch for programming for quite a while and today stumbled onto the Kernel wiki page, which introduces hardened and zen kernels. Are they any beneficial over vanilla and which one should I pick for everyday run?

79 points57 comments
Open on Reddit
About this post
Posted
Archived
Score
79 · 95% up
Kind
Text
ID
oeavfc

Author

60
posts
200
comments
10
media
View profile

58 comments

I use zen for the additional patches (fsync) for gaming.

Also says does better multitasking under load. Which I can't say if it's true but seems fine.

Downside is certain arch distributed kernel modules are made for the default kernel so you may find you need to jump through some hoops.

I would stick with the default kernel TBH unless you need specific things from these other kernels.

63 points
xt1zerOP11 hidden

Thanks! So I guess unless I run linux for very special uses or as daily driver (I play on Windows, so it's not my case), zen kernel won't be really helpful for me?

13 points

I would recommend sticking to just normal kernel. It's a fun project to switch to zen but besides that just stick to regular unless it's for a special use case

20 points

Zen kernel is basically pointless most of the time.

I game on Linux every day and Zen doesn't do enough for me to put up with the annoying bits when it comes to updates.

Fsync is almost a reason. But again, meh.

Really the big determining factor for multi-threading workloads is really IO. If you have NVME or some other kind of SSD, get that working right and you'll be fine.

There really isn't that much slack in the kernels work queue

2 points

Depends. In my case I see the occasional GUI stuttering esp. on heavy (disk) I/O in daily usage, which doesn't happen on Zen, so I prefer Zen. Zen trades throughput for lower latency (faster response in multitasking).

But if you're happy with the default kernel there's no reason to switch.

1 points

When using the AUR package "rtl8761b-fw" (for bluetooth) is there something special required when switching to linux-zen?

1 points

Just make sure to install linux-zen-headers as well and that should be it.

11 points

The zen kernel is in the official repositories and is as well supported as the vanilla kernel. I have been running zen for years and I have had no problems. The only real difference is the scheduler. The zen kernel prioritizes the processes that you interact with directly, giving you the illusion that your machine is running faster. In reality the vanilla kernel will have slightly higher overall throughput, but it may give you a visible lag at times of high core usage. I prefer zen, but there isn't really any big difference. Most of the time you would be hard pressed to discern any difference between the two kernels (you can actually tell by watching the CPU processes in a system monitor once you get used to telling them apart).

When I use the hardened kernel I also use apparmour and firejail so it would be difficult for me to distinguish which hoops that you have to jump through are thrown out by the kernel itself, but suffice it to say that security requires extra work.

38 points

I've been using the hardened kernel (for my every day run) for the last few years and everything works as expected, no issue at all. However, the vanilla kernel works just fine for most use cases. I just use the hardened kernel because I'm a bit of a security paranoid, that's all. You know, the kind of person who uses a hardened kernel, DNS encryption, VPN and or Tor, a firewall, 2FA, etc., for his home machine.

The only downside I can recall right now is that the hardened kernel does not support SMB 1.0 (old windows machines and Android SMB server, for example).

Btw, I also use Arch for programming.

15 points

In theory zen should be the best. But I personally just use normal kernel because well.... It's easy. In future installs I would probally try out Zen.

I would say try them both out.

12 points

Why install just one kernel?

Many people install a couple kernels so that if one breaks they can just boot the other one.

Be careful of necessary drivers if you go with the LTS kernel and have very new hardware.

11 points

Can I install multiple kernels using pacstrap during the installation of Arch?

2 points

Potentially controversial opinion: just use the regular linux package. You likely won't notice any difference in performance and then you don't have unnecessary downstream patches on top of your kernel. No one ever seems to be able to produce data that shows that the zen kernel really does offer better performance for real workloads in these Reddit threads.

9 points

Pro-tip, if you're just gonna install one kernel, go with linux-lts. If you're going with two, Linux and linux-lts.

-5 points

Don't recommend hardened kernel for desktop. It has user space namespaces disabled which are used for sandboxes.

9 points

hardened kernel comes with a performance and usability penalty

personally I use https://github.com/Frogging-Family/linux-tkg for a smoother desktop experience, zen kernel comes close to that

8 points

Is the perfoance penalty significant? Also what areas do they affect? I use the hardened kernel since day one of my arch journey (~ 4 years ago) and never really had performance issues. I have a beefy machine though, so that might play a role here too. I also play video games without much troubles.

1 points

Since you already run hardened, why not benchmark same games with performance oriented kernels like xanmod or tkg. Hardened kernel to me always seemed like it belonged oddly to the server space rather than the desktop. There are numerous kernel & system options to "harden" any regular kernel to secure defaults.

4 points

Same here. TBF I've never noticed a difference between mainline, LTS, and hardened. If there is a significant performance differences, it's not that big, or on a reasonably obscure or lightly used path.

I've been using the hardened on servers and desktops for about 3 years now, and I'm quite happy with it. Laptop is certainly performant enough for me and my work, but I don't game, so I can't advise on that aspect.

2 points
unknown author

Deleted before we saved it.

7 points

I have 12 core CPU but still Zen gives me visible UI performance improvement over stock when under load. Definitely recommend. It's really no harder to install than stock kernel: just install it + headers with pacman and voila!

6 points

Hardened disables a number of features you use as a programmer such as the syscalls used by your debugger. So stick with vanilla on you dev box.

3 points

Con-Kalivas (Linux-ck), and Zen are great. If you don't mind compiling the kernel yourself you can tweak settings to improve responsiveness or compile it for your specific CPU architecture. If you dig you may find some pre-compiled kernels for your specific CPU, but if you have a high end desktop compiling yourself won't take long at all anyway.

2 points

I have a potato pc and it takes me roughly under an hour to compile a kernel with localmodconfig. I cannot imagine the pain Gentoo users go through when its time to update installed packages.

2 points

Yeah, I cringe whenever my laptop needs to compile any small aur package and I only use pre-compiled Zen kernels for it. I miss my old beefy desktop. And yeah, Gentoo is rough on low hardware. Personally I'd only try it with a Ryzen 9 or Threadripper, but I'm sure it's plenty usable on any recent 6+ core cpu.

2 points

I have a potato pc and it takes me roughly under an hour to compile

And you're calling that a potato. First world problems, smh smh

1 points

Do you not use modprobed-db when using localmodconfig? Because that build time is crazy.

0 points

I tried zen but it didn’t play with my hardware well I guess. I stick to LTS and have noticed zero kernel related problems since, performance isn’t much different from default kernel imo.

2 points

Zen gives me trouble with my AMD APU, freezes and even a solid green screen of death. Haven't tried it in a month or so though so let's see what happens after a reboot. Since I started having those issues I went back to LTS without trouble, but I think that Zen was marginally faster and while it doesn't have PREEMPT_RT, it does have PREEMPT with is better for audio stuff.

1 points

I run Linux for my everyday system and I don’t need the other specialised kernels but I do know ppl who use the zen Kernel to be able to run a box etc..

1 points

I am using the Zen kernel for a long time. In some situations, like copying a lot of data, the system feels smoother. But not faster. But I can't prove this with numbers. All in all, I have no problems with the Zen kernel. Because it is available in the official package sources, updates are also offered quickly.

1 points

Startup time reduced from default 3.8+s to zen's 3.072s while the power consumption stayed the same. I remember the default kernel had this startup time before a kernel update and just assumed it was for security. Anyway, only tried it for a few hours and haven't noticed any issues so far.

Edit: Hardened is slow and I get amdgpu errors.

1 points

If you don't have Nvidia graphics, go for lts. If you do, go for normal linux.

1 points
unknown author

Deleted before we saved it.

0 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.