Jump to content

[HowTo] Speed up hard disk access


greeze
 Share

133 posts in this topic

Recommended Posts

[search words: speed slow hard disk drive access read write sequential random ultra dma udma]

 

NOTE: This fix only seems to work for Intel chipsets. :rolleyes:

 

To check your hard drive speed, download Xbench from here:

http://www.xbench.com/Xbench_1.2.dmg

And do the disk test. If you're getting speeds around 2-3 Megs/Sec, then the following steps should hopefully fix the problem for you.

 

1) Download AppleIntelPIIXATA.kext from here: (Thank you, madcowsb!)

AppleIntelPIIXATA.kext.zip (Double-click it to extract it.)

 

2) In a terminal:

cd /System/Library/Extensions/

sudo mv AppleIntelPIIXATA.kext AppleIntelPIIXATA.kext.disabled (Just in case you already have this kext installed. If not, you may receive an error. Don't worry about it.)

sudo cp [path to downloaded file]/AppleIntelPIIXATA.kext ./

sudo chown -R root:wheel AppleIntelPIIXATA.kext

 

3) Reboot and enjoy a speed boost.

 

4) If, after a SECOND reboot, the speed boost has disappeared, download IOATAFamily.kext from here: (This comes off of the Darwin 8.01 install CD.)

IOATAFamily.kext.zip (Double-click it to extract it.)

 

5) In a terminal:

cd /System/Library/Extensions/

sudo mv IOATAFamily.kext IOATAFamily.kext.disabled

sudo cp [path to downloaded file]/IOATAFamily.kext ./

sudo chown -R root:wheel IOATAFamily.kext

 

6) Just to be on the safe side, delete the following files (not sure if this is necessary):

/System/Library/Extensions.kextcache

/System/Library/Extensions.mkext

(Don't worry, Tiger will rebuild these files on startup.)

 

7) Reboot.

 

(Remember that your original kext files have been renamed with a ".disabled" extension. If you have any problems, delete the kexts that you added, and rename the originals back to their original filenames.)

 

I think that covers everything.

Link to comment
Share on other sites

ok, this was pissing me off immensely so I dug into it and have a fix (for Intel chipsets anyway). What it comes down to is, as you suspected, you're not running Ultra-DMA but rather PIO because you don't have a proper driver for your ATA chipset. Assuming you have an Intel system, you need to get the AppleIntelPIIXATA driver installed.

 

If you have XCode installed, you can build it yourself; it's included with the Darwin sources. Go to http://www.opensource.apple.com/darwinsour...IXATA-17.tar.gz. Extract the archive and open the "AppleIntelPIIXATA.pbproj" file in XCode and hit Command-B to build it. Now you need to fix the permissions: in a command window cd into Build/Development and type "chown -R root AppleIntelPIIXATA.kext". Copy AppleIntelPIIXATA.kext into your System/Library/Extensions folder, reboot, and enjoy a good 20x HD performance boost (that's what I got anyway). Cut my boot time in half too..

 

Or if you prefer, here's a precompiled tarball. Extract the tar.gz file and copy the kext into /System/Library/Extensions.

AppleIntelPIIXATA.kext.tar.gz

Link to comment
Share on other sites

does this fix work on specifics mobo's only? with Intel Chipsets only?

 

Can't say for sure, but my guess is it oughta work on anything with an Intel chipset (I have an i865pe based MSI Neo2-P board). I wouldn't expect it to work with any non-Intel chipsets (Via, Nvidia, etc.) though there might be a similar driver that'll work for those.

 

Sorry I can't give too many details...I just came across the driver and tried dropping it in and I got lucky...YMMV.

Link to comment
Share on other sites

Or if you prefer, here's a precompiled tarball.  Extract the tar.gz file and copy the kext into /System/Library/Extensions.

 

You, sir, are a rockstar. My xbench disk test went from 6.45 to 27.02.

Sequential score multiplied by 12, Random by 2.

 

Copying a CD image from my Winders drive used to take about 45 minutes. Now less than a minute.

 

I would call that an improvement. :D

 

Thanks a huge ton.

Link to comment
Share on other sites

Maybe I spoke too soon.  After a second reboot, this fix somehow "unapplied" itself. :)  Any suggestions on making it permanent?

 

