10 Things Apple Did To Make Mac OS X Faster 375
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."
Dupe several years later? (Score:5, Informative)
Re:Call me weird, but... (Score:4, Informative)
Ten things they should fix (Score:5, Informative)
Re:Call me weird, but... (Score:4, Informative)
Um... VMS is definitely NOT "some form of *nix".
Re:Pointless Effects (Score:5, Informative)
Re:Call me weird, but... (Score:5, Informative)
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.
Re:I love OS X (Score:5, Informative)
Re:Call me weird, but... (Score:5, Informative)
OS 9 seemed faster because the first iteration of OS X, which people tended to run on the same hardware, was dog slow.
Re:Call me weird, but... (Score:5, Informative)
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?
Re:Panther to Tiger? (Score:5, Informative)
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.
Re:Call me weird, but... (Score:1, Informative)
Re:I love OS X (Score:3, Informative)
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.
That's the number of the app instance - and is quite high in this case :-)
Re:I love OS X (Score:5, Informative)
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:Pointless Effects (Score:2, Informative)
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.
Re:I love OS X (Score:2, Informative)
Win2k: 0
WinME: Countless
People put down ME and praise 2k because I'm not alone in this experience. Sure, there's bells and whistles and things, but this alone should convince anyone.
Well, duh! (Score:5, Informative)
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...
Now you're just displaying your ignorance
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
Re:Linux (Score:5, Informative)
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:3, Informative)
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.
Troooooooolllllll (Score:1, Informative)
Re:Call me weird, but... (Score:3, Informative)
Re:Panther to Tiger? (Score:4, 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.
Re:Panther to Tiger? (Score:5, Informative)
Re:Whats up with the ABI change? (Score:2, Informative)
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).
Re:No more proprietary hacks? (Score:3, Informative)
Undocumented Number 11 (Score:2, Informative)
Get it
Use it
Good
( P.S. Caps Lock would have been autopilot for COOL, but the lameness filter caught me
Re:What about OSes with GNOME? (Score:1, Informative)
You can argue about the legality of using an MP3 encoder/decoder on Linux all day long, but the fact is that if you spend all of your time trying to get your system to work with the files and software you want, it's NOT productive, in any meaning of the word.
Never had a problem with it. I use xmms. But in ubuntu, it's as easy as getting DivX support in windows. Actually, with mplayer, I have observed that it comes with more codecs than windows ships with. It plays quicktime movies right out of the box. I also have heard good words about VLC but haven't found the time to give it a chance. About the legality: patents are a stupid way to make money on software. I could agree with a better patent law with a short period of applicability, but as it is today, it is just stupid. It promotes parasite tactics and discraces us computer scientists.
As I said, I'm not qualified to argue about OSX vs Ubuntu, but I am more productive in linux than windows as a computer science student myself. OSX could be better, but I'll stick with Free over shiny wherever possible, thank you very much!
Apple and GCC (Score:5, Informative)
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.
Re:20 Things Apple Still Needs To Do (Score:1, Informative)
* SMB can't network share anything but user directory (what about mounted disk images, CD's, single folders?)
I believe you can change this with NetInfo Manager
GUI: Red "close" button has inconsistent behavior: hide (Mail)/close (Safari)/quit app (iPhoto)
The way this is supposed to work is that the Window (Cocoa Document Object) is closed, but the application stays open. Safari and Mail behave properly for me; I agree iPhoto's behavior is annoying.
If "Show Item Info" is selected for the Desktop view, the volume icons only update their free space at restart (or when Finder crashes).
This (as well as the bit about the size of all documents in a directory) has to do with the way faux-unix filesystem behavior is done in OS X; the total size of the contents of a directory cannot be determined except by traversing the directory tree and adding them up, which can take quite a bit of time. Also, getting info from multiple items works as desired for me since at least 10.2, but I know that an earlier version would open several Get Info windows.
Inconsistent installation of applications. Some are dragged to the apps folder, others have an installer. Many things added with an installer have no uninstaller anywhere, so you're stuck with them (how do I cleanly get rid of X11? and XCode? Without using the command prompt?). Also, when removing an application it is difficult to remove its traces (in the Library folder and others).
For the most part, only sucky applications use installers for precisely that reason. Some things like XCode have a legitimate need to put things in various places in /usr or /Library, but if they are well behaved they're easy to get rid of. X11 lives in /usr/X11{R6} and /etc/X11{R6}, while most of the XCode stuff lives in /Developer. The command-line tools (gcc) and the system headers (/usr/include) are harder to get rid of, and you probably shouldn't anyway.
There is no easy way to categorize applications. Everything is bundled up together in the "Applications" folder. You can add subfolders manually, but that makes updating and installing new applications more complicated.
Well, there's the Dock, and there's the distinction between /Applications, ~/Applications, and /Network/Applications, but I suppose those don't really solve your problem. I can't really say I feel for you, though, since I start every Application that doesn't reside in the Dock with open(1) -a, which saves time and brainspace.
Many cross-platform apps such as Firefox, Azureus, aMule have an extremely sluggish GUI, and are far slower than their Windows equivalents. MacMAME runs intensive games at slideshow pace, compared to full framerate on MAME on a Win2K machine. (The Mac has higher system specs than the Windows machines I'm comparing with.)With the exception of Firefox (which sucks on Mac, use OmniWeb or Camino if you don't like Safari) and aMule (which I've never used), these (and NeoOffice/J) are all Java apps, which can't compare with natively compiled code for performance. Well-coded java will run decently on OS X provided you have enough memory, but bloatware like NeoOffice/J are basically hopeless.
StuffIt expander will choke on RAR files containing Hebrew file names. Says "Invalid File Format".
Remember what I said above about sucky apps? Stuffit is one of the worst offenders. My advice is to not use them for anything but .sit files, since there's nothing else that can open them. I use unzip for zips, tar for tar files, and UnRaRX for rars.
ME = Evil (Score:1, Informative)
however, don't bash the system restore point utility, sure it created a backup of a lot of system files for emergency rollbacks, but i don't know of anyone who complained about it in win2000sp4 or winXP. and as for the disk recovery, you can get a copy of win2000 with the same ability, or winXP has it on all the versions (i believe).
and as for windows ME eating souls, yes it does. it likes a bit of ketchup to go along, they are kindof dry anymore.
Re:Well, duh! (Score:1, Informative)
SMP is a hell of a lot trickier, especially given Apple's graphics architecture and its penchant for global variables... but Apple was a lot further along this path than people realize. And they would have gotten even further, except that Steve/Avi started blocking development of OS 9 APIs.
And yes, OS X is way, way more reliable. Any time I go back to OS 9, and am forced to reboot due to a crash, I ponder why on earth we Mac users lived with this for all those years.
But the 'everything is a file' mantra... Uggh. This, and the idea of seperating different parts of the OS into different processes, is a big part of the problem. On the original Mac, you say "MoveTo(10,10);" to move the pen, and it does a couple if dispatches, stores the new values of x and y, and returns. Under OS X, this involves... oh hell, frankly I have no idea because you can't just step into another process and follow the work. I'm relatively certain it involves dispatching a message to another process. What I really want to do is write a small benchmark and use Shark to tell you where the time is being spent - it would be very illustrative... LineTo would be an even better example, because under OS 9, it could actually be graphically accelerated to draw the line. Under OS X, the line is drawn to an off-screen buffer first. Then a custom region of "dirty bits" is updated so that, later down the line, the blit that copies the off-screen bits onscreen can copy only the bits of the actual line to the screen. Even ScrollBits, which was perfect for acceleration under 9, is performed by the CPU under X, with the GPU doing only the bitcopy from main RAM to graphics RAM.
You say a modern OS "needs to do more work". Sure, but not the absurd amount of work that OS X actually does.
As for HLock, OS X doesn't need to do any more work. newsflash: under OS X the only thing this call needs to do is set a bit so that future callers of HGetState get the bit back. It doesn't need to go to a seperate process, doesn't need to deal with MP. And unlike OS 9, it doesn't need to deal with ROM handles or 24-bit heaps. It could be implemented in two instructions if they were willing to allow a little memory wastage, or about ten if they didn't. Or they could hire bozos and implement it as a dictionary-of-locked handles, which seems to be what they did, given its slow perf.
Look, let me put it another way: run OS 9 under OS X through the Classic emulation layer. Then write a program which does nothing but open a window and draw a bunch of stuff, maybe call HLock a few hundred times. Then time the exact same thing as a "native" OS X app. Then explain to me why the OS 9 version was so much faster.
(Annoyingly, I'm writing this on my personal Mac, which is Intel-based, and Apple's upgrade of my old machine neglected to copy any of the built-in dev tools to the new Mac, so I can't report real numbers to make my case. Or run Classic anymore - Grrrr.)
You are right that the switch to OS X was brave. well-conceived? Maybe. Well executed? No way.
The mouse pointer (Score:4, Informative)
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.
Re:Call me weird, but... (Score:3, Informative)
Re:Panther to Tiger? (Score:1, Informative)
Re:Lack of hibernate hurts (Score:5, 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 [72.14.203.104]) 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.