Comment 47 for bug 1973434

Revision history for this message
Shashank Chintalagiri (shashank-chintalagiri) wrote (last edit ):

This problem still very much exists on 23.04. Since I can't find a single 'regular' metric that shows the problem, I can only provide anecdotal information. Perhaps someone can see a pattern and find a common thread.

The machine I'm using is an Asus Zephyrus G14 with AMD Ryzen 5 4600HS NVIDIA GeForce GTX 1650 Ti and using Nvidia proprietary drivers. Storage is entirely NVME SSD and I have 40 gigs of RAM. I use both KDE (preferred) and Gnome, depending on which feels less laggy at the time. I use X11 now because Nvidia requires it (?), and I remember using wayland some time ago (on the same machine and with nvidia drivers. I remember needing to switch away from firefox because it didn't work with wayland (?).

I did notice significant performance degradation when I updated to 22.10. At the time, I uninstalled most snaps except the browser(s), completely disabled tracker-miner, and the system was more or less usable. In retrospect, I have had performance degradation over the past couple of years when playing Dota 2. Since that's an occasional thing for me, and given gaming on Linux has been historically difficult, I just chalked it up to the game becoming more demanding. Similarly with pycharm and browsers, since I am used to having a large number of files / tabs / projects open, I have subconsiously adapted by changing my behavior by reducing the number of open windows / browser tabs and occasionally exiting or restarting the machine. For context, I've been using Ubuntu since 2007 and it wasn't unusual for my laptops to 20+ days of uptime.

The performance degradation became entirely debilitating after upgrading to 23.04, which I did to get rid of the annoying EOL message for 22.10 (on a side note, 9 months of support on a release? Really?).

The following are the 'measurables' I refer to when I talk of performance degradation:
 - The time it takes for me to hit a key on the keyboard and the character to show up on screen.
 - The time it takes for zsh/oh-my-zsh to render the first and subsequent command prompt.
 - The level of detail I can see when a web page is being rendered.
 - The time it takes to switch focus
 - The time it takes for me to press alt+tab or meta and be able to switch windows.
 - The time it takes for pycharm autocomplete to do something

All of these measurables were probably actually borderline measurable immediately after the update. As in, with a stopwatch and human response times.

I have made the following observations / changes since (possibly in slightly difference sequence). Each of these steps provided enough of an improvement that they felt successful:

  - Disabled most zsh/oh-my-zsh plugins for shell enrichment. Along with that, disabled keychain and its counterpart for gpg.
  - Got rid of snap. Completely. Every snap, and snapd itself as well. I will be honest and say I don't remember why I decided snap was the problem. Doing this did improve the situation slightly.
  - Suppressed tracker-miner. This was doing a lot of disk IO and eating CPU as well.
  - Uninstalled plocate and the indexer. Was also doing a lot of disk IO.
  - Installed (and later uninstalled) preload. I'm less certain if it helped, but preload itself was sitting at 50% CPU very often.
  - I was using brave as my browser, and I noticed it was doing a crap ton of disk IO with iotop. I first tried using profile-sync-daemon to mitigate this, and it did help for maybe a day or two. Then it lost the profile along with the 50 or so tabs I had open, and I didn't want to deal with it any longer. I uninstalled brave and tried using epiphany. (No snap, so no chromium etc)
  - Epiphany was just as bad. I started noticing a pattern. Chromium was choking things up initially as well, but I had nuked it along with snap. Epiphany uses the chromium engine as well.
  - Removed brave and stopped using epiphany. Installed Firefox from the Mozilla tarball. This resulted in possibly the most significant improvement in performance.
  - Switched the linux kernel from ubuntu (6.2.x?) to mainline (6.4.11). I _think_ this improved things, but I can't remember how I reached that conclusion. It could even have been the restart after installing the kernel that created a placebo effect.
  - I'm also noticing that the Steam client causes noticeable performance degradation as well, and I assume the client uses CEF as its browser. Note that the performance degradation happens whether or not the steam library is open. If it's in system tray for long enough, I need to wait after each mouse click I make on the desktop. This is similar to what happened with chromium and brave.

Presently, if I sort in htop by TIME, the only potential redflag I see is pipewire with no audio playing. htop itself takes about 37% CPU.

At present, the machine is usable, though the longer it is on and being used, more of the degradation becomes apparent. On occasion, I have had to hard shutdown because nothing responds. There are no red flags in CPU usage from htop and top, no red flags in io usage from iotop, and nvidia-smi sits at a comfortable 10% utilization. I haven't seen any noticeable red flags when things slow to a crawl. CPU utilization is well below 50% and so is RAM utilization.

I should also note that this does not feel like a graphics issue. When the system itself is responsive, graphics on the desktop (effects, transparency, etc) are smooth as I've ever seen them. On the flip side, when the system does slow down, even entering typing a character on konsole takes time, and I'm not eve talking about autocomplete. It feels more like some kind of IO bottleneck.

As I write this, the machine actually has felt relatively usable, though I still feel much more lag than immediately after boot. This is after switching back to KDE.