Hmm, weird. I've rebooted a number of times and it stays loaded. If you run a "kextstat" do you see it in there? Unfortunately I've reached about the end of my Darwin knowledge (it's not yet clear to me how the kernel loads drivers at boot time...I need to do some reading). See anything of interest when you boot with "-v"?

 

Anyway, I just noticed it doesn't load when I tried platform=x86pc (which everyone else says is way faster but my system slows to about half speed when I do that...even compared to the old ATA drivers).

 

I tried mucking with kextcache to see if that had any effect...unfortunately the only effect was it lost all my drivers and panics on boot, so I'll have to try to fix it up tonight after work...shoulda read the manual I guess.

Link to comment
Share on other sites

Hmm, weird.  I've rebooted a number of times and it stays loaded.  If you run a "kextstat" do you see it in there?  Unfortunately I've reached about the end of my Darwin knowledge (it's not yet clear to me how the kernel loads drivers at boot time...I need to do some reading).  See anything of interest when you boot with "-v"?

 

Anyway, I just noticed it doesn't load when I tried platform=x86pc (which everyone else says is way faster but my system slows to about half speed when I do that...even compared to the old ATA drivers).

 

I tried mucking with kextcache to see if that had any effect...unfortunately the only effect was it lost all my drivers and panics on boot, so I'll have to try to fix it up tonight after work...shoulda read the manual I guess.

No, when I run kextstat, it doesn't show up. And I don't run with x86pc either for exactly the same reason. I've tried a "kextcache -e" but apparently there are too many kexts in my Extensions directory. Does anyone know how to add just one kext to the kextcache without rebuilding the whole thing?

 

(Good luck with your kernel panic. :P )

Link to comment
Share on other sites

is the slow access a problem for everyone or just you?

 

 

i cant tell if mine is slow because i am using an old hard drive on a newer computer. just trying to figure whether i should give it a try.

 

also the tutorial i used told me not to install xcode to save room. is there a way that someone could post a ready to install kext for this or am i being a moron?

Link to comment
Share on other sites

No, when I run kextstat, it doesn't show up.  And I don't run with x86pc either for exactly the same reason.  I've tried a "kextcache -e" but apparently there are too many kexts in my Extensions directory.  Does anyone know how to add just one kext to the kextcache without rebuilding the whole thing?

 

(Good luck with your kernel panic. :P )

 

You can check your harddrive speed with Xbench:

http://www.xbench.com/Xbench_1.2.dmg

 

I'm getting about 2.3 megs/sec. In other words, garbage.

 

I think you can install xcode if you have the Tiger install dvd or the dvd image. Mount the image in osx by double-clicking on it, then go hunting for the xcode installer. It's on there somewhere.

Link to comment
Share on other sites

I removed the AppleI386GenericPlatform.kext to force the kernel to look for more specific hardware. The AppleIntelPIIXATA.kext is now loaded and everything is flying.

 

My xbench went from an overall 22 to an overall 35. The disk score went from 5 to 22.

 

Thanks for the find.

Link to comment
Share on other sites

You can check your harddrive speed with Xbench:

http://www.xbench.com/Xbench_1.2.dmg

 

I'm getting about 2.3 megs/sec.  In other words, garbage.

 

I think you can install xcode if you have the Tiger install dvd or the dvd image.  Mount the image in osx by double-clicking on it, then go hunting for the xcode installer.  It's on there somewhere.

Okay, I think I've really figured it out. I removed my /System/Library/Extensions.kextcache file and my /System/Library/Extensions.mkext file and rebooted. This forces OSX to rebuild those files from scratch, which it did, this time including the AppleIntelPIIXATA kext.

 

I haven't rebooted a SECOND time yet, but I'm thinking it'll stick this time. (Edit: Nope, it didn't stick. I have to remove those files everytime before I reboot in order to keep this speed boost. I don't get it.)

 

(Incidentally, removing or moving these files may very well fix your kernel panic issues.)

Link to comment
Share on other sites

Okay, it's finally REALLY fixed now. I think. I hope.

 

The mysterious unloading kext problem was related somehow to the IOATAFamily.kext file. Copying that file off the Darwin install CD fixed the problem for me. See the first post for details.

Link to comment
Share on other sites

Are my results OK or they are slow?:

 

Results 40.79

System Info

Xbench Version 1.2

System Version 10.4.1 (8B1025)

Physical RAM 768 MB

Model ACPI

Drive Type Maxtor 2F040J1

Disk Test 40.79

Sequential 87.73

Uncached Write 72.71 44.64 MB/sec [4K blocks]

Uncached Write 75.66 42.81 MB/sec [256K blocks]

Uncached Read 145.51 42.58 MB/sec [4K blocks]

Uncached Read 85.10 42.77 MB/sec [256K blocks]

Random 26.58

Uncached Write 9.04 0.96 MB/sec [4K blocks]

Uncached Write 68.30 21.87 MB/sec [256K blocks]

Uncached Read 66.03 0.47 MB/sec [4K blocks]

Uncached Read 98.63 18.30 MB/sec [256K blocks]

Link to comment
Share on other sites

Can somebody help me?

I downloaded the already compiled kext, then copyied it to the /System/Library/Extensions folder,

and when i open a terminal window and type: kextload AppleIntelPIIXATA.kext , i get the following error:

kextload: extension /System/Library/Extensions/AppleIntelPIIXATA.kext is not authentic (check ownership and permissions)

 

What should I do??

Can somebody please help me??

 

Thx in advance :(

Link to comment
Share on other sites

make a kextload -t /System/Library/Extensions/AppleIntelPIIXATA.kext

if it only complains about ownership ->

 

check the files owner with "ls -la"

if its not root and group wheel

 

make a "sudo chown -R root:wheel /System/Library/Extensions/AppleIntelPIIXATA.kext"

 

i think/hope that will help

 

and next time copy the stuff as root not as normal user to possibly avoid the error

Link to comment
Share on other sites

Could somebody please send me this IOATAFamily.kext file, i don't have the Darwin install CD :)

You can download the cd image from here: http://www.opendarwin.org/downloads/8.0.1/...nx86-801.iso.gz

 

I'm in XP right now, and I'm afraid to use ultraISO to get the file (should I be worried about any kind of corruption and whatnot?). Later today, when I boot into Tiger, I'll upload that kext for you.

 

Edit: Okay, I uploaded it. See the first post. But you should grab that Darwin image anyway, since it's likely to come in handy in the future.

Link to comment
Share on other sites

If hard disk is not working properly, will it harm the disk itself? I don't care it much for desktop but it does matter for a laptop hard disk. That's why asking.

 

And if we get a good xbench mark, does that mean the disk is working pretty fine and there's no problem? Thx!

Link to comment
Share on other sites

If hard disk is not working properly, will it harm the disk itself? I don't care it much for desktop but it does matter for a laptop hard disk. That's why asking.

 

And if we get a good xbench mark, does that mean the disk is working pretty fine and there's no problem? Thx!

 

I really doubt this can harm your hard drive, but no promises.

 

This fix is for people who are getting xbench disk test scores of around 5 (below 10, anyway). Copying large files takes a REALLY long time, and CPU usage goes way up. If you're not having problems like that, then you probably don't need this fix.

Link to comment
Share on other sites

I really doubt this can harm your hard drive, but no promises.

 

This fix is for people who are getting xbench disk test scores of around 5 (below 10, anyway).  Copying large files takes a REALLY long time, and CPU usage goes way up.  If you're not having problems like that, then you probably don't need this fix.

 

i agreed with greeze, OSX is working flawlessly now. everything run much faster now!

 

Thank greeze!

Link to comment
Share on other sites

I really doubt this can harm your hard drive, but no promises.

 

This fix is for people who are getting xbench disk test scores of around 5 (below 10, anyway).  Copying large files takes a REALLY long time, and CPU usage goes way up.  If you're not having problems like that, then you probably don't need this fix.

 

Thanks greeze for your guide.

 

Please can anyone take a look if i need the fix or not. It should be alright but i'm not sure.

 

Disk Test 37.51

Sequential 45.67

Uncached Write 27.12 16.65 MB/sec [4K blocks]

Uncached Write 66.26 37.49 MB/sec [256K blocks]

Uncached Read 43.03 12.59 MB/sec [4K blocks]

Uncached Read 80.77 40.59 MB/sec [256K blocks]

Random 31.83

Uncached Write 11.25 1.19 MB/sec [4K blocks]

Uncached Write 64.14 20.53 MB/sec [256K blocks]

Uncached Read 84.51 0.60 MB/sec [4K blocks]

Uncached Read 107.12 19.88 MB/sec [256K blocks]

Link to comment
Share on other sites

 Share

×
×
  • Create New...