2023-03-10 | 6 minutes reading

How to optimize performance on desktop OpenBSD

If there is something I don't like on OpenBSD, then it is lack of information when it comes to problem solving. The main reason, of course, is the size of the OpenBSD community. But even when I try to target the community on the main communication channels like IRC, or Mastodon, I often don't get the answer I am looking for. Therefore, I decided to do it another way. Research the topic, make a blog post, publish it and let people only comment on what is wrong and what is missing. For most people, it is more fun to correct someone, than to prepare the full response to the question.

Problem

The first problem which I will cover in this article is that OpenBSD is slow. You won't notice that much on the server without heavy IO/load/multiprocessing, but you will definitely feel the huge performance gap on a desktop. You can feel it even if your setup is completely minimalistic like mine (dwm + mostly terminal). The boot of the OS is several times slower than Linux/Windows. I have also measured application starts and usage against a Gentoo Linux deployed on the same machine. The machines were Thinkpad X230, Thinkpad X1C6 and an Alderlake high performance desktop. Tested Applications were Chromium, Firefox, Libreoffice, Gimp and IntelliJIdea, which are most of the time the only applications I use out of terminal. Results were from 50% to several hundred percent worse in the case of OpenBSD. Internet browsing is also slower on both main browsers. I have done the tests on wired connection, because it is known that wireless performance on OBSD is worse. These measures were not super exact, but they support the point. If you want some less real world and more precise tests supporting the claim, check this Phoronix article

Why is it slow

Solution

There is no real solution to this problem. Most of the issues we went through boil down to being that way by design, or there is no manpower/will to adopt more robust alternatives, which would increase maintenance cost and code complexity. It would be great if the OpenBSD performance would be on par with Linux, but it won't happen. If the performance has higher priority than simplicity and additional security in your case, then you should probably use a different OS. But if you're here to stay like I do, then there are some partial improvements you can apply:

Errata & corrigenda


tags: OpenBSD, Laptop