Notes on CPU usage with LDW-451S

Hi folks,

LiteOn LDW burners seem to be often criticized by PC press for their “high CPU usage.” Frankly, this sounded nonsense to me because I had been sure that CPU usage had to do not with a drive, but with the controller the drive is attached to and the operating system. However, a rumour said that an average IDE controller was akin to pass-through wire rather than to a sophisticated VLSI device, and therefore the drive itself did matter. With a brand new LDW-451S in my PC, I’ve finally got a chance to verify the grounds for such a criticism.

First of all, I should confess that my PC is P-200 based. No, it is not the fabulous 200th generation of the Intel CPU delivered right from the future–it’s Pentium I, 200MHz. Despite being a fossil, it creates some curious opportunities to do (mis)performance testing. My motherboard is built around 430VX–yet another little dinosaur.

Windows 98SE on my PC

Note 1:
When DMA was disabled on the DVD drive, Nero 5.5 CD Speed yielded the following CPU Usage Test results:

1x - 4%; 2x - 9%; 4x - 17%; 8x - 34%.

When DMA was enabled, the results were as follows:

1x - 2%; 2x - 5%; 4x - 9%; 8x - 17%.

CPU usage clearly decreased by the factor of 2 when DMA was enabled. This is an obscure feature of Windows 98 I/O subsystem because one can expect CPU usage to drop more considerably with DMA on.

Note 2:
Copying from a CD-R or DVD+RW to “nul” was apparently CPU-bound. CPU usage stayed at maximum, 100%, during the operation, while throughput peaked at ~3.5M/sec. DMA was enabled on the DVD drive.

Note 3:
Burning a CD-RW at 10x w/DMA enabled was eating 70-80% CPU time.

FreeBSD 4.9 on my PC

Note 4:
Was copying a DVD+RW to /dev/null. W/DMA enabled, throughput peaked at 8M/sec near the outer edge of a DVD. The highest CPU usage observed, ~50%, corresponded to the peak performance. “Interrupt” time kept as low as 4-6%, indicating that only a small fraction of CPU time was dedicated to communication with the DVD drive–the rest of CPU time, mostly “system”, was obviously spent by the OS moving the data around RAM.

W/DMA disabled, in PIO4 mode, throughput was never higher than 4.6M/sec while CPU usage topped 85%, with most time spent in “interrupt.” According to “iostat” and “systat”, physical transfers where done in 60K chunks and required an average of 2.5 interrupts per transfer. Peak interrupt rate was 190Hz. For comparison, copying from a hard disk in PIO4 mode to /dev/null was done in 16K chunks and took 2 interrupts per chunk; peak interrupt rate was 1040 Hz.

Note 5:
Burning a DVD+RW at 4x (~6M/sec) with “dvd+rw-tools” never ate more than 20% CPU time, with <5% “interrupt” time.

Windows 2000 on AMD Athlon 1700+

Note 6:
With DMA disabled by accident, reading from the DVD drive at the full speed resulted in 100% CPU usage (!) Re-enabling DMA led to CPU usage dropping as low as less than 5%.

Conclusion

LiteOn LDW drives can challenge operating systems with poor I/O strategy–Windows 98 is an example. However, an OS of this kind is likely to show low performance with any high-speed optical drive.

When in PIO mode, LDW-451S indeed displayed very high CPU usage, requiring about 6 times more CPU cycles per transfer than a reference hard drive. This could be attributed to suboptimal bus management by the drive when in this outdated I/O mode. The question of how other high-speed optical drives perform in PIO mode is left open, though.

On the other hand, a modern OS that efficiently makes use of such advanced techniques as bus-mastering on IDE controllers should meet no trouble with the drives in question even on a slow CPU, e.g., Pentium I. The CPU requirements by LiteOn are actually somewhat excessive.

CPU usage test results found in press are to be taken with a grain of salt as long as a single OS may implement a number of I/O strategies with different performance profiles.

xyzzy70, very informative post. Thanks for your hard work. One of the greatest first post i’ve ever seen in age. Kinda make me wonder… Anyhow, I just don’t understand how can you come to conclusion that 411s is taking too much CPU. All i can conclude from your tests is that PIO is taking more CPU than DMA, which is essentially nature of PIO anyway.

On PIO (Programmed Input Output) mode, CPU is responsible for moving data from one device to another. The way it works is that device will gather chunk of data and when ready, it interrupts CPU to get this data. The faster device trying to send data the more interrupts.

DMA (Direct Memory Access) mode on contrary, is the mode that device simply bypass CPU and drop data directly into memory.

In utopia where CPU is abundant, PIO is supposedly to be faster than DMA. IIRC, this is because DMA controller cannot occupy the bus at all time like CPU. (During DMA transfer, CPU is blocked from accessing memory to prevent corruption.) SO, DMA will burst data in chunks. However, in real world CPU is limited, while requesting for CPU at constant rate will result in slow down of other device.

Also, newer devices (optical drives like DVD burner) are designed with higher specification of CPU at goal. So, it’s not entirely strange to see higher CPU usage on newer device in old box than older device in old box. If you have put both of devices in new box, the new device will outperform the older one. Different devices read different chunks of data to be transfer due to format and its optimization.

Of course, if you want to accuse LiteOn drive for being a CPU hog, you should have done the test similar to
http://www.cdrlabs.com/reviews/index.php?reviewid=214&page=Performance . And i agree!, looking the test, plextor consumes much less CPU than LiteOn.

simplelife, thank you for your appreciation. I’m glad that you found my notes interesting.

Anyhow, I just don’t understand how can you come to conclusion that 411s is taking too much CPU. All i can conclude from your tests is that PIO is taking more CPU than DMA, which is essentially nature of PIO anyway.

I judged from the comparison with a hard disk in PIO mode. Of course, the optical drive is slower than the hard disk. However, I can’t see clearly why CPU had to work harder when reading data from the optical drive if the latter was at the same PIO level as the hard disk, which was PIO4 in my case.

AFAIK, PIO works as follows: CPU submits a request to a drive through its controller and goes on with other tasks (or spins in the idle loop if there are none.) As soon as the drive fulfils the request, it signals to its controller, and the latter sends an interrupt to CPU. If it was a read request, now CPU has to spend some time reading the data from the drive’s buffer. In the case of a write request, CPU spent its time when sending the data along with the request. The only factor to directly affect CPU usage during the I/O process is the timing of data exchange between CPU and the controller’s registers, which is defined by the PIO level used.

Of course, if you want to accuse LiteOn drive for being a CPU hog, you should have done the test similar to
http://www.cdrlabs.com/reviews/index.php?reviewid=214&page=Performance . And i agree!, looking the test, plextor consumes much less CPU than LiteOn.

Thanks for the pointer, but I had taken a look at the CDRLabs test before starting mine. Frankly, I’m inclined to doubt the figures from of the Nero CD Speed CPU usage test because, according to my own observations, they diverge significantly from CPU usage in practical applications. In addition, I’ve had really negative experience with the combination of a VIA chipset, KT400; the VIA IDE driver; and LDW-451S–the Windows I/O subsystem was hanging upon an attempt to burn a DVD-R until I removed the VIA IDE driver. However, the VIA IDE driver I used was miniport, not filter.

And of course I was by no means accusing LiteOn drives. I feel I begin to love my one. :smiley: My intention was to show that the reality of using LDW drives is more versatile than the test results in press or the specs on the LiteOn retail box. On the one hand, using an unfortunate combination of an operating system and I/O mode can lead to performance problems. But on the other hand, CPU speed won’t be a key issue for using an LDW drive if the combination is good.