Making Operating Systems Faster
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."
You've got to be kidding me. XP is CRAZY slower than 2k. I suppose thats what happens when you add a Microsoft+ package to Windows 2000. Wanna make it faster? Disable all the useless services and shut off the ugly eye candy. *sigh*.
adventure-today.com
Hard Drive
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.
Life is the leading cause of death in America.
Same thing with XP... I get a much better performance if I shut off all the fancy transparency effects. Sure, they look cool.. but are they really necessary?
OS designers shoudl also cut down with bloatware and trying to 'integrate' everything into the OS...
I haven't looked into it for a while (mod me down for being uncertain if you like), but I seem to recall that there were serious leaps and bounds still left in OSX performance, with a change to the ABI register use, potentially, in the future
; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
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.
I'm in the hole of the broadband donut.
I wish these were incorporated into linux more. I don't care what anyone says, comparing windows and linux on the same machine has always shown to ME that windows seems a lot faster. Applications take longer to load in linux. Mozilla for example, takes longer to load than it did in windows on the same computer. Other applications that I can't compare directly seem to take a while when they're just small apps.
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.
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"
Problem with this is that it's things the user needs to do. The article is about what apple did that is independant of the user.
Evolution or ID?
Anyway... You are completely correct but...
/usr, /opt partition, whichever one you have all of your applications installed on. Copy the hard drive to the ram drive at bootup. DD can do it quickly if you just zap the whole partition across. I think there are mount options to tell the Linux filesystem buffer not to cache a particular filesystem.
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.
Government of the people, by corporate executives, for corporate profits.
Early versions of some film scanner software that I worked on were terribly slow. A quick profile of the running code showed that about 10% of the time was spent in a little piece of code called TtoF(). This code parsed and coverted text into floats.
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.
Two wrongs don't make a right, but three lefts do.
So, I know what you mean. And I've even noticed the same thing when trying ootb installs of mandrake 7,8,9,10, redhat 6,7 etc. on my 1600 athlon xp.
Until I tried SuSE 9.1. I'm not a fan of kde but this distro looks really nice and it feels snappy in a way I've never known from linux in the half dozen or so commercial distros I've tried over the years. Between the snappy desktop, the eye candy and yast, it sets a REALLY high bar for every other desktop. You might give it a try and see if you don't agree.
And no, I don't work for novell...
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.
-Rob
Marriage doesn't have to suck!
You missed an issue.
c) Have a shutdown script that will always run on shutdown. From what I understand, Windows has more then one shutdown (there's at least 2: the "slow" shutdown you get from Start -> Shutdown, and the "fast" shutdown you get from pushing the soft power button on your case).
DJ kRYPT's Free MP3s!
...apparently not as well as Apple. Gee, didn't see that coming.
Every revision of OS X has run (or at least "felt") faster than its predecessor did on the same hardware. Panther will run fine on a five year-old G4, assuming you've added RAM to what the machine shipped with in 1999.
You absolutely cannot say that about Windows. Nobody sane would even consider trying to run XP on a PC they bought new in 1999. One of Microsoft's growing problems is that people are getting off the upgrade treadmill-- they've begun to REFUSE to upgrade to version n+1 because they know their computer will feel slower than it does with version n.
I've got a 733MHz G4 running OS X 10.2.8, and a home built (with *quality* parts) Athlon XP 2600 system running XP, and there's no comparison... the XP box feels terribly slower, even heavily optimized with all the XP eye candy shit turned off, unneeded services disabled and spyware, etc ruthlessly prevented/exterminated. OS X running on a machine with 1/3 of the horsepower thoroughly embarasses it in terms of user-perceived speed. That's just plain pathetic.
I worked there for years, through the development of Win95 Osr2, Win98, Win98 SE, Win ME (but that one wasn't my fault), WIn 2k, Win XP and into the first little bit of Longhorn... Longhorn will be as slow as or slower than the current XP systems, even when properly configured. We don't call it "Bloatware" for nothing. One way to make it faster is to cut out all the crap. If someone wants to install Solitaire, FANTASTIC, let them choose to do so, but for crap sake, DON'T install it by default... Fix the File Tables, Fat32 was good, NTFS is better, they say the new schema for Longhorn will be better, if they can ever get it working... If a user wants the colors and blinking things, then let them set it that way...don't make that the default... Just because a processor can hit 3.2 GHz DOES NOT mean you have to use every Hz of speed... Just because Hard Disks are not in the hundreds of GB, does not mean you must fill it up with an OS... Just because memory is "cheep" and some systems can handle 2 gig or more, does not mean you must use the whole thing to manage your OS... The system requirements for Longhorn are rediculous at best...when Longhorn ships, Linux will finally get the break it needs!
--E--
This is technically offtopic, but often much of the 'slowness' we still experience on our computers which people often blame on their 'operating system' isn't really down to the operating system (i.e. kernel), but more the higher level stuff that runs on top of it. It seems that lots of efforts are going into making operating systems more efficient, since there's lots of interest in this area, but that efficiency is more than lost further up. (Not that I should be complaining, since I'm just another person not doing anything about it.)
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, 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.
Filesystem journaling does not make the filesystem faster, and it's silly to suggest that it does.
In fact, journaled filesystems are generally noticeably (one might say significantly) slower than non-journaled ones.
The only 'performance' gain one gets from journaling is after an unclean dismount (a crash or power outage). The system will boot up much quicker, but that's it.
I know this is an unpopular view (hence AC), but Windows XP is very fast for a lot of things.
:(
One of the reasons I dont use Linux as my desktop is the office packages. Under windows, I can type ctrl+alt+w (My shortcut for MS Word) and it starts INSTANTLY! Not 5 or 10 seconds, like OpenOffice. Call it bloated or whatever, but it works the way I like.
For example, run any program and look in %windir%\Prefetch - and try run it again and look at the speed difference.
There was a discussion about this on the kernel development mailing list a couple of months ago I think, and the approach used by windows was considered.
I also use Maya a lot, and other operating systems it has been ported to (I havent used IRIX) have problems
with various graphics cards and/or sound. OS X has worse performance than windows for the same price for running Maya as a workstation or a rendernode.
All the eyecandy and other crap is very easy to turn off... things work a lot better on a wider variety of hardware than any other OS. Linux has a lot of driver support, but nowhere near that of Windows still
While I agree with you, there's a very good reason Microsoft won't change their defaults: because its more important for Microsoft to get version differentiation / recognition by the unwashed masses than it is to get best performance. You set a novice computer user in front of Windows XP (with the fugly XP shell) and Windows 2000, and John Doe *immediately* knows which one is XP. So when John Doe is ordering a machine from Dell, or standing in Best Buy or CompUSA, he knows he's getting XP (which he wants because that's what the 12 year old neighbor kid said he should get and that's what everyone else uses).
:-)
That, and if they made the eyecandy off by default, it would never get turned on by 95% of the users, and so Microsoft's investment in that development is wasted (you could argue its wasted now, and I wouldn't disagree
As it stands, the people who know enough about their computers can find magazine articles & online guides to tweak for performance, and those that don't probably don't know the speed they are missing anyway. And if its getting too slow, they just buy a new computer! Everybody (== Microsoft) wins!
Then avoid bloated multi-library dependent C++ GUIs.
To me the ultimate example of this is Damnsmall Linux, nothing but lean and mean apps!
If a computer is 10x more powerful then it was 7 years ago it should be doing 10x the amount of work, instead we get more and more eye candy.
Application memory space during runtime? 15MB.
I remember when Borland spend a lot of effort to optimize their Quattro Pro spreadsheet so that it was monitoring it's own memory usage down to 512 byte increments. It would start discarding portions of itself that it no longer needed.
Those days are over, for sure.
"Sure, they look cool.. but are they really necessary?"
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?"
Do like IBM did with OS/2's big revision Warp. All the changes to Warp slowed performance down in general so IBM used smoke and mirrors. They worked on speeding up screen I/O as much as possible. End users raved about how fast Warp was. Looks faster, feels faster, but any program that required much prcessing was getting slower and slower. But joe user thought he had a speed deamon becasue the screen painted real fast.
1. turn on apple II series box.
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)
stuff |
"do you want the 'pretty version'? Be warned that it may affect system performance."
That's going to scare away non-technical users though.
MS, love 'em or hate 'em, is doing it right: appeal to the largest market segment with the default settings. Those people who want to improve performance are still be able to, but need to make the adjustments post-install.
Tuus crepidae innexilis sunt.
Apple computers do not hibernate. Rather, when they "sleep", enough devices (in particular, the dynamic RAM) are kept alive (at the cost of some battery life, if the computer is running on battery power). Consequently, upon wakeup, the user perceives instant-on behavior: a very desirable effect.
I don't know how they can be proud of not hibernating. Windows can sleep OR hibernate. Although being a Mac household, hibernation is one reason I MIGHT consider windows for my next laptop. The ability to get back to all you have left around with your laptop hibernating for a few days unplugged and still have full battery power when you open it up is VERY nice.
I'm surprised by how much people are ignoring this. Every single time Apple releases a new version of MacOS X they cut out a bunch of Aqua special effects. The most notable thing was when they took the striping away from the dock, which made that critical UI element pop up much faster. These aren't really optimizations so much as "taking away features to make it go faster."
For a comparison you can run X with fvwm in (not in rootless mode) on MacOS X and see the difference. Or turn on terminal transparency and wiggle the terminal and watch the whole computer slow to a crawl.
That is the real reason OS X seems to go faster on slower computers with each release. On faster computers, I forget what it's called, but they pipe Aqua through the video card to take away the overhead, which is a major optimization. I don't think, by comparison, that any of the other effects they mention in the article count for much in terms of between-release improvements.
Upstairs Dog, Downstairs People.
I'm using mandrake 10. I decided on this distro because it's the easiest I've found and I wanted to introduce myself with my hands held. I've heard of prelinking and I've googled for it but I haven't found anything that can easily explain how it works and how it's used. Most stuff I've read on it just says to "use it." If anyone knows much about it or can point me and I'm sure many other people in its path that would be appriciated.
I have always found Mandrake to be very slow. I started with Mandrake 7 or so. I recently tried the previous (9.x) release before 10 and still found it to be unbearably slow.
That being said, I still say that that is the best distro for someone to start with. I have since moved on to Gentoo. My linux install blows away anything else I have used in respect to speed however I still use XP quite a bit (though not as much since i got by powerbook.) I would suggest putting a new partition on your machine and giving gentoo a shot. The install is a little difficult but you'll learn so much about how to administer your machine through the install.
I'm sure mandrake could be sped up a little but I'm not the person to ask. I think a lot of it it boils down to getting the correct drivers for your hardware, especially your video card and getting read of services that you don't need or want.
Not everything is analogous to cars. Car analogies rarely work.
I've used both it and 2K on several machines, and XP boots up ~30 seconds faster
Microsoft tends to spend more time figuring out ways to trick their users into *thinking* that things are faster even though it's actually taking as long, if not longer than previous versions. In this case, you've been tricked. Microsoft moved more stuff after the user is logged on. In other words, your system is still doing all of the things it used to do, plus probably more, it's just that you think it's done.
This is the difference between reality and perception. Microsoft tries very hard to address a user's perception, even at the cost of making reality slower. As is, in the above cited example, Microsoft gave you a login screen, whereby, you can do very little to nothing, but you're satisified thinking it's done, in spite of the fact (reality) that it's not. This means, attempting to do things right after the login screen will more than likely, take much longer than expected. They further hide this fact by making application startup and caching part of the OS boot sequence. Non-cached application startup, following initial login, will more than likely be painfully slow for non-trvial applications, at least until XP actually finishes it's startup.
Good or bad, you decide.
Whenever you install new software, you have to wait while the system "optimizes" it, which in fact means checking for applications that need their prebinding redone. On a 700MHz imac - less than 2 years old - this sometimes takes 15 minutes or more. Since I bought it, I've wasted hours, if not days, waiting for installations to complete because of this, which is far longer (and more frustrating) than the total time saved starting programs.
I don't understand why it doesn't just leave the prebinding to be done the first time the program is run.
Apple removed striping from everywhere in Panther. Quite a bit of it was replaced by brushed-metal. Even so, all it is doing is replacing one bitmap with another. The only possible gain is if they do not need to use alpha for transparency. Yet not all of this is by "removing" stuff. Quite a bit of tweaking is being done to speed up the OS, the most recent software update resulted in quite a few reports of faster system operation, and there was no discernable change in the featureset or operation of the UI.
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.
I tried every decent and legal way I could think of to resolve the issue w/the business before I rented the chicken suit
Eh.. I'd argue differently.
IMHO, the next major revolution in OS design (and performance) will be from an exokernel 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 at thefreedictionary.com
# fuser -v
#
One thing I just remembered that annoys me about the Linux dists that I have used, is that all the startup scripts are executed in sequence, even if they aren't dependent on one another. On my Amiga, I remember I used to have the startup script execute all sorts of things asyncronously in parallel, so that the CPU never idled while waiting on disk.
Maybe Unix-like OSes should do that. I mean, there's no reason /etc/init.d/postfix and /etc/init.d/apache can't run at the same time, so that if one of 'em blocks on some I/O (disk or network or whatever) then the CPU(s) can work on the other one. That would ultimately result in a faster boot.
Sure, there are some dependencies (I guess you want network interfaces started up before servers start binding to ports, for example) but there are ways of dealing with that. Hm.. maybe there's already a tool that sort of handles the complexity of dependencies and can execute things in parallel when appropriate: make. Hmm... Anyone already doing this?
As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
Every time I work on a system for my clients, I turn most all of it off. Before I leave, I make them try it. Without exception, I always hear "Wow, what did you do? It seems 3X faster!" I explain it to them and then ask "Do you want me to put it back the way it was?" The answer is always NO!
And that's why KDE and Gnome are slow. They aren't slow, they just feel slow.
Try LinuxPPC. Gnome 2.6 really flies on LinuxPPC. Especially compared to Panther. My entire desktop is noticably more responsive under Linux than it is under Panther. On both my Dual 1.25ghz G4 and my crappy 400mhz Pismo Powerbook.
My current OS X 10.3 install, plus some additional apps, plus some source tarballs of projects, plus the Xcode enviroment, plus an archive copy of 10.2, is using 10.61 GB of space. The lproj files are not very large. While it is true that you can save space by not installing all the language support, it isn't 10GB of space. Languages can selected/deselected during the initial install.
The poster is correct though, that the granularity of control over install is much rougher than with Gentoo or Debian. Given the target audiences, this shouldn't be surprising.
for a real lean install, take a look at this! http://www.litepc.com/products.html
I need a wheelchair van for my son. Help me get the word out. https://www.gofundme.com/wheelchair-van-for-jj
RAM is cheaper than programmer time. Particularly since the developers don't have to buy the RAM...
Sad, but true. Though, there really is no excuse for for the iTouch problem, then again there is no reason to spend 6 months trying to fit a word processor into 640K (like they had to in the "old days" my prof likes to talk about so much.) There really must be a happy medium, and I think most apps and OS's are at it.
The snow doesn't give a soft white damn whom it touches. -- ee cummings