Programs taking extremely long to boot up

First, my cachyos-bugreport.sh: f5cd3d9

Hi all, I’ve been running CachyOS on my PC for a few months now, and it’s been mostly a great experience, but I’ve been running into one huge issue: everything takes way too long on first boot up after I turn on my PC. Zen browser takes 30 seconds-1 minute to boot; Steam takes even longer, in the realm of 3-5 minutes. Games can take a variable amount of time, even when they’re not particularly intensive. I know they take longer on first launch, but it took Deep Rock Galactic: Rogue Core more than 20 minutes to launch. Other games I’ve had work perfectly before, like White Knuckle, take several minutes to load. Both of these games are pretty small and low-poly, so I don’t know what the problem is.

The puzzling thing is that performance once I’m using the program or game is perfectly fine, it’s just the initial load that takes forever. I’ve asked on the CachyOS discord and someone pointed out I’m using an SMR HDD, which is suboptimal. That’s on my poor judgement back when I built this PC, and I’m upgrading to an M.2 SSD the first chance I get. Still, this can’t be caused entirely by my HDD, right? Is there anything I have misconfigured that I should fix?

Hello and welcome,


One of the first things I notice is your SWAP is misconfigured.

A bunch of zswap options are enabled when the swap device in actual use is zram and those 2 conflict.

ZSWAP must be disabled if using ZRAM.

That is at the very least the following boot parameters;

zswap.enabled=1 zswap.zpool=z3fold zswap.compressor=lz4

Should become;

zswap.enabled=0

We may also want to look at how your zram has been configured, ex;

cat /etc/systemd/zram-generator.conf

Another thing I notice, if my search-foo is correct, is that your BIOS is out of date. Version 10.60 it seems.

( https://www.asrock.com/mb/AMD/B450M%20Pro4/index.asp#BIOS )

Thanks for pointing those out! I’ve edited my boot parameters to disable zswap, and this is my zram-generator.conf:

[zram0] 
compression-algorithm = zstd
zram-size = ram
swap-priority = 100
fs-type = swap

I’ll update my BIOS and see if that or disabling zswap fixes the problem.

Alright, so bootup is faster than before, but still rather slow. Launching Steam, from the time the “Verifying installation…” window opens to my Steam library opening, it takes 1:49.46. Is there anything else I should look into to speed things up?

That still seems rather slow even for some HDD.

Then again maybe not if you have a huge installed library?

There was preload and similar that folks used to use that would cut down on the time to open applications because they would already be .. preloaded partially .. into memory.

Its not as well-known anymore because its a lot less useful with modern storage. But it may be useful for you if only temporarily.

Looks like I already had preload installed, but I forgot to enable it in systemctl. Whoops! I’ve enabled it and will give it a few days, let’s see if that helps.

So I have CachyOS on a USB HDD and it is amazingly fast (especially when comparing with Windows 11 on a HDD). I’m using an old 2TB CMR drive from 2012 with max 140MiB/s sequential read/write.

SMR drives have around 250 MiB/s sequential read speeds but horrible random writes since an entire 256MiB block need to be read-modify-write (RMW) every time a file is modified. Launching an app should not take as long as you have described… But maybe you have really high fragmentation? SMR drives are mainly intended for “cold storage” applications or large rarely edited files. They are absolutely the worst drive to use for small, frequently edited files.

If you use BTRFS you can defrag your system with:

#defrag BTRFS with zstd compression (does entire path!):
sudo btrfs filesystem defragment -v -r -f -czstd <path>

#limit defrag to 256MiB increments of system RAM:
sudo btrfs filesystem defragment -v -r -f -czstd --step 256M <path>

If you use BTRFS snapshots, you probably don’t want to defrag since it will consume more storage space. Best to only defrag areas that do not use snapshots in this case.

EDIT:

XFS and EXT4 are probably the better filesystems to use with a HDD, if you do not need snapshots or transparent compression.

When using BTRFS always make sure your partitions are mounted with noatime in /etc/fstab to improve performance. The autodefrag BTRFS mount option is safe to use with snapshots but isn’t as effective/aggressive as a manual defrag.

I was finally able to get my hands on a M.2 SSD (no small feat in this market!) and reinstalled CachyOS, that solved all of my problems and everything boots up extremely fast now. Guess it really was a problem with my hard drive. Thanks for the help!