Slashdot Log In
Making Operating Systems Faster
Posted by
michael
on Thu Jun 03, 2004 09:30 AM
from the pinstriping-adds-extra-torque dept.
from the pinstriping-adds-extra-torque dept.
mbrowling writes "In an article over at kernelthread.com Amit Singh discusses 'Ten Things Apple Did To Make Mac OS X Faster'. The theme seems to be that since you won't run into 'earth-shattering algorithmic breakthroughs' in every OS releases, what're you gonna do to bump your performance numbers higher? Although the example used is OS X, the article points out that Windows uses the same approach."
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
#1 thing Apple should do... (Score:4, Funny)
Re:#1 thing Apple should do... (Score:4, Interesting)
OS designers shoudl also cut down with bloatware and trying to 'integrate' everything into the OS...
Parent
Re:#1 thing Apple should do... (Score:5, Interesting)
Ugh I hate this question. "Is it really necessary?"... is the type of question you can ask if you really want to make anything go away. "Is a >500mhz processor really necessary? Is a color monitor really necessary? Is being connected to the net 24/7 really necessary? Is a color printer really necessary when B&W is cheaper?" Who really cares so long as you can choose?
I'll answer your question, though: The more your UI gives you, the better reflexes you can build while using your machine. Have you ever reacted to a screen refresh? (Particularly in the olden days when the CPU had to fight harder...) Ever notice change in window focus simply by spotting the change in titlebar color? Etc.
I have no problem with people turning the fancy stuff off to boost performance, but the "is it really necessary" argument does not apply. The question is really "Do I want it?"
Parent
Re:#1 thing Apple should do... (Score:4, Informative)
Parent
Re:#1 thing Apple should do... (Score:5, Insightful)
I'm sure there are some consumers who buy windows based on other criteria, but the vast majority of windows purchases are as a consequence of compatibility. If the actual statistics showed only 99% of retail windows purchases were as a result of pre-installation, that's about 0.999% less than I would have expected.
$.02
Parent
Re:#1 thing Apple should do... (Score:4, Insightful)
Let me guess, you don't sell OS's right? To move software, you have to have all the pretty stuff that makes it look nice ON by default. Because that's what the general population cares about. They'll look at it and say "Wow, that's ugly, what a crappy OS."
When it's pretty, *you* will say "Wow, that's pretty, but it's slowing it down, let me go into control panels, and registry settings, and god knows what else to tweak my settings while I overclock the damn thing and stick it in a freezer." Then you'll bitch about it on Slashdot. Which is exactly what's supposed to happen.
Because *they* don't know how to turn it on, and *you* do know how to turn it off. So the burden, by default, is on you. It sucks, but hey, what else is new?
Parent
Re:#1 thing Apple should do... (Score:5, Insightful)
There are easier ways to enable these "features" than creating a ton of hoops for BOTH sides of users.
Instead of clicking through a bunch of menus, finding the options, selecting radio buttons, etc, just disable it by default and ask at install/setup time "do you want the 'pretty version'? Be warned that it may affect system performance."
I think that eliminates the problems.
Parent
More uninformed opinion on Slashdot (Score:5, Informative)
What fucking hoops?
Right-click My Computer->Properties->Advanced->Settings button.
Choose either "Best Performance" or "Best Appearance." Or check each option individually. What a non-issue.
If this was KDE, someone would have already answered with this, but because it's Windows, everyone just nods with the rest of the flock, "Baa, baa, yes, there are hoops to jump through, baa."
Speaking of KDE, talk about fucking hoops. You've got a completely horrible control center, with three different areas for changing the looks of things like window styles, widget styles, and so on. Why the hell isn't that all integrated into one configuration dialog? Oh, I forgot, ease-of-use is a criticism we only reserve for non-issues on the Windows platform like checking a radio button to get rid of a blue theme.
Parent
Re:#1 thing Apple should do... (Score:5, Interesting)
The reason X runs slowly compared to Aqua is that Apple optimizes Aqua and allows harware acceleration (Quartz Extreme) and offloads lots of tasks to the GPU. I know of no X windowing system (aside from Apple's own implementation) that does this in OS X.
10.0 and 10.1 were dog-slow. Especially when you had a couple of hundred files in a folder. Jaguar was a huge increase in speed and performance. Quite a bit of that was due to the Quartz Extreme, but even my lowly 500MHz dual-USB iBook saw quite a boost from Jaguar and it was not able to use QE at all. Panther did very little to the iBook, except make it take forever to boot. I need to check on that bootcache issue.
My dual 800MHz Quicksilver is now almost three years old and I am still very happy with its performance. I expected to be wanting to replace it after two years, or after clock speeds have doubled, which is what I did when I used Wintel systems. Instead, I am considering keeping it around for the 10.4 release and at least another year or two. I attribute quite a bit of this to Apple's tweaks and performance enhancements of the OS.
Parent
Re:#1 thing Apple should do... (Score:5, Informative)
Parent
Faster? (Score:4, Interesting)
Re:Faster? (Score:4, Funny)
Phase 2: Re-release same software under a different name or version, only uncrippled. Claim massive performance improvements.
Phase 3: Profit as everyone upgrades/migrates to your product because of the great performance reviews
Hey, it seems to work for AOL, and I bet it could work for Microsoft!
=Smidge=
Parent
Re:Faster? (Score:5, Insightful)
XP is CRAZY slower than 2k.
XP is faster to come up to the desktop. However, it is still busy accessing the hard drive and loading stuff in the background. You still have to wait for the OS to quit loading itself before you can use anything. Microsoft's claim that XP is faster than 2K was based on the time to desktop, apparently not time to usability.
Once loaded, XP has an annoying habit of wanting to refresh the desktop from time to time. That slows things down even more.
Parent
XP and OS X difference (Score:5, Insightful)
I can see how they can write an artice about how apple did this but to claim that Microsoft does it too. I don't see how. Unless Microsoft has improvements but enough of the new things they add slow it down so much more the gain is outweighted by the loss.
Parent
Reduce Bloat (Score:5, Insightful)
why does my 3ghz p4 choke on spellchecking a 50k doc with a 500mb text editor (Word2k3) ?
why does explorer choke on listing 10,000 files ?
why should i ever upgrade my word processing applications ? or can they type for me now ?
bah, innovation is dead, shame
One word: (Score:5, Interesting)
Largest bottleneck in any modern system. If you've never had the opportunity to use a 15krpm (or something faster) system, do it now. It flies... I don't care if it is Windows or what... it doesn't matter when you've got usable bandwidth to the biggest chunk of storage out there.
Re:One word: (Score:5, Funny)
That's two words.
Tom.
Parent
That's 2 words. (Score:5, Interesting)
My 2 words are RAM DRIVE. You think you can't justify 4Gb of RAM? Course you can.
Dedicate 2-3Gb of it to a ram drive and mount it as your root,
The difference in performance can be stunning.
Parent
Re:That's 2 words. (Score:4, Informative)
Parent
Re:One word: (Score:5, Interesting)
Parent
Re:One word: (Score:5, Insightful)
Maybe 10,000 RPM model would make a good boot drive with all of the home folders on the 250GB 7200 RPM drive. Then again, most file access would probably be from the slower drive. Eh.
Parent
Re:One word: (Score:5, Interesting)
5400 RPM 11 ms
7200 RPM 8 ms
10K RPM 5 ms
15K RPM 4 ms
Name another common mechanical device that has nearly tripled in speed in that period. (Source: seagate.com, all numbers are for 3.5" disks)
Parent
Re:One word: (Score:5, Informative)
Most systems nowadays use a DMA-type system (Direct Memory Access) [pcguide.com] which streams data directly from disk to memory without involving the CPU much at all. The real slowdown is not the CPU cycles getting wasted, it's that the CPU can't work on the particular data you need until it is loaded. During the DMA loading process your CPU could be using tons of cycles on other tasks that are not waiting on data.
Smart read-ahead precaching and buffering attempts to ensure that your processes will not be data-starved. Yes, buffering can fall behind but overall it does considerably speed up a system.
Parent
pretty much (Score:4, Insightful)
optimizing Windows 2000/XP (Score:5, Informative)
The Only True Solution (Score:5, Funny)
Speed Improvements on Old Hardware (Score:5, Interesting)
And the fact that I won't be discouraged from keeping 10.3 or 10.4 on that system if the next version doesn't support my hardware through annoying EULAs.
Hello? Linux, are you there? (Score:5, Interesting)
Aparently, windows caches a bunch of stuff and has a bunch other little hacks that allows this. So why can't linux and the kde people do this. They've copied everything else, why not this?
Before you mod me as flamebait or troll, I switched over to linux a while ago and I have no intention on going back to windows. I'm not some ms fanboy bitching about my 10 minute experience with linux. All I'm saying is that here are some points where linux annoys me.
Re:Hello? Linux, are you there? (Score:5, Interesting)
Some efforts have been going into making KDE and KDE applications start up faster. Just the same, if it bothers you that much, don't run KDE or KDE applications. There are many window managers to pick from. Even GTK+ applications tend to load much faster than KDE applications (C versus C++, which is the root of one of the speed issues).
The overall performance of X and Linux will be faster and more responsive as the 2.6 kernel starts to become more common. A typical desktop user should see something like 20%-40% better performance and responsiveness. Even servers typically see 20%-30% improvement in almost all areas. Improvements like these, make applications like apache and samba, which already blew the doors off of Windows, that much more impressive.
Beyond that, start up time, in my mind, is a complete waste of time. Unlike Windows, Linux does not become unstable as you load more applications into memory. Start your computer and all of your applications (memory is cheap; tuning you swappiness as needed) and never have to load them again. I find that application crashes are rare; well, the ones I run. This means, rarely needing to restart your applications. As such, restart time is lost in noise. Furthermore, system stability can easily be measured in months or years as long as you're not running a closed source 3rd party driver (*cough* nvidia, ati).
Long story short, while I hear you and think you have a valid point, the long of it is, it's completely lost in the noise and really doesn't matter.
Parent
Re:Hello? Linux, are you there? (Score:5, Interesting)
The case of mshtml.dll, shdocvw.dll, urlmon.dll are a little different. These are *system DLLs* which can be used by any app, including IE (iexplore.exe) -- and the shell (explorer.exe). Explorer in particular will load urlmon if you visit FTP or WebDAV sites.
IIRC after login on a fresh Windows 2000 install, none of mshtml, shdocvw or urlmon are loaded.
Note that Working Set Detection/Maintenance on Windows can change this over time, but it will do so even for Firefox or any other non-MS app.
Btw, the real reason IE and Office start up quickly is because they are better engineered that the competition -- which is typically cross-platform portable code that is not particularly optimized for Windows. Reducing startup time is not necessarily a black art:
The true measure is how fast the app runs, not how fast it opens.
Not sure what your point is, but Open Office and Mozilla both run slower (_and_ open slower) than Office and IE on comparable hardware. Thankfully, Firefox opens slower than IE, but is almost as fast in use for most common tasks, which lets me use it for day-to-day browsing.
Parent
Some tips on making your computer faster (Score:5, Informative)
2) Turn off some of the eyecandy. All those fades and whooshes and stuff don't actually do anything useful, they just consume CPU cycles and waste your time.
3) Use Ad Aware and SpyBot regularly to keep scumware out of your computer. I had to clean up a PC this morning which had stopped working because the BASTARDS at NewDotNet wrote some software which fucked the TCP/IP stack backwards.
4) Defrag regularly and run MSCONFIG to check what crap is sneaking back on to your Startup scripts.
BTW, Windows 3.1 sitting on MSDOS 6.2 ran like shit of a stick on my old P133. I wonder if/how it would run on a modern system?
Re:Some tips on making your computer faster (Score:5, Informative)
Most of that is handed off to the GPU via Quartz Extreme.
HFS Plus already does that for me.
Parent
Prebinding not all good (Score:5, Interesting)
Apple, and other system vendors need to consider these types of management issues when making a change. Speed improvements are only good if they are "management friendly"
Missing Step (Score:5, Informative)
Stop adding services / features that are on by default, and you'll see a huge improvement in speed.
Re:Missing Step (Score:4, Interesting)
I'll simplify the comparison quiter a bit, but I think Apple decided to trade speed for distinguishing features. It must've worked, because people noticed.
Parent
Apparent Speed (Score:4, Insightful)
Rus
Hard drive alternatives (Score:4, Insightful)
faster use of preference files: TtoF (Score:5, Interesting)
The earliest versions of the software did not convert key preference/calibration/setup files into internally stored numerical values -- instead, anytime the code needed a calibration/setup value, it went to the file, read it, and converted it. Needless to say, that "feature" was quickly corrected.
That's not as bad as an early VAX image processing program that prepped newly allocated file space by setting all the bytes to zero, one byte at a time.
How I would improve the speed of the system... (Score:4, Insightful)
This holds especially for applications, but it definitely applies to operating systems as well. Most modern software is simply bloated beyond belief.
BeOS, by all accounts, is a full-fledged OS, and it takes a Pentium (not Pentium 4, but original Pentium) 15 seconds to boot it, including the GUI. What's up with Windows and OS X taking over a minute on hardware that is several times faster?! On Linux, you could at least skip most of the init stuff and boot in seconds (likely mostly pauses that you have to keep for faulty PC hardware).
Then there's the libraries. glibc is well over 5 megabytes. You are not going to convince me that isn't bloatware. If all that code doesn't eat CPU time, it at least eats memory, which could lead to more swapping. GTK is also typical - ever resize a GTKWindow? It's visibly slow! That doesn't happen to Windows 3.11 on my grandpa's 486! What is that code doing?!
Applications... Firefox is what? 10 megabytes installed size? And that's a light weight browser. What? We need 10 megabytes on top of libc, X, and GTK for parsing a simple markup language and rendering those widgets? Excuse me! Even lynx is hundreds of kilobytes, and it mostly just reads data from a socket, strips the tags, and spits it straight out. What the fsck? Say "OpenOffice.org" or Java and I'll explode.
All we have today is bloatware. I'm *really* tempted to roll my own OS and applications, and I am going to have a shot at it this summer.
Looking elsewhere (Score:5, Interesting)
Try running Windows NT on a new Intel system (say 2-3GHz) for example - it'll run blazingly fast, and with software versions from around the same time it'll still do much of what everyone wants to do - email, web, office, graphics manipulation - but really much faster - things will load practically instantly, rather than after five or ten seconds, and it's all still nice and graphical and everything, just like people want.
Many (but not all) XP machines I meet still seem to take 2-10 seconds even to do basic things such as open My Computer, Internet Explorer or a properties dialog, which one has to wonder is worth the wait for the extra functionality - basically lots of drivers, a couple of extra bundled programs and supported file formats, minor changes to the interface and the other couple of things I'll get flamed for forgetting. Microsoft have no doubt made some improvements to the kernel between releasing NT and releasing XP, but most still seem to be no faster to use, if not slower.
I maintained a school network up until last year which still ran NT and KDE2 on around 2/3 of systems, and then when my replacement went and wiped everything out and replaced it with new machines running XP (with an enormous cost to them), many staff told me that there were lots of things that didn't work any more, and there'd be frequent outages of the entire network.
On a Linux+X system, running X on its own (i.e. just the one program you want) or with a light window manager (fvwm or whatever) is again noticeably faster than running Gnome or KDE. Loading Mozilla or OpenOffice.org means loading the entire frameworks they run in, and often we're loading up a great deal of functionality we don't want in that particular situation. I think a good example is Dillo [dillo.org], a web browser written entirely in C that just does the basics (launches in around 0.7 seconds on this Athlon 700 system, compared to Mozilla, which takes around 5, and Mozilla Firefox, which isn't far off that) - it'd be interesting to see if they could add things like CSS or SSL support and still keep it fast.
Apple II series rules on boot-up times (Score:5, Interesting)
2. Press Ctrl+break (? it's been a looong time since I used one).
3. You're done.
It takes under 2 seconds. Show me a "new" machine (see: desktop,server or notebook from the last 5 years) that actually boots that fast, please! (not just turns on the monitor)
Easy, economic solution (Score:5, Funny)
device=emm386.exe noems
files=40
buffers=10
smartdrv c+ 10000
Prebinding is worst misfeature of MacOS X (Score:5, Interesting)
I don't understand why it doesn't just leave the prebinding to be done the first time the program is run.
Two kinds of speed (Score:5, Insightful)
There are two kinds of speed: things that are fast and things that feel fast.
The article and the comments here on /. are mainly talking about true benchmarkable speed. Things that are fast.
But some apps don't really need to be fast. They just have to feel fast. This holds true for most interactive applications. It's all about psycholigy with this one.
Ever wondered why Windows Explorer builds up its icons from the right bottom to the top left? Doesn't matter in real speed, but it just feels faster. Your brain just isn't used to this flow: usually you read from the top left to the bottom right, or you read from the top right to the bottom left. Your eyes immediately focus on the spot your brain expects the icons to appear. But instead the appear in the opposite corner. By the time your brain figures out it has been tricked, the window is already full of icons.
More tricks: ever wondered why windows wastes memory by trying to have some free memory ready all the time? It makes starting new apps faster. But on average the system is slower.
In the Unix world there is only raw, benchmarkable speed. And that's why KDE and Gnome are slow. They aren't slow, they just feel slow.
Re:Haven't read the article yet .. (Score:5, Informative)
Try running LinuxPPC on your mac some day, and you will see a huge difference in general snappiness.
I'm not saying OSX is un-usably slow, or even slow at all - heck my Rev. A tiBook, beaten and aged, is still all the computer I need, and I am very productive with it
On the register side of things, I can't for the life of me remember the full details, but I believe that the ABI for OSX only uses a sub-set of the PPC's full register set, and thus this means more swaps in/out
This is separate from AltiVec, which is an instruction set, not just a register setup
Parent
Re:Haven't read the article yet .. (Score:5, Informative)
Mach-O the ABI (not to be confused with Mach-O the executable format, which is totally different) accesses global addresses via PC-relative addressing. This design decision was made back in the NeXT days, and made a lot of sense at the time. Unfortunately, the PowerPC doesn't have any support for PC-relative addressing, so the only way to do it is to use several instructions and induce a pipeline stall in the process. Depending on how a program is written, this problem can mean up to a 10% speed hit.
That is the only brain-dead decision in the ABI that I'm aware of. It certainly makes good use of all registers, intelligently defines leaf procedures, and in general makes full use of the PPC architecture other than that one problem.
Altivec includes both instructions and processors. That is one of the things that makes Altivec really cool, is that it has a shitload of vector registers that are totally separate from the other registers, and don't interfere in any way.
Parent
Re:Am I Supposed To Be Impressed By Apple? (Score:5, Informative)
Only one optimisation presented is related to hardware drivers, and it is cache of what kernel extensions will probably be loaded. Most of the optimisations (basically lots of caching and dynamic defragmentation) could be implemented in Linux, regardless of the amount of supported hardware.
Parent
Re:Am I Supposed To Be Impressed By Apple? (Score:5, Interesting)
IMHO, the next major revolution in OS design (and performance) will be from an exokernel [mit.edu] architecture. For those who aren't familiar with them, it's a completely radical and different approach to kernel design, the main idea behind it is seperate protection from management. If you really think about it, who (I use that term loosely) would know better what resources, scheduling, etc an application will need - the kernel, or the application itself.
Traditional kernel design techniques give the (pretty much) the entire management of resources to the kernel itself and hide it behind a HAL (hardware abstraction layer), allowing the application little to zero say in the matter. Exokernels throw that idea out of the window, taking a completely opposite view on the issue. Once you give the power to the application, it opens a whole new world of OS design.
It's really quite interesting, for more information on different kernel designs you can check out the Microkernel entry [thefreedictionary.com] at thefreedictionary.com
Parent
Um, speaking of Mac OS, that's not true for it (Score:5, Insightful)
Don't take my word for it -- take Ars Technica's [arstechnica.com] review of Panther for example:
Parent
Re:Optimize Windows... (Score:5, Funny)
Step 2: There is no step 2!!!
Parent