Help request, why is my Linux so damn slow?

2011-02-12 » fedora, Firefox, linux, nVidia, optimization, performance, X.org

I've discovered Linux in 1995 and I have been using it as my only home/work operating system since then. I still love it and want to continue to use and promote it, but in the last 2/3 weeks it's become almost impossible. In this page I explain why, hoping to get and collect useful suggestions.

First, hardware and software details. These days, I'm using Fedora 14 x86_64 on a computer with an ASUS M3N78-EM motherboard and 8 GB of RAM. Other details of the configuration are shown in the sysinfo screenshot. I am running Firefox and Flash from the Fedora packages firefox-3.6.13-1.fc14.x86_64 and flash-plugin-10.1.102.65-release.i386. Strigi is not running, Nepomuk and desktop effects are disabled. The output of rpm -qa | egrep -i 'nvidia|xorg|x11' is here.

Next, how I (try to) use this box. 95% of the time, all I need is a Web browser, an office suite, a text editor, an email client and a couple of terminals for SSH and other console work. So I always have Firefox (20/30 tabs open on Facebook, Twitter and news sites of all sorts) Kate, mutt in one Gnome or KDE console with ¾ tabs, sometimes OpenOffice. There are also a Dovecot server for a local IMAP email archive and MySql + Apache for a couple of very light LAMP application of which I'm the only, local user.

Everything described below was already happening, albeit in a much lighter form, with previous versions of Fedora. However, about twenty days ago I upgraded from Fedora 12 to Fedora 14 and since then everything became disgustingly slow. Here's how.

In Firefox, just about every single BASIC operation takes at least ¾ seconds to happen, counting from the moment when I do something to when Firefox has done it: scroll down a window, reopen it them after it was iconized, move from one tab to another, highlight and copy text from a window or past the same text in another one… EVERY time I do one of these and similar things I have to wait. When I tweet, Firefox is still showing the first 20/30 characters when I have already typed all 140 of them.

Oh, and I have to killall Firefox myself daily, because it completely freezes. Doing this about once a day is enough, because Firefox already crashes by itself 4/5 times every single day.

Using Kate is a similar nightmare: it always takes at least ½ seconds from when I click somewhere else in the text to when the cursor reappears there. Every time I press CTRL-S to save plain text files as small as this one, I have to wait ½ seconds before Kate unfreezes and I can resume work.

Sometimes, not always but quite often, when typing fast, the text displayed in the Kate window is regularly several words behind what I'm typing. What I mean here is that while I was typing “Hello” in this sentence you're reading right now, X and Kate were still panting to display the last words of the previous sentence. Another very common thing is to just miss some keystrokes. I'm fast, but not that fast.

If I have two or more plain text files open in Kate, they show in the “Documents” pane on the left of the window. If I click on one of them it's 2/3 other seconds from the click to when I see that file. Using other text editors doesn't make any meaningful difference. In OpenOffice, it's more or less the same story.

Desktop-wise, if ANY window fills the whole screen, I iconize and then maximize it, by clicking on its icon in the panel, it takes ¾ seconds to display it again. Even if it's a window, like Kate's, that only contains ASCII text.
Using Gnome or KDE doesn't change anything. Finally, in case anybody were thinking “use Chrome”, I haven't done it yet simply because very little would change. It makes very little or no difference whether Firefox is running or not: Kate and everything else will still behave like if they're carrying a whole herd of dinosaurs on their backs, even if there is no browser running.

I could continue, but it would take too much time to type, so let's conclude.

I am sitting in front of a dual core processor that toggles many hundreds of millions of times each second, that is orders of magnitudes faster than my own brain; a processor whose available working area (billions of bytes of RAM) is several orders of magnitudes bigger than the combined size of all the files (be they local or web pages) I have open at any given moment.

Still, I am having really serious performance problems with basic computing activities that were absolutely standard and average 15 years ago. I'm not compiling, playing 3D games, editing video or anything of that sort. I'm only trying to read and write text, for heaven's sake. This is stuff that any computer and operating system around these days should do much faster than any human. The user should be the bottleneck, not hardware or software drivers.

If this were a hardware problem of any kind, by now the computer would be dead or I would have had some serious data loss. Nothing of this happened. Probably, a good part of the problem is in some weird X/nVidia/kernel interaction, or lack thereof, but can it really justify this behavior? Opening and closing windows and tabs, typing text… this is stuff that even with a suboptimal or misconfigured driver should be instantaneous. No?

For the same reason, I like Fedora but would have no problem to use Fedora 32 bit, or another distro; but I would do that only if I were sure that it is a distro-specific issue, which doesn't seem to me, and that a switch would eliminate these problems. The fact that I had them even before Fedora 14, or things like Shuttleworth saying he wants Ubuntu to become more responsive, make me think I'm just a serious example of a very general issue. Also, changing the hardware is NOT an option, as a matter of principle. That's what Windows users do. I'd buy a new computer only if I were SURE that there is no other way to work decently, because this one is so old (2 years???) that it can't keep up with current Free Software. And if this were the case (which I am sure is not), it would be so bad to make me go for Mac OS.

Changing window manager ordesktop environment? Gnome and KDE both suck as described, maybe KDE is slightly slower. Sure, I will try to run fluxbox as soon as I can, and personally I'd have no problem to use it. But it can't be that simple, if KDe and Gnome always behaved like I'm seeing now, nobody would be using them anymore.
Besides… OK, sure, I can use fluxbox myself, but I would really like to not do that, for advocacy reasons. It's a solution for me, but for Linux and Free Software is a defeat. If installing fluxbox or something similar is indeed the only way to make this box run decently, it will be OK for me, but I'll also have to give up any hope to convince people passing by (starting from family members) to “here, try Linux, don't you see how fast and complete and friendly and cool looking it looks by default these days?”

I know very well that Linux and Free Software are great, but here and now they are disgusting, really. All in all, I estimate that since the upgrade I've been wasting from 30 to 60 minutes every day for these things, for about twenty days now. I can't go on like this. I want to continue to use Linux, but I need help to understand exactly what's happening, and how to fix it for good as soon as possible. Thanks in advance, seriously, for any feedback (*), I'll collect and publish here, as a separate “solution” page, any useful tip I get.

(*) if you want me to run specific tests or provide more system info, just ask. Also, I will try to follow discussions online about this, but please keep in mind that the best way to be sure that I read your suggestions and to share them with all other readers of this page is to put them here as comments.