27 September, 2007

Performance - Win & KDE

People often say Linux has a better performance than Windows. Others disagree, and say the opposite is true. Now in my own experience, it's mostly so that both perform differently. windows boots up faster, in the sense of showing the desktop. But you can't actually USE that desktop, clicking the start menu as soon as it's show can take several minutes. In linux/KDE, it'll show slower if your session is still being restored (that functionality doesn't even exist in Windows) but it won't take minutes.

On the other hand, moving and resizing windows goes faster than in Linux. And have you ever seen your mouse anything else but smooth in Windows? I can stop my mouse for a second even on my 2 ghz/3GB dualcore system in linux - just use konsole with 10 tabs, set it to send the commands to each tab and log in as another user (10 times). That's not even hard - but X chokes on it.

Yet I've changed my opinion in the last few months. I've worked with windows a lot, and the deficiencies are becoming clear. Sure, drawing performance is excellent, and the mouse never stops. But start firefox (and let it restore 5 tabs) and your system becomes unusable for a few seconds (not the least because you just can't minimize the starting firefox, it insists on jumping up and taking focus a few times). It takes 10 minutes at least to boot up and start Outlook and firefox. Pretty painful. But the weirdest thing is that the system can become very slow without any apparent reason. The start menu normally takes it's time for showing submenu's, but sometimes I'll have to wait over a minute; the background doesn't redraw, I can't switch windows. My collegues react pretty dull to these kind of things: "you're trying too much, just wait". Well, I got work to do, I don't want to wait.

So I tried to figure out what's wrong. In linux, I use a cpu meter on my panel. That way, you know what's going on - is an app slow, it's because you're compiling, moron!

But the CPU monitoring stuff on windows is entirely useless. Really, wtf is that thing measuring? It seems like some random value... For example. The following screenshot was made a little over 10 minutes after boot. I started firefox, an explorer window (never showed up) and Outlook. So everything stopped to redraw, most things got slow (but not moving mouse, or even a window). So - there must be something going on, right? Well, no. According to the system monitor, those apps which didn't start nor redraw didn't stop working due to a lack of CPU or memory:

(screenshot taken after minutes of waiting for a response - thought the system was busy...)

As I know a little of scheduler things on linux (having followed the -ck mailinglist for years) I suspect a priority inversion or something like that - an higher priority process wants data from a lower prio process, but by being high prio, it makes the low-prio one unable to actually process and send the data. This seems to happen a lot, and most Windows users here at work are so used to it, they don't even notice it anymore. Not being able to work for up to a minute, many times a day - apparently, you can get used to anything. Boy, I get annoyed if the K-menu takes more than half a second to come up.

Guess there's a good reason why Vista takes up so much resources - these hickups of course seem to be smaller on much stronger hardware. Stronger hardware = more room to fuck up. So instead of fixing the scheduler (and other) problems, they up the minimum requirement... Gotta love those guys.

How much money would companies earn on switching to linux? I mean, JUST decent windowmanagement in windows, I'd spend a million bucks on that if I had it. Windows just take focus while you're working, or they seem to have focus but don't (Outlook asks for my pasword everytime it starts. It shows a little 'type pasword here' window, which seems to have focus, but doesn't). And don't get me started on the alt-tab behaviour - even a tooltip over a button seems to count as a full window in alt-tab, so you can't use that to switch to another application if your mouse is over a button!!! blegh. I don't understand why ppl take that pathetic excuse of an OS seriously, and say 'linux isn't ready for the desktop'. No, WINDOWS isn't ready. Linux was ready years ago, but MS still has a long way to go. The only reason it's being used is because ppl gave up on it - they don't try things more efficiently (alt-tab) because it won't work. Just do everything the slow and painful way. Companies should sue MS for RSI...