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."
Check out www.blackviper.com, it's one of the better sites dedicated to tuning and increasing performance of Windows 2000/XP
1) Don't install so much crap on your computer. 5 megapixel photos set as wallpaper along with Real Player, Gator Spyware Crap, Quicktime Task, HP scanner registration reminder sofware, webshots, Norton anything, MS office bar etc running on startup will make your nice shiny new computer run like an arthritic snail on sleeping tablets.
2) Turn off some of the eyecandy. All those fades and whooshes and stuff don't actually do anything useful, they just consume CPU cycles and waste your time.
3) Use Ad Aware and SpyBot regularly to keep scumware out of your computer. I had to clean up a PC this morning which had stopped working because the BASTARDS at NewDotNet wrote some software which fucked the TCP/IP stack backwards.
4) Defrag regularly and run MSCONFIG to check what crap is sneaking back on to your Startup scripts.
BTW, Windows 3.1 sitting on MSDOS 6.2 ran like shit of a stick on my old P133. I wonder if/how it would run on a modern system?
Sorry, but my karma just ran over your dogma.
I dunno about all that but OS X doesn't seem slow at all to me.
... but I do have to admit that in all my computing experiences, OSX seems to be the one OS that is more 'acceptably mediocre', performance wise, than any other.
... that there are 'unutilized registers' in the PPC architecture when it is running OSX.
...
Try running LinuxPPC on your mac some day, and you will see a huge difference in general snappiness.
I'm not saying OSX is un-usably slow, or even slow at all - heck my Rev. A tiBook, beaten and aged, is still all the computer I need, and I am very productive with it
On the register side of things, I can't for the life of me remember the full details, but I believe that the ABI for OSX only uses a sub-set of the PPC's full register set, and thus this means more swaps in/out
This is separate from AltiVec, which is an instruction set, not just a register setup
; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
The number one thing they should do IMHO is reduce overhead. Using Microsoft Windows as an example, windows 98 has much less overhead than 2k, which in turn has much less than XP. A lot of it is eye-candy, which is all well and good, but those should be options that are OFF by default. XP differs from previous versions because it uses a 'shell' based gui (similar to KDE / GNOME, etc), which, while nice, is going to cause some system slowdown. Using the 'explorer' shell, which is heavily intergrated into the Windows OS, is the fastest, and should be the default. Then if people want to change it to look pretty they can, by sacrificing speed (in slower machines).
Stop adding services / features that are on by default, and you'll see a huge improvement in speed.
Only one optimisation presented is related to hardware drivers, and it is cache of what kernel extensions will probably be loaded. Most of the optimisations (basically lots of caching and dynamic defragmentation) could be implemented in Linux, regardless of the amount of supported hardware.
You have an interesting definition of "justify". Besides, letting the VM do it's own thing with the buffer-cache does *much* better than stuffing RAM full of some random portion of disk that you think is 'important'.
Doesn't most unixes extensive use of cache really eliminate the benefits of that approach? I know Mac OS X will use almost all of however much physical RAM it's given.
mbbac
I agree whole-heartedly. If Windows came installed 'Bare-Bones', there'd be a lot less annoyed people out there (but I'm sure we'd all miss Clippy)....however, that's one of the issues - who do you decide what should be an inherent part of the OS, and what shouldn't. Although you won't find anybody on slashdot propounding the beauty of having IE tied into Explorer, I know lots of AverageJoes who like the fact that they can just have that address bar on the TaskBar, and type a webaddress into it or a file path. Maybe "Where The Line Should Be Drawn" can be future Ask Slashdot article....
My Favourite Meme
Has anyone tried using a RAMdisk as their OS drive?
Many moons ago, it was possible to make a RAM disk on a Mac, install an OS on it, and (warm) boot from it. It would remain in memory and work perfectly as long as the computer wasn't shut down-- it could only be restarted. I tried it once or twice just to check it out, and the computer booted and ran like lightning compared to the normal hard drive boot.
One of the utility suites back then (Central Point Utilities?) even had a feature where the machine would boot from a RAM disk with the utils on it, to fix the occasional really serious Mac problem.
Booting from a RAM disk stopped being possible after Apple made a hardware change in newer Macs that had the side-effect of making the RAM non-persistent through warm-reboots (i.e., your RAM disk would go bye-bye). I forget exactly when it happened... perhaps after the first generation of Power Macs, when they went from using NuBus to using PCI?
Here's another interesting fact. The Macintosh Classic, released in 1990, had System 6.0.8 (IIRC) burned into its ROM-- you could boot it disklessly from the OS in ROM by holding down Command-Option-O-X at startup. Nobody really knows what that feature was intended for.
~Philly
I know it was a joke, but apple's GUI is rendered using the video card's processing power, not your CPU's. So such fancy effects are using cycles that would otherwise be idle, giving no performance hit at all, and making it look fricking cool at the same time.
Here's a "mini-HOWTO" that I found via google. I didn't read the whole thing, but it looks informative. Wikipedia's Ramdisk entry had links to two stripped down knoppix distros that could be loaded into a ramdisk - Damn Small Linux (50 mb), and Feather Linux (64 mb). I've never done anything with ramdisks (I'm a linux newbie, too) but they do sound pretty neat.
Sorry!
You are not alone. This is not normal. None of this is normal.
Most systems nowadays use a DMA-type system (Direct Memory Access) which streams data directly from disk to memory without involving the CPU much at all. The real slowdown is not the CPU cycles getting wasted, it's that the CPU can't work on the particular data you need until it is loaded. During the DMA loading process your CPU could be using tons of cycles on other tasks that are not waiting on data.
Smart read-ahead precaching and buffering attempts to ensure that your processes will not be data-starved. Yes, buffering can fall behind but overall it does considerably speed up a system.
Sapere aude!
The only thing that's even remotely like what you're talking about is the Mach-O ABI and how it accesses global addresses.
Mach-O the ABI (not to be confused with Mach-O the executable format, which is totally different) accesses global addresses via PC-relative addressing. This design decision was made back in the NeXT days, and made a lot of sense at the time. Unfortunately, the PowerPC doesn't have any support for PC-relative addressing, so the only way to do it is to use several instructions and induce a pipeline stall in the process. Depending on how a program is written, this problem can mean up to a 10% speed hit.
That is the only brain-dead decision in the ABI that I'm aware of. It certainly makes good use of all registers, intelligently defines leaf procedures, and in general makes full use of the PPC architecture other than that one problem.
Altivec includes both instructions and processors. That is one of the things that makes Altivec really cool, is that it has a shitload of vector registers that are totally separate from the other registers, and don't interfere in any way.
Mod down posts with a "Free Mac Mini/iPod" sig, they're spam!
"If that's what you mean by "refresh", then that's actually Windows Explorer (which the desktop is an instance of) crashing followed by a background process realizing it died and starting it back up."
Um, no. XP gives you an 'Explorer just crashed' message when it tanks. Heh my coworker next to me is actually having this 'explorer likes to crash regularly' problem. When you lose your taskbar and all your icons in the system tray disappear, then you know Explorer has gone south and restarted.
Windows does have a 'refresh and rebuild the desktop' function. It's the same one they use to put your desktop icons back when you change video modes. (I.e. playing a game.) That's exactly what the person is describing.
My ibook can "sleep" for several days. Also I really like the fact that I can close it move around the house and my ssh sessions are still up when i open it up again.
Your ad here ask me how!
Something I like about KDE (and Gnome may do this too--I've just never used it) in this area over Windows is their performance/eye candy slider. You don't have to go through finding which settings are the eye candy and turning them off one by one. KDE has a slider that you can drag toward features or performance, and it shows below that the settings that are being turned on or off.
We may experience some slight turbulence and then...explode. -Capt. Mal Reynolds
It's not exactly "booting", but if you take a sleeping Apple notebook and wake it up, it'll usually be ready to use before you even get the lid all the way open. Re-establishing a wireless connection takes a few seconds, but local functionality all comes back on instantly.
Well, all I know is that my own experience is different from yours. Not to mention, my experience is generally regarded as recreatable. That is, while I'm "logged in", my machine is technically worthless until it's finished starting up the system and doing all the things that Linux makes you do up front. In other words, when I have my desktop on Linux, I can immediately start using it. Under 2K and especailly XP, I have to wait, wait, wait before the system is responsive to my applicatin requests. That's the way MS designed their system and that's the way everyone experiences it. I guess this goes back to the perception versus reality difference. Like I said, it's up to you to decide if it's good or bad. I say, "indifferent". You seem to say, "good". Others say, "bad".
It's worth noting, if nothing more than FYI points, there are ways to drastically speed up Linux's start up times. They range from using LinuxBios to changing out the init scripts for scripts which are are to run highly parallel. Last I heard, the init scripts alone, take off 10s of seconds. It's just that people would rather have UNIX and Linux compatibility.
At any rate, I'm really not sure what you mean by, "USABILITY" being faster. If you mean the speed of the overall system as it relates to user responsiveness, then I suspect you have something wrong with your Linux configuration. Usabiity between the two systems should be equally high. Personally, my usability goes way down on Windows systems because it lacks so many of the powerful X features, out of the box anyways. But, I recognize that I'm not the typical win/linux user.
Lastly, I must say that I find it interesting that you find XP to be faster than 2k. XP is widely regarded as being slower (yes, with everything turned off) than 2k, as far as the user interface is concerned.
Some of these differences might center in how we're using our systems. My uses tend to be more of a workstation/desktop while you're may center completely around a MS-desktop solution.
There are easier ways to enable these "features" than creating a ton of hoops for BOTH sides of users.
What fucking hoops?
Right-click My Computer->Properties->Advanced->Settings button.
Choose either "Best Performance" or "Best Appearance." Or check each option individually. What a non-issue.
If this was KDE, someone would have already answered with this, but because it's Windows, everyone just nods with the rest of the flock, "Baa, baa, yes, there are hoops to jump through, baa."
Speaking of KDE, talk about fucking hoops. You've got a completely horrible control center, with three different areas for changing the looks of things like window styles, widget styles, and so on. Why the hell isn't that all integrated into one configuration dialog? Oh, I forgot, ease-of-use is a criticism we only reserve for non-issues on the Windows platform like checking a radio button to get rid of a blue theme.
"Sufferin' succotash."