Slashdot Mirror


10 Things Apple Did To Make Mac OS X Faster

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

26 of 375 comments (clear)

  1. Dupe several years later? by rg3 · · Score: 5, Informative
  2. Re:Call me weird, but... by ThisNukes4u · · Score: 3, Informative

    VMS is not even remotely related to Unix. See History of Unix and VMS wikipedia articles.

    --
    thisnukes4u.net
  3. Ten things they should fix by laurensv · · Score: 5, Informative

    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

  4. Re:Call me weird, but... by technothrasher · · Score: 3, Informative
    Even MS is originally based on VMS, so in fact, everything is based on some form of *nix.

    Um... VMS is definitely NOT "some form of *nix".

  5. Re:Pointless Effects by Rocketship+Underpant · · Score: 5, Informative

    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.

    --
    He who lights his taper at mine, receives light without darkening me.
  6. Re:Call me weird, but... by Haeleth · · Score: 5, Informative

    OS 9 screamed in comparison to OS X. It had its problems, sure, but at the time it was the only mainstream OS that was not built on technology besides itself.

    It was also the only mainstream OS that could not handle filenames more than 31 letters long, the only mainstream OS that didn't have protected memory, and the only mainstream OS that didn't have any form of preemptive multitasking.

    The first of these is the most ironic. Back in 1999, Mac users were still ridiculing "Micros~1", while in fact it was their operating system, not Microsoft's, which could not handle adequately long filenames!

    But it was the second and third, the lack of basic features essential for the stability of modern desktop applications, which led to it being such an unreliable system. No surprise that Apple were so keen to ditch the whole crufty thing in favour of the modern platform that became OS X. OS 9 was totally failing to salvage their rapidly declining reputation. OS X was their salvation.

    So, yes, OS 9 screamed in comparison to OS X. But so did its unfortunate users... loudly and regularly.

  7. Re:I love OS X by Wingsy · · Score: 5, Informative

    And if you bitch about having to buy an adapter to drive your Cinema with your new Mac, they may give you a 99 dollar discount right over the phone. They did for me when I bought my Quad.

    --
    If I didn't have absolutely NOTHING to do, I wouldn't be here.
  8. Re:Call me weird, but... by Deep+Fried+Geekboy · · Score: 5, Informative

    Anyone who spent any time trying to debug extension conflicts did not shed a tear for OS 9.

    OS 9 seemed faster because the first iteration of OS X, which people tended to run on the same hardware, was dog slow.

    --

    I'm not wrong. You haven't thought about it hard enough.

  9. Re:Call me weird, but... by Anonymous Coward · · Score: 5, Informative

    "Even MS is originally based on VMS, so in fact, everything is based on some form of *nix."

    For the short of memory...

    There were a LOT of operating systems before *nix. One of the main creaters of OSses was Digital Equipment Corporation. They had an OS for each of their different computer systems (PDP-1 through PDP-20, also known as DECsystem-20). All these OSses had a different architecture, because they wer built for different purposes. However, DEC standardised the CLI on these OSses. The CLI was called DCL (Digital Command Language).

    ATT (Bell Labs) were using DEC systems with when they decided to create their own OS. IIRC they used a PDP-7, and later PDP-11's running RSX-11. So, instead of everything being based on *nix, it's the other way around. All the *nixes are "inspired" by the other OSses at the time, in particular RSX-11 and DCL.

    VMS (later OpenVMS) was the world's first commercial computer using a virtual memory system. That's why it's called VMS. It was meant as a successor to RSX-11, and it ran on VAX computers (Virtual Address eXtention). The chief VMS architect Dave Cutler was hired by Microsoft to help create Windows NT. Windows NT later became W2K, WXP etc.

    So, also Windows is NOT based on *nix.

    As far as I can tell, actually only Linux is based on *nix.
    Anybody know any other OS that is based on or inspired by Unix?

  10. Re:Panther to Tiger? by CottonEyedJoe · · Score: 5, Informative

    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.

  11. Re:I love OS X by grahamlee · · Score: 2, Informative
    /WebObjects/AppleStore.woa/6164000/wo/zf5gxeMdPL 3E3KJeQG51ahhwsC4/1.0.19.1.0.8.25.7.11.0.3

    WebObjects URLs with a "/wo/" are session-based; in fact that " zf5gxeMdPL3E3KJeQG51ahhwsC4" stuff is the session ID so you can't go pasting them in places and expecting people to be able to use the URL. If they've got a "/wa/" then they're so-called direct action links, which are fine and can be transferred.

    6164000

    That's the number of the app instance - and is quite high in this case :-)

  12. Re:I love OS X by v1 · · Score: 5, Informative

    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.

    --
    I work for the Department of Redundancy Department.
  13. Re:Pointless Effects by Anonymous Coward · · Score: 2, Informative

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

  14. Well, duh! by Space+cowboy · · Score: 5, Informative
    Quoth the parent:
    For all the talk about the speed of OS X, Apple has never addressed the most obvious issue: on a machine that can run either OS 9 or OS X, OS 9 is very much faster.
    OS9 did a lot less than OSX, which is why it was faster. OSX is a *lot* more reliable. Examples:
    • OS9 didn't have pre-emptive multitasking, so one bug somewhere in one program could bring the system to its knees. I saw that happen far too many times...
    • OS9 didn't have memory protection, so if a pointer went outside the current app's address space, it could quite happily scribble random data all over another application.
    • ... I could go on...

    Before OSX, the mac had the reputation of the machine that crashed all the time. By comparison, Windows was actually pretty reliable (this was before all the spyware/malware/crap that affects it recently, remember). Linux was best, of course...

    They took an OS written from the ground up in the early 80s to be graphical, and replaced it with an OS written the 70s to be textual, with the GUI glued on top of it
    Now you're just displaying your ignorance
    • The mac UI isn't the same as most unix ones - it's not X.
    • Even if it were X, for "glued on top", you really need to use "seamlessly integrated". The 'everything is a file' mantra of unix design actually works really well for X.
    • The core of the OS is a micro-kernel message-passing system (mach), which was developed between 1985 and 1994
    • ... etc....

    And then even worse, the people who wrote Carbon, the MacOS backward-compatibility layer, had no idea how to write it to be fast - simple calls like HLock which used to be two instructions on the original 128K Mac are now thousands of cycles under OS X
    newsflash:when you need to do more work because you're in a far-more-capable and complex environment, it can take more machine-instructions to perform the task. This is just griping - the world has moved on from buggy, insecure, crappy-old OS9. Move with it.

    They didn't throw any babies away, they did what they needed to do (ditch the abortion that was OS9) and move onto a new platform which provided the security, flexibility, and reliability that any modern OS provides. A brave decision, under the circumstances, and one well-conceived and executed.

    Simon
    --
    Physicists get Hadrons!
  15. Re:Linux by mclaincausey · · Score: 5, Informative
    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.

    --
    (%i1) factor(777353);
    (%o1) 777353
  16. Re:I love OS X by joetheappleguy · · Score: 2, 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

    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.
  17. Re:Call me weird, but... by shawnce · · Score: 2, Informative

    Review this graphical history of unix.

  18. Re:Panther to Tiger? by prockcore · · Score: 3, Informative


    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.

  19. Re:Panther to Tiger? by KAMiKAZOW · · Score: 4, Informative

    Get EasyFind from http://www.devon-technologies.com/products/freewar e/applications.php. It works without Spotlight.

  20. Re:Whats up with the ABI change? by Anonymous Coward · · Score: 2, Informative

    First off, the PowerPC does not have a PC register.

    Mac OS X never did anything with its ABI for 68k compatbility. Mac OS X's ABI differed from OS 9's ABI in that OS X did not dedicate the R2 register to TOC register. Without doing anything special this resulted in a slight slow down in relocatable code, and a slight increase in leaf function code that was register limited (less frame spills). That would have hurt on Mac OS 9 (where everything is relocatable, and in one big address space), but was not a big deal on OS 9 where all applications are located at address 0 and are non-relocatable.

    Additionally, if you really care you can ignore ABI pretty blatantly so long as none of the functions are exposed, or you provide thunk entry points. You could setup R2 based entry points, maintain your R2 pointer, and then have wrapper entry points that setup R2. That results in using exactly the same code sequence as OS 9, except the code that sets up the TVector in OS 9 is now in the wrapper entry point (and I mean basically instruction identical).

  21. Re:No more proprietary hacks? by EggyToast · · Score: 2, Informative

    Dropped. The last few revisions of PowerMacs don't have ADC ports, and the G5-styled Cinema Displays don't use ADC either. It's been that way for over a year now, I believe. Mostly, I think, because they realized there were lots of DVI monitors out there that weren't Apple that cost less and people had to buy adapters for. They figured "ah hell, it's cheaper for us to just use DVI anyway."

  22. Undocumented Number 11 by VxJasonxV · · Score: 2, Informative

    QUICKSILVER

    Get it
    Use it
    Good

    ( P.S. Caps Lock would have been autopilot for COOL, but the lameness filter caught me :( )

  23. Apple and GCC by hotsauce · · Score: 4, Informative

    Apple has been contibuting to GCC 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.

  24. The mouse pointer by Foerstner · · Score: 4, Informative

    ...in OS X uses a sharper acceleration curve than on Windows. Nudge the mouse, and the pointer moves a couple of pixels. Jerk it the same distance, and it'll fly across a hi-def Cinema display. It can actually move much faster than the Windows pointer.

    It's a matter of re-learning your hand-eye-mouse coordination. If the USB Overdrive behavior were the default, millions of graphic artists, and anyone who needs fine control, would cry out in anguish.

    --
    The US free market: two halves of a government-granted duopoly are free to set the market price.
  25. Re:Call me weird, but... by Squozen · · Score: 2, Informative

    Nope, OS 9 used cooperative multitasking, not pre-emptive.

  26. Re:Lack of hibernate hurts by dragonman97 · · Score: 4, Informative

    I don't know why people try to defend Apple on this particular design decision. There's absolutely no reason why hibernation shouldn't be included in OS X.

    It could be that it's because hiberation actually does exist in Mac OS X. It's just not a well known fact. OS X 10.4's "Safe Sleep" (Google cache) saves the active memory to disk when a Mac [laptop] goes to sleep...lest the power get interrupted. If one is so inclined, they can activate it, and even choose to use it by default. I've enabled it on my Mini, and it definitely works.

    However, if you're not a Mac user, you may not appreciate how good the normal "Sleep" mode is. Unlike Windows, a Mac which has been put to sleep will resume almost immediately, and be instantly usable. My iBook can stay 'asleep' in my briefcase for ages, with very little battery consumption, and as soon as I open the lid, I am good to go. This impresses me more than words can say.