Score:0

How to figure out what makes a Linux workstation slow?

pm flag

We have this ThinkPad X240, 8GiB of RAM, an i5 4300U, and a Toshiba SATA SSD. The machine is running Linux Mint 20.3.

The user complains that it is very slow. Mostly when the browser is open and several tabs are loaded. In particular Google Maps takes several seconds to interactive, and moving the map around means a couple of seconds where the machine is choppy. This user's usage is mostly through the browser (Firefox). Same thing when the browser is open and using LibreOffice at the same time, it takes a couple of seconds to register inputs from the keyboard or the mouse.

I've run free -mt and don't see any sign that's it's out of RAM or swapping. The CPU doesn't seem overwhelmed either. The WiFi connection is a little slow, but that would only impact pages' loading time and not slow the whole machine down.

I've reduced the swappiness to use the swap less, and I've installed an extension to unload unused browser tabs since this particular machine is stuck at 8GiB of RAM max: the wise designers at Lenovo thought one RAM slot was enough for this machine.

I have to admit that my diagnosing skills aren't super advanced, and I struggle to understand what the issue is especially that the user's workflow isn't that demanding.

I have a few hypothesis:

  • The CPU is somehow overwhelmed, but I don't think that's the case as the load average via uptime is below 1.00

  • The machine doesn't have enough RAM and swaps, but free -mt shows a couple GiB of free RAM and a very small swap figure

  • The SSD doesn't have enough IO and the queue builds up, which I don't know how to check

  • The OS is somehow misconfigured and does something suboptimal, I don't know how to check that

  • The graphics driver is problematic and doesn't use hardware acceleration, I don't know how to check that

Or maybe something else entirely.

What methodical steps could I take to eliminate possible issues and identify where the bottleneck is?

Since the problem is intermittent and I'm not always available to investigate when the condition is present, is there some kind of logging I could be doing on the machine to analyze issues after the fact?

vidarlo avatar
ar flag
It's a ten year old mid level CPU. Yes, it's slow compared to more modern CPUs. In addition the SSD is likely to be mediocre, and the amount of RAM is nothing to write home about.
Pierre avatar
pm flag
The CPU is ten years old, yes, but I use an X230 on a regular basis which is even older and although it's slower than a more recent machine, it's not as slow as that X240. In any case, I'd like to diagnose where the bottleneck is with certainty before I do anything else. If it's the SSD IO that's problematic, it's a cheap fix; cheaper and less polluting than replacing the whole machine.
user1686 avatar
fr flag
What does `glxinfo -B` output? What is the typical "load average" and what's the typical CPU usage% in htop?
anx avatar
fr flag
anx
Old Lenovo laptops feel a lot younger when you install uBlock, disable webgl .. and use a lean OSM interface where you merely need the *static street map* functionality in Google Maps anyway.
Pierre avatar
pm flag
@anx: AFAIK, Mint disables snaps by default because, well, snaps. So the FF installed with `apt` is the `deb` version, not snap. OSM isn't an option, the user depends on GMaps a lot because that's what everyone else they work with uses unfortunately.
anx avatar
fr flag
anx
Mint does not do Wayland either, right? If you are using that old school X stuff, you should definitely explore making websites stop thinking they got a GPU when all they got is a ten year old [Meltdown™](https://www.intel.com/) - Firefox has a `webgl.disabled` switch in `about:config` which disables those Google Maps features that are not going to work that well anyway.
anx avatar
fr flag
anx
Are you familiar with our lord and saviour [Netdata](https://github.com/netdata/netdata) that can help watch, and more importantly neatly *visualize and time-correlate* potential bottlenecks?
Pierre avatar
pm flag
I am not, thank you for sharing!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.