Apple OSes and IDE DMA Support?
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?"
The ChangeLog seems to have added UDMA in version 1.1 and later updated in 1.7 .
Try searching for UDMA Ultra-ATA ATA33/66/100 because DMA doesnt allways show up.
Mouse powered Chips, Open source Processors and Lego
Daemon News 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.
Are you sure it's the disk causing the problem vs delays due to VM switching in and out. There's a memory utility (can't remember name, Memory Tracker or Memory Monitor?) that will beep each time memory is paged in or out (or you could use top if you can interpret the numbers).
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.
# sysctl -a | grep dma
/etc/sysctl.conf to make it enable it on every boot also.
Look for a setting that's related to DMA and set it from 0 to 1 with "sysctl -w". You should be able to place the setting in
Unfortunately, I don't have an OSX box to test it on right now, so I can't give you the exact settings. OSX is based on FreeBSD, and FreeBSD enables DMA by default, however, it's possible that apple found a need to disable it by default. Some drive/chipset combos have problems with DMA, and if they were unsure of which brands of drives or chipsets they would be using, disabling it by default would be the safe way to go.
Need Free Juniper/NetScreen Support? JuniperForum
Will someone please mod up comment #4222630??? The most likely answer is KFox hasn't bought enough RAM.
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.
My iMac certainly feels slow, but I don't think it's disk DMA. "dd bs=8k count=100000 >ttt /dev/zero" gives a speed of 30MB/s which would be impossible without DMA.
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.
Mac's have had DMA support for a long time in both hardware and software, see this technote and the Developer Notes on hardware here for details. This includes the original clamshell iBooks. The iBooks may not have the fastest drives or interfaces but I don't think this is the problem. It's much more likely a Virtual Memory issue with lots of caching going on. check the contents of /private/var/vm/ for the number of 80Mb swapfiles you have, also try issuing vm_stat from the CLI to see whats going on. Two suggestions, either get more RAM or setup a 'clean' swap-drive partition.
The linux IDE driver has an option which controls whether it masks or unmasks non-ide interrupts during disk transfers...this option makes a huge difference in the amount of cpu time disk access consumes.
Does OS X have something similar?
I was just at CompUSA playing with the new dual Macs with Jaguar, and even they lag quite frequently, especially with web browsers.
Good job attacking a person over asking a question. True, I may tell people that their question is stupid, but if they ask them after that: "Why?" I'll respond quite plainly why their question/comment was "stupid" in my opinion. But I will never not answer a question.
I am unamerican, and proud of it!
I too had bad problems with disk lag on my iMac rev. A. The two things I did to increase the speed of drive I/O to the very acceptable latency was;
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
yes DMA should be enabled.
yes the user probably doesn't have enough RAM, however my similar spec pismo G3/500 is noticeably faster than the ibook. I wonder how much of this is related to a larger L2 cache(2M? don't remember offhand) & 100MHz system bus v. 66MHz & 256k L2. IIRC the drive speeds are similarly specced.
OSX: speed is usable, but hardly what it could/should be. I especially noticed this the other week when I had to boot into OS9 and how freaking FAST it felt, especially when dealing with LARGE items lists. Apple needs to spend more time of some serious optimization work and less on the icrapps. They REALLY REALLY need to spend more time with finishing up the basics, and getting us a decent filesystem.
yeah, Linux was ok, but I ended up dumping it at about the time that 10.1 came out as alot of stuff just wasn't supported or buggily supported or a pain in the a--. The linux/*BSD desktop experience also blows chunks. Nice as servers/development workstations though...
But I get about the same experience compiling stuff myself & using X11 & fink. (Although X11 under OSX performance isn't all that hot, but see above.)
Every PCI Powermac with IDE i.e. the 6400/ 6360 and later has been able to do DMA and uses DMA if the drive supports it. You can't disable DMA if it is enabled and you are using the MacOS. Granted until the Blue & White G3 the kind of DMA used is Multiword DMA. Any of the problems you may have heard about Multiword DMA are only compatability problems in Win 95. Multiword DMA works perfectly fine in the MacOS.
Impersonating Tycho from Penny Arcade since before there was a PA.