Apple OSes and IDE DMA Support? 49
KFox wishes to get to the core of this particular issue: "I just recently purchased an iBook and I have noticed that even in Jaguar, the system gets choppy from disk I/O. It appears that Mac OS 9 and Mac OS X don't support DMA access for hard drives, even if the drives are initialized in a UDMA mode. Wintel has had support in this area for a long time (since Win95b). Has anyone in the Mac world had any experience with DMA support on hard drives? Is it supported on iBooks? If so, which models?"
Drive Setup v1.1 (Score:4, Informative)
Try searching for UDMA Ultra-ATA ATA33/66/100 because DMA doesnt allways show up.
DMA check for your ibook (Score:4, Interesting)
Daemon News [daemonnews.org] has a little section on the iBook and DMA. You can see the Darwin boot sequence by holding down the "v" key at startup. Find the section titled "Further Exploration: Das Boot" in the article above and it will tell you how to view the boot messages and other useful tidbits.
It appears that this revision-A iBook does indeed have DMA enabled for both the hard drive and the CD-ROM drive.
This does not help you enable your own DMA, but do a search on Google for enabling DMA on FreeBSD style systems. You might find something useful.
Re:DMA check for your ibook (Score:2, Informative)
Choppy Disk or VM switching out (Score:5, Informative)
I've found it can be pretty easy to use up all free RAM if you have a number of programs open or they leak memory. I've found at times I've had over 2GB of switch files.
This is with 896 MB of RAM, iBooks can be under spec'd in that department.
Re:Choppy Disk or VM switching out (Score:5, Insightful)
I also recently bought an iBook, and the very first thing I did, before I even booted it up, was drop in a bunch more RAM (and my Airport card, while I was in there). I have not experienced the kind of sluggishness you are talking about during disk reads, so that might be what your actual problem is.
OS X is the best OS experience I've ever had, but it is a memory pig. If you have the default RAM in your iBook (probably 128), you are hitting the VM a lot. It's fine if you don't mind a little sluggishness, but memory is cheap now days, so buying more is money well spent. Even another 128 can make a world of difference.
Re:Choppy Disk or VM switching out (Score:3, Informative)
Re:Choppy Disk or VM switching out (Score:3, Informative)
Re:Choppy Disk or VM switching out (Score:1)
Re:Choppy Disk or VM switching out (Score:1)
Try the command "vm_stat 1"; that'll print out VM statistics once a second, with the counts of various events (pages in/out, zerofills, etc.) given incrementally (and the grand totals every 25 lines or so).
Comment removed (Score:4, Informative)
Re:try this (Score:2)
Nope. sysctl is actually pretty small in Darwin. Mine has about 240 lines, 2/3rds of which are network-related (including 40 for IPv6). The only line related to my HD was vfs.hfs has 2 mounted instances
Re:try this (Score:1)
Re:try this (Score:2)
Its driver interface is a homebrew system from Apple called "IOKit". IOKit is where you'd find the DMA stuff, but I don't know offhand how to access it. You may do well to try Apple's "Apple System Profiler".
A quick trip to Google... (Score:3)
Will someone please mod up comment #4222630 [slashdot.org]??? The most likely answer is KFox hasn't bought enough RAM.
A quick and dirty test of disk I/O (Score:2, Informative)
Run this command from the Mac OS X shell:
dd if=/dev/zero of=testfile bs=1024 count=102400
This should make you a 100 MB file. dd on some systems will give you how long it took to write out the file in seconds (I don't have access to a Mac OS X box, just a FreeBSD box right now). If it doesn't, just put the time command in front of it:
time dd if=/dev/zero of=testfile bs=1024 count=102400
Devide the number of seconds it took to write the file out by 100, and you'll have a rough estimate of how many megabytes per second it wrote to disk.
Again, not the most comprehensive metric of course, but it gives you a rough idea. For an ATA system, it should probably do between 15 and 25 MB/s without too much trouble for a fast drive. The interface can be much faster (ATA/33, ATA/66, ATA/100), but the UFS and HFS+ file systems aren't optimized for sequntial writing, and/or there are other factors involved, so about 20 MB/s is a good mark I think.
Re:A quick and dirty test of disk I/O (Score:1)
Re:A quick and dirty test of disk I/O (Score:1)
Semi-cold:
$ time dd if=/dev/zero of=testfile bs=1024 count=102400
102400+0 records in
102400+0 records out
104857600 bytes transferred in 5.325558 secs (19689505 bytes/sec)
real 0m5.569s
user 0m0.190s
sys 0m3.840s
And the best of 3 runs in a row was:
104857600 bytes transferred in 4.984686 secs (21035949 bytes/sec)
Re:A quick and dirty test of disk I/O (Score:1)
Re:a reality check (Score:1)
I don't think it's DMA (Score:2)
Anyone know a way to check whether ATA write caching is enabled? The FreeBSD ATA sysctls don't work, presumably it's not using the FreeBSD ATA drivers.
Not a DMA issue (Score:3, Informative)
Re:Not a DMA issue (Score:1)
Masking interrupts... (Score:2)
Does OS X have something similar?
DMA isn't the problem (Score:1)
I was just at CompUSA playing with the new dual Macs with Jaguar, and even they lag quite frequently, especially with web browsers.
Re:DMA isn't the problem (Score:1)
Yep. True, true. PPC Linux just goes to show how much OS X is making the hardware look slow. Even on a slower Mac like the iBook, Linux PPC hums along while OS X lags.
Apple should take a lesson from the open source folk here. It is really shameful that the various Linux GUIs run fast, while OS X GUI runs slow.
Yes, I know all the fancy things the OS is doing that need so much horsepower. If the penalty is a slow GUI, then perhaps the OS should not be designed to do those things?
Re:DMA isn't the problem (Score:1)
I can agree, up to a point, but aren't we then penalizing them for moving forward? I remember when color was thought unnecessary and expensive (both ways, financially and computationally) and no one argues whether there should be color anymore. Apple has a history of pushing the interface forward, usually in an expensive way, and eventually everyone follows along. I have a gig of RAM in my current computer (new iMac) and I remember my last computer (Quadra 950) had 72 MB. That was considered an obscene amount at the time, and cost more than this whole box tricked out with everything. System 7's 24-bit icons were thought to be unnecessary eye-candy, for cryin' out loud. I really believe that eventually graphics layers like Quartz, with transparency, anti-aliased compositing, etc., will be as normal as color is now. The hardware just has to catch up.
You could also make the case that for the non-technical masses, some of that eye-candy is useful. The Genie Effect, for example, is what ZoomRects always wanted to be. I've seen some non-technical users who didn't get what ZoomRects was trying to tell them. They get it with the Genie Effect because it's more literal. I don't need it, you don't need it, but many, maybe most of them will benefit from it.
Of course, it's also a young system. Give them a little time for optimizations, custom chips, etc.
Re:DMA isn't the problem (Score:1)
I agree that progress is important. But progress is no good if the hardware isn't fast enough to support it. I think OS X is great. I also think too slow to be usable on current Apple hardware :(
Re:DMA isn't the problem (Score:1)
Re:DMA isn't the problem (Score:2)
The year is 2002. I simply will not "wait" for my computer. The computer is supposed to wait for me, yet I find myself waiting on OS X, especially when running web browsers.
Re:DMA isn't the problem (Score:1)
Doing everything with PDF actually is a very good idea, and I'm glad that they have it hardware accelerated now. Scaling is much faster now, and everything.
But, as someone else pointed out. Linux, and X still seems to run faster, which is pretty ridiculous, considering that X is running through a socket, and is naturally indirect. *sigh*
Still, Apple's idea is to advance what you can do with a GUI, and I think this is a positive push forward, and I want to see Apple make things even better!
Re:DMA isn't the problem (Score:2)
I'm not sure of the technical details, but my understanding is that Quartz works very much the same way - although Apple doesn't seem to provide a way to do it, it should be possible to run applications remotely, just like you can with X.
Re:DMA isn't the problem (Score:1)
But, as someone else pointed out. Linux, and X still seems to run faster, which is pretty ridiculous, considering that X is running through a socket, and is naturally indirect. *sigh*
If you're on the console it better NOT be. Local X traffic should be going through shared memory queues and not the networking layer. Many of the common unix workstations were doing this at least 10 years ago. I would certainly would have thought the XFree team would have implemented it.
a fix that worked for me (Score:1)
1: 7200rpm drive (this helped the most) and
2: More ram as others have mentioned, this does work (320mb instead of 192mb).
A couple of my friends have also done dedicated swap partitions and gotten even more responciveness. Other's here have also suggested this.
R
Macs and DMA (Score:1)