Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

10 Things Apple Did To Make Mac OS X Faster 375

Posted by CowboyNeal
from the road-to-betterment dept.
bariswheel writes "This kernelthread article seeks to investigate further to the inner core of OS X and the improvements therein. The subtopics are the following: BootCache, Kernel Extensions Cache, Hot File Clustering, Working Set Detection, On-the-fly Defragmentation, Prebinding, Helping Developers Create Code Faster, Helping Developers Create Faster Code, Journaling in HFS Plus, and Instant-on."
This discussion has been archived. No new comments can be posted.

10 Things Apple Did To Make Mac OS X Faster

Comments Filter:
  • I love OS X (Score:5, Interesting)

    by BoomerSooner (308737) on Saturday March 25, 2006 @09:16AM (#14993395) Homepage Journal
    OS X is the only OS I"ve ever installed that subsequent versions speed up my older computers. Amazing... I'm waiting for an Apple Intel Tower and I'll retire my G4 Tower.

    Damn ADC interface.. what am i to do with this big ass cinema display?!?!!?
    • by IHSW (960644) on Saturday March 25, 2006 @09:25AM (#14993414)
      Clearly you've never installed Windows 2000 over Windows ME.
      • Re:I love OS X (Score:5, Insightful)

        by kc0re (739168) on Saturday March 25, 2006 @09:35AM (#14993436) Journal
        Um.. ANYTHING installed over Windows ME is an improvement. Hell, Going backwards would be an improvement.
        • by dreemernj (859414) on Saturday March 25, 2006 @10:18AM (#14993551) Homepage Journal
          Indeed. Windows ME was a crime against humanity.
    • Linux (Score:5, Interesting)

      by metamatic (202216) on Saturday March 25, 2006 @09:48AM (#14993462) Homepage Journal
      Linux gets faster too.

      Kernel 2.4 to 2.6 was a pretty big jump in speed. I just upgraded to the latest KDE and a bunch of other updates, and got another performance jump. Once they shake the bugs out of the Radeon drivers for X.org, I'll get accelerated X, and another big speed boost.

      In fact, of the major OSs, it's pretty much only Windows that keeps getting slower.
      • Re:Linux (Score:3, Insightful)

        Have to agree here - at the same time as I do get more and better applications to play with, the machine actually performs better for each update. The whole last 6 months (one release period) for Gnome has seen a lot of focus on improving speed and it shows when comparing for instance Breezy and Dapper.

        OTOH, I guess MS is driving the hardware industry forward too, which is not all bad.
      • Kernel 2.4 to 2.6 was a pretty big jump in speed. I just upgraded to the latest KDE and a bunch of other updates, and got another performance jump. Once they shake the bugs out of the Radeon drivers for X.org, I'll get accelerated X, and another big speed boost.

        Note that the KDE has put work into faster startup/loading, and this is not a Linux thing.

      • Re:Linux (Score:5, Informative)

        by mclaincausey (777353) on Saturday March 25, 2006 @11:50AM (#14993874) Homepage
        Kernel 2.4 to 2.6 was a pretty big jump in speed.
        That's true, but don't expect another jump of that relative magnitude anytime soon. The 2.6 introduced a new scheduling algorithm that boosted speed and concurrency significantly. When your scheduler goes from an O(n) to an O(1) algorithm, implements CPU affinity, and eliminates lock contention for the run queue, the speed boost is significant. I guess there could be filesystem improvements or paging improvements in the pipeline that could provide significant speed boosts, but I kind of doubt they would be as critical as that brilliant new scheduling algorithm.

        OTOH the inter-version speed boosts in OS X have been due to more subtle tweakage, except perhaps for speed boosts related to launchd, and have been more incremental in nature than the anomalous 2.4-2.6 improvement.

        I guess my point is that the 2.4-2.6 improvement is more of a leap than it is a trend, where OS X's improvements have been less revolutionary and more evolutionary. I hope Linux continues to improve in performance, but it's very possibly going to suffer from bloat down the road that could offset some performance improvements. It's unrealistic to expect the performance improvements to continue along the lines of 2.4-2.6, in any case. OS X is still lagging in performance, so it's even more imperative that it continue its trend. Hopefully the researchers at Apple will soon find a revolutionary improvement on the order of the 2.6 scheduler to catch up a bit.

    • Re:I love OS X (Score:5, Informative)

      by v1 (525388) on Saturday March 25, 2006 @11:01AM (#14993675) Homepage Journal
      Damn ADC interface.. what am i to do with this big ass cinema display?!?!!?

      As you may or may not be aware, the ADC connection provides a DVI signal, USB port, AND power. The display has no power pack, and gets its juice from the computer. If you have only a DVI port, you will require a rather large adapter. It's not so much an adapter as it is a "power injector" that injects power into the cable whilst converting it from DVI+USB to ADC. This takes the form of what looks like a very large white power brick from a powerbook.

      They are unfortunately rather expensive. ($150?) You can get them from Apple, or from Dr Bott.

      The other answer is of course to find a graphics artist or developer that does not already have a second display, and sell it to them. Odds are very hight that if you bring the display over and let them "test drive" it for even five minutes they'll buy it immediately.
    • Re:I love OS X (Score:3, Informative)

      Quote:
      Damn ADC interface.. what am i to do with this big ass cinema display?!?!!?

      Keep it. All you need is an ADC to DVI Adapter [compusa.com]

      I have a 5 year old 17" and a 4 year old 20" Cinema ADC display that look just as good as the day I got them.
  • by rg3 (858575) on Saturday March 25, 2006 @09:21AM (#14993402) Homepage
  • Obvious Dupe (Score:5, Insightful)

    by Anonymous Coward on Saturday March 25, 2006 @09:25AM (#14993413)
    The website even has a link to the old slashdot story: http://developers.slashdot.org/developers/04/06/03 /130214.shtml [slashdot.org]
    • Re:Obvious Dupe (Score:3, Interesting)

      by Goo.cc (687626)
      I'll tell you what happened: somebody submitted this old story to Digg and a Digg reader then submitted it here. (I have noticed that many stories appear at Digg first, which is why I read Slashdot once a day now, and Digg now has Slashdot's old spot on my link toolbar in Firefox.)
  • Pointless Effects (Score:4, Insightful)

    by Anonymous Coward on Saturday March 25, 2006 @09:30AM (#14993419)
    If Apple is going to bother optimizing other stuff on the OS, they should at least give you a way to turn off some of the extras when it comes to the GUI.

    I don't need high resoution icons, drop shadows, dragging window effects, minimize effects...etc. In windows land, you can turn most of these eyecandy effects off and performance is greatly improved. You'd think that Apple would have considered this when releasing a computer with 256mb of ram on the base model (G4 mac mini). I love the computer, but it is SLOW.
    • by ioErr (691174) on Saturday March 25, 2006 @09:53AM (#14993479)
      I don't need high resoution icons
      Those you can turn off. Just set the Finder to use 32x32 pixel icons. icns resources generally contain several versions of an icon, 128x128, 48x48, 32x32, and 16x16 pixels. If you use one of the small versions then the system won't waste time scaling the icon, or memory holding a big bitmap. I doubt you'll see much gain though.

      But it's not in Apple's interest to let you turn off too much of the eye-candy. They want Mac OS to have its distinct look, and they are are in the business of trying to sell you newer hardware.
    • Re:Pointless Effects (Score:5, Informative)

      by Rocketship Underpant (804162) on Saturday March 25, 2006 @10:09AM (#14993528)
      Unlike Windows, OS X is composited on the video hardware, and the effort to produce most of those visual effects is done by the GPU, hardware that would otherwise be idle. Turning them off wouldn't give you any speed gains on the CPU, from what I understand.
      • Yeah, well tell that to my B&W with an unaccelerated ATI Rage 128. It would be nice if there was a way to just turn off all eye candy on this thing. I don't need transparency on the dock, drop shadows, genie minimize, etc...
    • by St. Arbirix (218306) <matthew.townsend@NOSPAm.gmail.com> on Saturday March 25, 2006 @10:16AM (#14993545) Homepage Journal
      In Windows land, the desktop eye-candy isn't hardware accelerated. Turning off a lot of the OSX eye-candy would only serve to idle the graphics hardware rather than making the computer respond any faster.

      Hopefully, Microsoft's Aero will prove this point.
      • Re:Pointless Effects (Score:2, Informative)

        by Anonymous Coward
        > In Windows land, the desktop eye-candy isn't hardware accelerated.

        This is wrong. What little Windows eyecandy there is (menu fade-in etc) is accelerated on virtually every video card.

        What you people are ignoring is that the basic OSX eyecandy (genie effect, etc) is 100% done on the CPU on older Macs. The advanced eyecandy (expose effect, etc) just doesn't happen on those machines.
    • by pohl (872) * on Saturday March 25, 2006 @10:23AM (#14993561) Homepage
      those GUI 'extras' are not what is making a 256MB G4 slow. Rather, it would be the fact that the machine is going to be constantly swapping out to disk. Get more RAM.
    • there are Haxies that allow you to do all of that.
  • Panther to Tiger? (Score:5, Interesting)

    by fa_king (952336) on Saturday March 25, 2006 @09:44AM (#14993452)
    I updated from Panther(10.3) to Tiger(10.4) and my machine seemed slower. I decided to do a fresh install, and things improved, as always the fresh install is better than an update.

    I still think that Panther was running a bit faster tahn Tiger, maybe it is the widgets..........
    silly widgets!

    This was all done on a PowerBook G4(TiBook).
    • Re:Panther to Tiger? (Score:4, Interesting)

      by boomerny (670029) on Saturday March 25, 2006 @09:58AM (#14993491)
      It's not just you, I've heard many reports of Tiger being slower on older machines. Because of that, I'm staying with 10.3 on my Pismo until it is replaced as it runs acceptably fast in nearly every situation (I don't do video or gaming or any other CPU/GPU intensive stuff). I don't miss Widgets or any of the other new eye-candy type stuff in 10.4. BTW, the replacement for Pismo will be in the form of the second-gen Macbook Pro with a Merom-based core duo being released in Q3 (fingers X'ed), and will hopefully last 6 years like my Pismo has.
      • Re:Panther to Tiger? (Score:5, Informative)

        by CottonEyedJoe (177704) on Saturday March 25, 2006 @10:31AM (#14993581) Journal
        I have two slower Macs, A G3 500 MHz iBook running 10.4.5 and a Blue and White G3 400 MHz running 10.3.9. The iBook is a bit faster for everyday tasks and that hasnt always been the case (the tower has a faster bus, faster graphics card, faster disk etc...). One thing you MUST do on older macs running Tiger OR Panther is upgade your RAM to a reasonable level, which usually means maxing it out. Even then I had to turn off dashboard on the iBook (I dont really use it on any of my macs anyway).

        Both machines are still great for general desktop work and light development. I bumped the iBook to Tiger (OSX) to get Tiger (Java), and I havent really bothered to upgrade the tower because I havent had the time and its not a pressing concern for me. But given the results on the iBook, I dont expect a performance hit when I do upgrade.
      • My very old G4 tower has been upgraded from OS 9 through the current release updates (just updated it). The only problem I ever had was upgrading to Tiger, which required a fresh install.

        It gets used very little because I have not had time to install everything the way I like it. The Tiger upgrade is not reccomended on a critical machine.

    • I turn off Dashboard. I don't think a single widget is worth 20-30 MB when it only does one tiny task and isn't as quickly killable when I'm done with that task, unlike a regular program. Take that 20-30MB per widget and multiply it by ten or twenty and you have a massive resource hog.
      • Which widgets are you using? I have 3 widgets open on dashboard and 2 instaces of two of them givng me a total of 5 widgets to be displayed. When idle each one consumes (roundng up) about 7 MB of physical memory. That leaves me with a max use of 35 MB of memory for ALL of the widgets. Hardly a 20-30 per each widget.
      • Re:Panther to Tiger? (Score:3, Interesting)

        by shmlco (594907)
        As has been reported before, each widget includes whatever shared files are needed to make it run and the size of those files is reported along with that of the base widget. But since they're shared, each additional widget typically only uses a small amount of additional memory. Most well designed widgets also sleep when not being used (offscreen) so they're not hogging the processor either.

        So is the Dashboard a "massive resource hog"? I think not...

    • The main speed improvement from Panther to Tiger was for G3 machines because the parts of the system they could not transition to be Universal or Intel had to be optimised for the G3 (that's what code Rosetta runs). Before I got my new iBook G4 1.33, I had an iBook G3 700 and there was noticiable improvement. Most sites claimed that G3 systems performed 30% faster.

      This also makes sense because I'm going to bet that if Leopard even supports G3 machines at all it will be the last version. Apple recently

    • Hm, I had an iBook G4 @ 800 for over a year, then bought a Mac mini @ 1420. Both have more than 512MB memory.

      The mini (with Tiger) feels a little bit slower overall than the iBook, except for applications. There the CPU makes a small difference (such as: starting Thunderbird).

      It's weird. I'd also expect that Tiger should be faster than Panther, but it seems like they made it slower.
    • Re:Panther to Tiger? (Score:3, Interesting)

      by JulesLt (909417)
      My understanding is it's the RAM i.e. Tiger IS faster on older hardware, but also more memory hungry.

      What with slower HD on iBooks I presume paging memory to disk can cause a significant hit (Widgets take up barely any CPU but can consume quite a bit of memory).
    • Re:Panther to Tiger? (Score:4, Informative)

      by prockcore (543967) on Saturday March 25, 2006 @01:28PM (#14994222)

      I still think that Panther was running a bit faster tahn Tiger, maybe it is the widgets..........
      silly widgets!


      No, it's spotlight. My iBook would thrash like crazy until I disabled spotlight. Of course now I can't search at all.

      Apple should've made spotlight optional.
  • by laurensv (601085) on Saturday March 25, 2006 @10:05AM (#14993509) Homepage
    somebody made a list about ten things that don't work as well as they should (and as a mac admin I agree) : Ten More Things I Hate About Mac OS X [informit.com]
    • I would rate those top ten lists +1 insightful, -3 irrirating. They're one of those pages that has ONE screenful of content and a "next" button at the bottom, so you have to click to another page every 20 seconds. Whee, fun. Almost always a result of someone trying to get you to refresh banners 3 times a minute to get them more ad hits.
      • They're one of those pages that has ONE screenful of content and a "next" button at the bottom, so you have to click to another page every 20 seconds.

        Or you could click on the "Print" link to get a printer-friendly single-page layout.

      • Or you could click the print button .. but I agree .. this kind of design is stupid and I love using adblock to defeat their evil plans to show me ads.
    • Erm, do you agree with this one [informit.com]? (Granted, this is something from the original article and not "Ten More...", but still.) I suppose if he's asking for admin login prompts whenever there's a permissions issue, that's not a bad idea, but he almost seems to be recommending the painfully insane "run everyone as admin" option.
  • Ironic? (Score:5, Funny)

    by MoogMan (442253) on Saturday March 25, 2006 @10:33AM (#14993591)
    Consider the following a sampling of such optimizations, in no particular order

    I'm somewhat concerned that an optimisation geek did not order his data set.
  • It used to be that OSX had a brain-dead ABI that resulted in not all of the PPC registers being used 'properly', in order to maintain a 68k 'compatability' mode ..

    Has this been changed? Are all the registers of the PPC being used properly now? Is the PC register actually being used as a program counter, rather than one of the generic 32-bit registers?
  • by mjm1231 (751545) on Saturday March 25, 2006 @11:43AM (#14993844)
    I know that NetWare (at least as far back as 5.1) used a different method to avoid the need for defragmentation, which basically just allowed the disk to read the sectors based on the physical location on the disk rather than the order they were needed. The thing was, without defrag tools, you couldn't even check to see if fragmentation was a problem. The same problem exists with *nix filesystems right now. Everyone says you don't need to defrag, but there's no easy way for the average admin to verify this.

    The HFS plus approach seems like a good idea, but I'm wondering if there is a performance cost, both in CPU cycles and drive wear and tear. It also looks to me like the system could be defragging files that are already contiguous, but I may be wrong. Given that modern journaling filesystems (supposedly) are not likely to become fragmented in the first place, is this feature worth it?

    • XFS supports defragmentation. In the xfsdump package there is a tool called "xfs_fsr", which works great on running systems.

      On all my servers I use XFS on all the non-os partitions. Same on my desktops. I run xfs_fsr nightly out of cron, and everything stays very fast. Even with the dozens of VMWare disk images I have all over the place.
    • I don't know about yours, but my fsck regularly tells me non-contiguity of a given file system.
  • While Windows gradually slows down with Service Packs, and completely grinds to a hault on all but fairly new systems with new versions, OS X actually manages to speed up due to developer optomization. Good strategy...
  • Journalling makes files accesses slower. The only time it speeds anything is in the error case of unsafe reboots (crashes). And I get those so rarely, I'm sure that I come out way behind on performance due to journalling.
  • by Malor (3658) on Saturday March 25, 2006 @02:22PM (#14994411) Journal
    Doesn't Apple use gcc?

    I know gcc itself improved a very great deal over the same time period, and I have always assumed that the speed gains were (largely? mostly?) due to that, rather than wondrous new algorithms on Apple's part.

    Linux and KDE sped up a lot too, over the same timeframe.
    • Apple and GCC (Score:5, Informative)

      by hotsauce (514237) on Saturday March 25, 2006 @04:27PM (#14994899)
      Apple has been contibuting to GCC [apple.com] too you know. Objective C support, PowerPC optimizations, etc (scroll down to optimizations). Another advantage of OSS. The improvements on their hardware were due to their own efforts, and much more radical than the increases to x86 Linux.

      Unfortunately, on the Intel side, Apple is going with the Intel compiler, probably because it's faster than GCC Intel. No OSS. But maybe Apple doesn't need to contribute to that because Intel will keep doing good work.
  • by HTH NE1 (675604) on Saturday March 25, 2006 @06:45PM (#14995508)
    Helping Developers Create Code Faster,
    Helping Developers Create Faster Code


    I can think of a few other useful permutations:

    Helping Create Code Developers Faster
    Helping Create Faster Code Developers
    Helping Code Create Developers Faster
    Helping Code Create Faster Developers
    Helping Faster Developers Create Code
    Helping Faster Code Developers Create
    Helping Faster Code Create Developers
    Developers Helping Code Create Faster
    Developers Helping Create Faster Code
    Developers Helping Code Create Faster
    Developers Helping Faster Code Create
    Developers Create Helping Code Faster
    Developers Create Faster Helping Code
    Create Helping Code Developers Faster
    Create Developers Helping Faster Code
    Create Code Helping Developers Faster
    Create Code Helping Faster Developers
    Create Code Faster, Helping Developers
    Create Faster, Helping Developers Code
    Create Faster Developers, Helping Code
    Create Faster Code, Helping Developers
    Code Helping Developers Create Faster
    Code Helping Create Developers Faster
    Code Helping Create Faster Developers
    Code Helping Faster Developers Create
    Code Developers Helping Create Faster
    Code Developers Create Faster Helping
    Code-Faster Developers Helping Create
    Faster-Helping Developers Create Code
    Faster-Helping Code Create Developers
    Faster Developers Helping Create Code
    Faster Developers Helping Code Create
    Faster Developers Create Helping Code
    Faster Code Helping Developers Create
    Faster Code Helping Create Developers
    Faster Code Developers Helping Create

    Choose a research topic! Lucrative grants to be won! (Topics involving procreation by/of developers expected to go quickly.)

"When the going gets tough, the tough get empirical." -- Jon Carroll

Working...