tl;dr the Operating System for my current Fedora KDE install and most of everything else (basically all software is installed on it, with some games which require SSD and which I also tested before having a new HDD for Linux alone) are on a single 2tb SSD (normal Sata 3) and both sometimes when I open a lot of programs at the same time after boot (happened more up to Fedora 39) and/or when I am writing a lot of stuff (like Steam updating a game) the Operating System would either start stuttering or freezing for some time, up to 1 to 2 minutes.
Is it normal?
[ I KNOW it may just be the same with any and all Operating Systems, but honestly I don’t remember Windows stuttering and/or freezing, it just made me hang there while it loaded.]
I have Fedora KDE, so might as well ask directly here, and other than the fact that NOWHERE else there was anyone discussing this directly I’d have gotten no answer if I were to post on Reddit or anywhere else (here people actually answer to most things).
Note that the change will not persist across system reboots. You’ll have to create a “udev” rule if you decide that you want the setting to be the default on system startup.
For example:
# cat << END > /etc/udev/rules.d/60-ioscheduler-rotational.rules
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/scheduler}="bfq"
END
Exclude the $ at the start. That is just an indicator that the command that follows can be run as a normal “unprivileged” user.
Likewise with the commands that start with a #. The # means that the command that follows must be run as root.
Your command prompt should end with $ or # depending on whether you are running commands as a privileged user or not.
Use sudo -i to escalate to the privileged root user account.
Use exit to de-escalate back to your normal user account.
Edit: Also, that command is only looking for drives attached to the SCSI Disk (sd) subsystem. You might need to modify it slightly if your drives are listed under other device node paths. You can use the following command to get a readout of all your drives and what their corresponding device node paths are.
~$ for i in /sys/block/sd?/queue/scheduler; do echo "$i: $(<$i)"; done
/sys/block/sda/queue/scheduler: none mq-deadline kyber [bfq]
/sys/block/sdb/queue/scheduler: none mq-deadline kyber [bfq]
/sys/block/sdc/queue/scheduler: none mq-deadline kyber [bfq]
/sys/block/sdd/queue/scheduler: none mq-deadline kyber [bfq]
/sys/block/sde/queue/scheduler: none mq-deadline kyber [bfq]
I read that this is “for high performance SSDs and Nvme-s”.
.
This instead, other than having a brief breakdown (feel free to link any wiki page when you believe they’d be best) is something which I’d like to have for each and all systems.
I’d rather have “a superfast Nvme lose 2 seconds when copying 20gb” than “a superfast Nvme freezing for 1 minute because it’s copying 5gb” (this PC does not have the install on an Nvme, I’m just making a very practical example).
More than that, it’d be beneficial for those whom have a OLD computer (I’ll never leave a chance to link this work everywhere it’s relevant, both to help and because other than an “obsession” [fascination?] of mine) who just want to slam an SSD in there and run le desktop to read le taxes.
I think the BFQ scheduler was the default for a while, but these settings are not a one-size-fits-all sort of thing. The results can vary drastically depending on both your hardware and software configuration as well as the type of workload you run.
The mq-deadline scheduler, for example, works well on large server systems with lots of CPU cores and disk drives because it can do more “in parallel” (“mq” stands for multi-queue).
Good SSDs (on high bandwidth connections) might perform best without a scheduler.
So it’s just one of those things you have to tweak a bit and find what works best for you.
Gonna be honest, I have no idea what “none mq-deadline kyber [bfq]” actually means, other than what little I read before,
and frankly, as almost ALL End Users actually do, I don’t really care about the technicalities. I just want my PC to not freeze, EVER.
Open browser tabs, the writing documents, videos playing (which worse of all may keep on playing, but the UI does not respond, only keyboard inputs managing to control it as the last played frame before freezing keeps still upon the video’s window, like with YouTube), exploring Dolphin folders, even just the damn Task Manager (name changes with Distro, but it’s always the same job) sometimes fails to come up.
.
Talking about the present, if someone comes to Linux from Windows 10 or 11, what they experienced was a complete freeze happening almost never, and the less critical situation of “I can still move windows, but their contents lag and is frozen” usually has at least Task Manager opening.
It should already be default with any and all Operating Sytem ever
(because a case where the user’s input is second to anything else is a machine made not for the End User’s activities in mind)
that at least the “base functions of an OS”
(desktop, alt-tab, and some critical software like Task Manager)
should NEVER be dropped from “absolute priority position” because even if any developer actually has a reason to “make the OS stutter or freeze” as a feature it should be always avoided for the sake of the End User’s experience.
tl;dr How do I make Fedora KDE force its priority list to make the “base functions of an OS” and absolute priority to NEVER have freezes and stutters ever again?
But the typical Windows user also has not added 5 disk drives of radically different specs to their system and tried to span a single filesystem across them. (And if they did even Windows probably would do the same thing that your system is apparently doing.)
I’m not sure if you’ve linked your drives together with a common filesystem (or spanned a partition across them), but that is my guess as to why your system is not performing as well as you had hoped. But really, there are many ways a system can be poorly configured that would cause it to stutter, regardless of whether it is Windows or any other OS.
If I’m interpreting what you mean by “the base functions of an OS” correctly, then setting the system to use the BFQ scheduler by default (as you have done) is probably about the best you can do.
Really though, the BFQ scheduler should not be necessary. It is likely that it is just “masking” a deeper problem with the performance of your system. I’m guessing that your drives are “unequally yoked”, if you are familiar with that (very) old saying.[1] It might be a similar concept with your disk drives – one poor performing drive might be preventing the rest from being able to keep up.
Another possibility (among many really) is that you have mis-aligned partitions.[2]
2 years ago I had my Nvme with Windows 10, 4tb HDD for games & files, 2tb HDD for recordings & video backups and then a 1tb SSD for some more games like Baldurs’ Gate 3.
There were some strange stutters on my PC with Windows 10 too, always have been, where W10 would “work in slow motion” where the sound skipped between “playing it” and “silence because of the skip”, the mouse input got delayed and then slowed while also skipping, and so would the windows too.
It would happen basically randomly, there was no way to reliably reproduce it.
.
I don’t know why, but my PC always had some strange stutters sometimes, but with Fedora it’s assured to happen when I do something like updating a game which is installed on the main 2tb SSD.
Computers really are quite complex and there are many ways that things can go wrong.
You might check to see if your PC has any available firmware updates. You could also run something like Memtest86+ to see if there are any problems with the memory chips. You can try swapping out various components to see if any of them might be generating “noise” that could be interfering with the system. Beyond that, there probably isn’t much you can do.
Edit: I just saw it mentioned that a few other users are now reporting “freezing” when they upgrade their computers to Fedora Linux 42. If you are also using Fedora Linux 42, it is possible that there is a common (software) cause of the problem.
Sounds like a platform timer thing and HPET and TSC stuff (I have an Ivy Bridge laptop that sped-up music when I ran a high-CPU app on Windows 10; I’ve never seen this Skylake+ though). I’m not too sure what to suggest for this.
If you have Intel SATA; if you were using Intel RST/RAID on, it’s possible both the NVMe and SATA drives were remapped through the RST controller, and on Windows Intel’s driver does MSI-X. Using MS Standard AHCI would have SATA drives on MSI (not X), but NVMe on MSI-X.
There were different IRQ amounts used with NVMe with AHCI vs RAID/RST modes too on Windows and it changes with CPU SMT/HT enabled/disabled; RST has like 3s faster boot according to Task Manager but real-world I’m not sure I saw a difference anywhere. I’m not sure if the IRQ amounts change between the SATA modes on Linux.
I was on F42 Workstation/GNOME and Xfce without any noticeable issue vs F41, but I do different things
mitigations=off and i915.mitigations=off
iommu=pt and VT BIOS-disabled (no re-map)
C-States off, tuned removed, forced max-perf with x86_energy_perf_policy
If it just happened to others, then I don’t believe it’s the same issue.
Every once in a while (1-2 months) my computer (under Windows 10) just went https://youtu.be/9SCeK6BxAI4?si=Zi2JUt-G3_SX6ftU and now on Linux it does something similar when “the same Drive as the OS is installed upon gets hammered with copy/paste action” (it may also do the same thing Windows 10 did, I mostly believe that they are separate, distinct events).
I am checking multiple things now, even if I’m tired, so I ain’t gonna do anything which requires important work now.
Still one important thing I am checking too is that the “Sata 5 and 6 connectors” do not seem to work.
I have to check why, but I just hope that they are not broken or something. I don’t want to buy a PCI-e Sata expansion card or a new Motherboard…
It looks like the freezing that others are reporting is turning out to be something to do with the WiFi driver. It doesn’t look like your system has a WiFi card, so it’s probably unrelated to your problem, but you might try disabling your network driver (r8169) just to see if it makes any difference. (Maybe the easiest way to test it would be to temporarily disable the network device in the BIOS settings?) That would be a long-shot though.
Regardless of that, my very good reason which brings me to this firm belief is that no other PC of mine had ever experienced a straight-up freeze when copying to and from the boot disk (even the mouse doesn’t move), while Fedora (KDE) seems to just do that if you copy lots of GB, or as I said before, even when you just booted up the PC and started a couple things as Brave, Steam and Discord.
.
Now all my PCs are set, so I don’t have to copy much data to and from their boot drives at any time, so I have to go from memory about these things.