All PIO and no DMA, makes PC slow to play!
Wednesday, March 26th, 2008I’ve been doing a fair bit of disk work on my file server since we got burgled. I had about a gig of photos, and some other (less important) data on my laptop that was lost completely. The only reason it was lost completely is that I didn’t have space on the file server. So I’ve been moving tens of gigs around partitions and disks. And I installed a removable USB drive caddy that I’m going to run tertiary (archive) backups on to. I was using tapes, but they were too small, and that means I have to swap the tape…which means I have to notice that the current one is full, which I generally don’t. So I moved to portable HDD’s
Anyway, because I’ve been doing so much disk work, a lot of it with BackupPC, the load on my PC has been high. The load with BackupPC when doing a backup is always high, has been since I started using the program, so that was no surprise. The irritating factor, was that it was taking more than 12 hours to do an archive of my 80G of backed up files. Now it takes about 6 hours to do just the normal backups (incremental or whatever). There’s only 24 hours in a day, and it only does 1 backup at a time. Plus, I want the computer to be able to respond to be able to transfer new data to it, and access my file server. When the load reaches about 5, that becomes very hard!
When I do a
hdparm -i /dev/hda
It shows the drive using UDMA 4.
But I think that just shows what the drive electronics is capable. Not what the system is using. Doing:
hdparm /dev/hda
Shows the current configuration of the system in relation to the drive. Which in my case was:
using_dma = 0 (off)
Now, I’d enabled the Via chip for IDE when I upgraded the kernel, because the options where:
Trying to enabled DMA like this:
hdparm -d1 /dev/hda
Yielded the result:
“Operation not permitted”
I.e. it didn’t enable DMA like it should. I thought that was a kernel config error, and I was right. It generally means the IDE chip isn’t correctly loaded.
My lspci says:
0000:00:1f.1 IDE interface: Intel Corporation 82801AA IDE (rev 02)
Now the options in the kernel I saw closest were:
Intel PII X Chip
Or
Via 82xxx
Is that PII X? I don’t think so. But the PII X covers it for some reason. So I enabled the module, and modprobe’d it and it did indeed detect an ICH chip.
So I happily rebooted so the module would be inserted at boot up and DMA disabled. Not so. Once the actual IDE driver gets loaded, you can’t re-load an IDE chip (because the generic IDE driver is dependent on the IDE chip driver). Annoying, but it makes sense. So I recompiled my kernel with the PII X in the kernel, re-ran lilo and rebooted. And man that reboot was (relatively) fast. I’m used to waiting 90-120 seconds on my Via C3. I thought it was just because I had so many services loading. Nup. Loads in 20 seconds now
And I get the appropriate 20 - 50MB/s sustained from my drives now
I like this post too, about using HDParm to tweak the settings even more. There isn’t much too it, and it can be fun to do it and benchmark the drive to see the difference
And yes I ripped the title line in this post from Jack Nicholson ![]()