PIO Mode on IDE Channel = Poor DAW Performance (long post)

An area for people to discuss Scope related problems, issues, etc.

Moderators: valis, garyb

Post Reply
Counterparts
Posts: 1963
Joined: Tue Aug 19, 2003 4:00 pm
Location: Bath, England

PIO Mode on IDE Channel = Poor DAW Performance (long post)

Post by Counterparts »

Hi all :)

Well, I'm finally back from my few weeks of W2K-XP Upgrade Hell. I found out something new about why a Windows XP / ATA/ATAPI machine can have dreadful DAW performance. (As a quick precursor to this post, I did a search for 'PIO' in this 'Problems' forum, and didn't get any results from the search. I honestly think that this could very possibly be the root cause behind many DAW problems experienced by Windows users.)

I finally decided to join the 21st Century by upgrading my system from W2K to XP Pro SP2.

As I have a considerable amount of both VST and Scope plugins, I really wanted to upgrade my system without doing a completely fresh install if I could at all avoid it. This is not a good idea at all; if you're going to change operating system, it's for the best to format the drive and start from scratch regardless of how painful a procedure this may seem to be.

I observed lots of strange problems after performing the 'over-the-top'upgrade: system would not reboot, system sometimes wouldn't shutdown cleanly, USB would only be enabled on every other reboot and other minor issues (and this was after I'd completely patched-up the OS with every available Microsoft update).

So, on to the most important bit, the audio system...did it still work as flawlessly as before?

=>NO<=

In fact, the audio & VST performance of my system were the worst I've ever experienced.

I tried everything that I could think of to resolve the issue:

o install as Standard PC
o install as ACPI Uniprocessor PC
o BIOS settings ('P&P OS', 'PIC/APIC', 'IRQ assignments', etc.)
o IRQ steering on/off
o IRQ sharing on/off
o XP Performance tweaks (a great many!)
o Cubase VSTMultitrack setttings
o etc. etc.

Nothing, but nothing I tried changed affected the performance. Then I noticed something which seemed very odd; in Cubase, both the VST Performance meter and the Transport Panel show CPU usage. With Cubase not even playing anything (i.e. transport stopped), the CPU usage was showing something like 20-25% but then every couple of seconds, it would show 'CPU Overload'! Very strange. When playing, the same thing happened and every occurence of the overload would result in a complete breakdown of the audio system.

So I started doing some research on this phenomenom.

It seems that if XP detects 6 (over all time, not consecutive) CRC errors on an IDE channel, it starts ramping-down the speed at which the bus runs at, from UDMA5, to 4, to 3 ... and eventually the bus will be set to run in 'PIO' mode, which stands for 'Programmed I/O'.

This is a VERY BAD thing, especially in a DAW. It means that the CPU has to manage all data transfers to/from the bus, rather than allowing the DMA controller to acheive this.

OK, it's true that the CPU does need to give up some of its operation cycles for the DMA controller to do its thing, but the DMA controller is much more efficient at moving data about than the CPU is.

Just sticking a badly scratched CD or DVD into your drive can easily cause 6 CRC or timeout errors to occur, changing the IDE channel from UDMA mode to PIO.

Most problems I've seen posted to this forum seem to concentrate on IRQ issues, which I'm not personally convinced are much of a problem really; I'm not saying that no problems can be caused by interrupt sharing but if an interrupt fires, then its ISR (Interrupt Service Routine) needs to run and will be called regardless of what IRQ number it's on, which will take up CPU cycles.

There are a number of ways in which this PIO mode problem can be checked, and potentially corrected.

Firstly, go to Control Panel->Admin Tools->Computer Management->Device Manager, expand the 'IDE ATA/ATAPI Controller' node, right-click on the Primary (and afterwards, Secondary) IDE Channel icon and select 'Properties', tthen select the 'Advanced Settings' pane (should it exist; it might not always be there).

Check the 'Transfer Mode' and 'Current Transfer Mode' settings. If they indicate 'PIO' mode, then this will certainly mean very poor DAW performance.

Another thing worth trying as a test (if the 'Advanced Settings' tab is missing from the above channel properties dialog) is to run a hard disk speed checking application.

I used a freeware application called DiskSpeed:

http://home.earthlink.net/~alegr/download/diskspeed.htm

The page also has some useful information on the sorts of speed and CPU usage you should be seeing if the IDE channel the disk is on is working in UDMA or PIO mode.

There are some registry settings which you can try changing/deleting/adding which affect the IDE channels. These are located under the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\

Under this key there are entries such as '0001', '0002' etc. which contain settings for the IDE Channels.

Of particular note are entries called 'MasterIdDataChecksum' or 'SlaveIdDataChecksum' - if these exist, then this means that errors have been detected on the IDE channel and the operating speed has almost certainly been affected.

This article describes things much better than I and suggests many solutions:

http://winhlp.com/WxDMA.htm

Miscrosoft also know about the problem:

http://support.microsoft.com/kb/817472

About 4/5ths of the way down the following page, there is a good description of the mask values used for the MasterDeviceTimingModeAllowed and SlaveDeviceTimingModeAllowed registry entries: http://snoopdos.com/blog/index.php?skin=clean

I found that information useful when changing the registry settings to try to get UDMA mode back on the IDE channels.

I tried pretty much everything, removing registry entries, changing others, uninstalling and reinstalling IDE channels etc. etc. This did improve things to the point that I could play back & record some music, but the performance still wasn't quite as good as before.

