Slashdot Mirror


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."

27 of 667 comments (clear)

  1. Faster? by AsnFkr · · Score: 4, Interesting

    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*.

  2. One word: by swordboy · · Score: 5, Interesting

    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.
    1. Re:One word: by AviLazar · · Score: 4, Interesting

      Agreed. My Pent III 800 mghtz, SCSI computer (scsi hard drive, dvd player, cd rom) with 512 ram, Hercules 64 Meg video card runs games like Diablo II MUCH MUCH Faster then my 2.2 ghtz laptop with 512 ram, a better video card (Nvida GForce 4 Go card), "faster" IDE dvd rom. A better test. When I upgraded from IDE to SCSI I performed a DOS level copy. The screen would scroll and periodically pause when reading from the IDE drive. The IDE drive was 7600 RPM, the SCSI HD is 15k. When it would write to the SCSI drive, it FLEW! Never once did it pause. WHile scsi is expensive, runs extremely hot (meaning you need more fans), and is fickle at best - when it works it does WONDERS.... For those people who like to have a RAID system - SCSI is still faster as it reads & writes faster... but again it is more expensive (usually about double - triple) -A

      --

      I mod down so you can mod up. Your welcome.
    2. Re:One word: by Smallpond · · Score: 4, Interesting

      Improved relatively little? Average overall seek times are:

      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)

  3. Re:#1 thing Apple should do... by Anonymous Coward · · Score: 4, Interesting

    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...

  4. Haven't read the article yet .. by torpor · · Score: 3, Interesting

    .. but I thought that the primary 'reason' for OSX slowness was that Apples binary format is designed to maintain 'compatability' with the register set of the 68k processors, and in fact they're not using all the PPC registers in a way that is most efficient?

    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. --
  5. Speed Improvements on Old Hardware by Paulrothrock · · Score: 4, Interesting
    I've been using OS X since public beta, and every upgrade has been considerably faster, even on my four-year old G4/400. I expect to be using that machine as a server well into the future, mostly due to the fact that Apple is doing such a good job making operating systems work well on older machines.

    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.
  6. Hello? Linux, are you there? by Stevyn · · Score: 4, Interesting

    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.

    1. Re:Hello? Linux, are you there? by bheer · · Score: 5, Interesting
      -1, Misinformation. Office and IE don't keep "portions" resident in memory in either the DOS TSR sense *or* in the Mozilla Quickstart (or whatever it's called now) sense.

      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:
      [...] Startup time is all about minimizing disk I/O. So analyze your startup code to death: Track every page fault and work to get rid of it. Delay initialization of everything that can be delayed. (The fastest code is code that doesn't run at all.) Take all the functions that are called at startup and put them near each other in memory so you take fewer page faults. Use the /ORDER switch to do this. If you have a large function and only half of it is used at startup, break it into two functions, the part used at startup and the part that isn't. Reorder your data so all the memory used by startup is kept near each other in memory. With CPUs as fast as they are, disk I/O is the limiting factor in app startup. [ link]


      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.
    2. Re:Hello? Linux, are you there? by GooberToo · · Score: 4, Interesting

      KDE apps has down right painful startup times, especially if you don't run KDE. That being said, I find parity in application start ups between the two and generally find Linux to be faster for most everything I do, save only for playing games (like NWN).

      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.

  7. Prebinding not all good by mac-diddy · · Score: 5, Interesting
    Sure, prebinding does speed up loading, but it also breaks everything from tripwire, to backup. Since the file is changed out from under you, all traditional unix tools that use checksums or file size to determine file changes break.

    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"

  8. That's 2 words. by Moderation+abuser · · Score: 5, Interesting

    Anyway... You are completely correct but...

    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, /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.

    The difference in performance can be stunning.

    --
    Government of the people, by corporate executives, for corporate profits.
  9. faster use of preference files: TtoF by G4from128k · · Score: 4, Interesting

    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.
  10. Re:Missing Step by lpangelrob2 · · Score: 3, Interesting
    I'm not sure if one can say on a general level that even the majority of users considers speed to be important. I'll take up OS X because I remember reading a quote on an Apple webpage -- Why did we do it [fancy graphics *everywhere*]? Because we could.

    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.

  11. Opinion from an ex-microsoftie by Efialtis · · Score: 3, Interesting

    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--
  12. Looking elsewhere by aking137 · · Score: 4, Interesting

    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.

  13. FS Journaling by mslinux · · Score: 3, Interesting

    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.

  14. Re:How I would improve the speed of the system... by Ath · · Score: 3, Interesting
    I have a nice utility from Logitech called iTouch. What does it do? It handles key mappings for their keyboard that has some custom key.

    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.

  15. Re:#1 thing Apple should do... by Anonvmous+Coward · · Score: 4, Interesting

    "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?"

  16. OS/2 Warp by ToasterTester · · Score: 3, Interesting

    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.

  17. Apple II series rules on boot-up times by 192939495969798999 · · Score: 4, Interesting

    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 |
  18. Sleep vs Hibernate by Hiroto.+S · · Score: 3, Interesting
    10. Instant-on

    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.

  19. Re:#1 thing Apple should do... by ReciprocityProject · · Score: 3, Interesting

    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.

  20. Re:XP and OS X difference by GooberToo · · Score: 3, Interesting

    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.

  21. Prebinding is worst misfeature of MacOS X by ebcdic · · Score: 4, Interesting

    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.

  22. Re:#1 thing Apple should do... by rworne · · Score: 5, Interesting

    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
  23. Re:Am I Supposed To Be Impressed By Apple? by ktulu1115 · · Score: 4, Interesting

    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 /dev/attention | grep work
    #