In the end, I bit the bullet, re-formatted the hard disk and reinstalled Windows 2000 in 'Standard PC' configuration. I probably should have at least tried this approach with XP, but didn't want to have to go through all that twice should a clean XP install not have worked. I now have a rock-solid DAW system again :-)

Another thing which is perhaps worth mentioning about IDE-channel based drives is that, should a channel have 2 devices on it, only one of these devices can use the bus at any one time; it's transaction needs to complete before the other device may use the channel. For this reason, to get the best possible performance out of an IDE channel, it's probably best to only have one device installed on it.

As far as I'm aware, the above does not apply to Serial ATA (SATA) based hard disk drives.

Hopefully somebody will find this information useful, especially if you are experiencing poor (or very poor) DAW performance!

Royston
hubird

Post by hubird »

this is what you call a real 'problem solving' forum post... :-D
Last edited by hubird on Fri Dec 01, 2006 6:42 am, edited 1 time in total.
King of Snake
Posts: 1544
Joined: Fri Apr 13, 2001 4:00 pm
Location: the Netherlands
Contact:

Post by King of Snake »

Just sticking a badly scratched CD or DVD into your drive can easily cause 6 CRC or timeout errors to occur, changing the IDE channel from UDMA mode to PIO.
you don't have your HD's on the same IDE channel as your optical drives I presume so why should this have any effect on your HD performance?

I've never seen it happen that the tranfer mode of my IDE channel was changed automatically, but yeah obviously if your HD channel was somehow reset to PIO mode then this would mean unworkable performance from your drive.
User avatar
dbmac
Posts: 622
Joined: Sun Mar 25, 2001 4:00 pm
Location: Toronto

Post by dbmac »

Hey, good tip. My DVD drive was afflicted. It's on the secondary IDE buss by itself so i didn't notice any HD degradation, but my DVD drive was sure giving me problems. I never thought of checking transfer mode.
Now it's fixed. Thanks for sharing Royston.

/dave
User avatar
garyb
Moderator
Posts: 23380
Joined: Sun Apr 15, 2001 4:00 pm
Location: ghetto by the sea

Post by garyb »

yeah, that's a problem i haven't seen in some time. thanks for the reminder.
husker
Posts: 372
Joined: Thu Feb 05, 2004 4:00 pm
Location: wellington.newzealand

Post by husker »

Hmmm very interesting...never come across this before. But i've had machines that mysteriously start going slow, and never tracked it down, and had to rebuild XP to sort it. This could well be the magic bullet.

cheers!
Counterparts
Posts: 1963
Joined: Tue Aug 19, 2003 4:00 pm
Location: Bath, England

Post by Counterparts »

King of Snake wrote: you don't have your HD's on the same IDE channel as your optical drives I presume so why should this have any effect on your HD performance?
My system drive is, but not the drives I use for recording.

However, both IDE channels got switched to PIO mode after the OS upgrade, which completely stuffed my DAW's performance. You don't necessarily have to have a CD/DVD drive on the channel for this to happen, that's not what I meant to put across in my post.

The problems I experienced could be solely attributable to the fact that I did an 'over the top' OS install, but I'm too much of a coward to find out for sure :wink:
Counterparts
Posts: 1963
Joined: Tue Aug 19, 2003 4:00 pm
Location: Bath, England

Post by Counterparts »

dbmac wrote:Hey, good tip. My DVD drive was afflicted. It's on the secondary IDE buss by itself so i didn't notice any HD degradation, but my DVD drive was sure giving me problems. I never thought of checking transfer mode.
Now it's fixed. Thanks for sharing Royston.

/dave
Huzzah! :D
pseudojazzer
Posts: 222
Joined: Wed Aug 18, 2004 4:00 pm
Location: london

Post by pseudojazzer »

Royston, you are a lifesaver!

Just yesterday i couldnt work out why even the simplest of projects were not playing back, CPU was high and constantly spiking, and i couldnt for the life of me work out why!
I needed to get back to work today, as i have a few overdue projects.
I saw your post, and read up whilst running a defrag.
Before i started to nose around in the registry i thought i would see if the menus would change of their own accord (i choose the let bios manage DMA option)
It asked for a restart and now the system is working fine again.
Thanks very much.. i would never have looked to that as a problem (never even heard of PIO before today!

Cheers,
Tom

P.S. - you might even think of putting this in the tips section, its very useful, because as you say PIO mode can suddenly be activeated without the user knowing.
User avatar
astroman
Posts: 8455
Joined: Fri Feb 08, 2002 4:00 pm
Location: Germany

Post by astroman »

absolutely - I never would have guessed it even could do that :o
now that leaves me thinking... was the PIO mode I recently saw for a new flash disk adapter because it IS in fact a PIO device or because the harddisk was about to die - next day SMART wrote it's time had come (bloody thing - never used but just laying around as a reserve for 2 years...)

cheers, tom
Counterparts
Posts: 1963
Joined: Tue Aug 19, 2003 4:00 pm
Location: Bath, England

Post by Counterparts »

@ pseudojazzer:

OK, I''ll post a link to this thread from the tips forum.

@ astroman:

It's hard to say for sure about the drive (it's a flash drive, yes?) without knowing what transfer mode was being used before you noticed that it was using PIO mode. It seems very odd that it has packed in after just two years without using it though!
Post Reply