Re: [newbie] hdparm and cd drive
On Tuesday October 1 2002 08:59 pm, L.V.Gandhi wrote: > On Monday 30 Sep 2002 10:44 pm, Tom Brinkman wrote: > > (my ide burner which has scsi emulation and is dev/scd0 or hdd, dma > > enabled) > > tom# hdparm -t /dev/scd0 > > /dev/scd0 not supported by hdparm > > tom# hdparm -t /dev/hdd > > > > tom# ' > > /dev/hdd: > > Timing buffered disk reads: read() hit EOF - device too small > > How these two times get two different output. > Initially I didn't have /dev/hdd. Then I did symlink with scd0 as > [root@localhost lvgandhi]# ln -s /dev/scsi/host0/bus0/target0/lun0/cd > /dev/hdd still I get as follows. > [root@localhost lvgandhi]# hdparm -v /dev/hdd > /dev/hdd not supported by hdparm > What to do? Nothin to do, as the mesg says, hdparm does not support scsi devices, only ide. Evidently, as my 'hdparm -t /dev/hdd' error shows, it won't work with ide devices that are scsi emulated either. Why or how hdparm is able to set the burner to use dma... I don't understand myself. You didn't need the symlink, you might want to remove it. ide burners are setup as both ide (/dev/hdd) and scsi (/dev/scd0) by the append, hdd=ide-scsci > Further how to know my cdrw HP9100c will be ok with dma? Trial'n error. Set it to dma enabled and see if there are any problems. There shouldn't be. See 'info hdparm', it's one of the better written man pages. -- Tom Brinkman Corpus Christi, Texas Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] hdparm and cd drive
On Monday 30 September 2002 12:14 pm, Tom Brinkman wrote: > > > > Your comments bring up a question... > > > > > > > > In Windows, enabling DMA for CD-ROMs (and it variants) is > > > > considered a 'no-no' and will cause problems most every time. > > > > > > really? my DVD wants DMA to work at all in winders > > > cause it is much faster > > > > I've tried to check mine a couple of times (when this topic comes > > up) and hdparm always says it's not support on my drives if I use > > /dev/scdX and if I use /dev/hdx I get input output errors. Could > > this be because I have them set up under scsi emulation? Any > > other thoughts? > > thanks, > > -s > >I believe so, but you should still be able to enable dma. > tom# hdparm -t /dev/hdd > /dev/hdd: > Timing buffered disk reads: read() hit EOF - device too small > > (my ide cdrom, no scsi emulation) > tom# hdparm -t /dev/hdc > /dev/hdc: > Timing buffered disk reads: 64 MB in 23.96 seconds = 2.67 MB/sec > > tom# hdparm -d0 /dev/hdc (turn off dma) > /dev/hdc: > setting using_dma to 0 (off) > using_dma= 0 (off) > > tom# hdparm -t /dev/hdc > /dev/hdc: > Timing buffered disk reads: 64 MB in 32.68 seconds = 1.96 MB/sec > hdparm doesn't support testing scsi drives (only ide), I suspect > the performance increase with dma enabled is similar for scsi > emulated drives. Thanks for the info and running those tests for me. Interesting stuff. -s Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] hdparm and cd drive
On Monday September 30 2002 11:19 am, s wrote: > On Monday 30 September 2002 09:55 am, et wrote: > > On Monday 30 September 2002 10:26 am, you wrote: > > > Tom, > > > > > > Your comments bring up a question... > > > > > > In Windows, enabling DMA for CD-ROMs (and it variants) is > > > considered a 'no-no' and will cause problems most every time. > > > > really? my DVD wants DMA to work at all in winders > > cause it is much faster > > I've tried to check mine a couple of times (when this topic comes up) > and hdparm always says it's not support on my drives if I use > /dev/scdX and if I use /dev/hdx I get input output errors. Could > this be because I have them set up under scsi emulation? Any other > thoughts? > thanks, > -s I believe so, but you should still be able to enable dma. (my ide burner which has scsi emulation and is dev/scd0 or hdd, dma enabled) tom# hdparm -t /dev/scd0 /dev/scd0 not supported by hdparm tom# hdparm -t /dev/hdd tom# hdparm -t /dev/hdd /dev/hdd: Timing buffered disk reads: read() hit EOF - device too small (my ide cdrom, no scsi emulation) tom# hdparm -t /dev/hdc /dev/hdc: Timing buffered disk reads: 64 MB in 23.96 seconds = 2.67 MB/sec tom# hdparm -d0 /dev/hdc (turn off dma) /dev/hdc: setting using_dma to 0 (off) using_dma= 0 (off) tom# hdparm -t /dev/hdc /dev/hdc: Timing buffered disk reads: 64 MB in 32.68 seconds = 1.96 MB/sec I used the same data CD for all the tests, ran 'em several times, included results above that were about average. So for the ide cdrom w/no scsi emulation, dma increases IO by ~36%. While hdparm doesn't support testing scsi drives (only ide), I suspect the performance increase with dma enabled is similar for scsi emulated drives. -- Tom Brinkman Corpus Christi, Texas Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] hdparm and cd drive
Thanks Tom! You answered my questions. Thanks! Please see my other post as to what some of my machines are doing. As for your comment on never having a problem with using DMA access on CD-ROMs before, under any version of Windows, I have to wonder how I could have been working with the wrong systems and system makers in the past. ;-) I never could get Win 95-98 to accept this setting as of up to a few years ago, when I was actively providing close systems for sale. Now, I see on my XP machine that it allowed one of my CD-RWs to go that way, but not the newer DVD. Maybe its really all a matter of the mobo's I have been using recently, and the fact that much of my stuff has long since been called "state of the art". My reference to "just using an IRQ to gain the attention of the CPU?" is just my slang description for what an IRQ does. Interrupts are nothing more than exclusive (most of the time) doorways to speaking to the CPU. However, using DMA is not always possible, even if allowed to do so. Windows 98 SE has an aversion to disabling the use of an IRQ in your BIOS for your video card. It will word, but also become unstable and sometimes not allow the system to properly shut-down. This is most obviously a Windows-problem, not a hardware one, but this is my past and where I am coming from. I probably should have helped you some by being more specific on asking what DMA will do for a CD-ROM-like device. I am aware of the speed increase and the by-passing the CPU. I really wasn't asking for the definition of the terms, but the results and reliability of doing this. My mistake. I should have been more clear. As for the Linux info, thanks a lot! That's really helpful stuff. I will also check the on-line docs and do some research on it. I will have to play with my Linux box to see if DMA access is enabled for the slower, older CD-RW drive it has in it and if it performs properly. I am really looking forward to all the neat things that I can do in Linux that Windows always hid from me. ;-) Thanks again for response. T Tom Brinkman wrote: > On Monday September 30 2002 09:26 am, Technoslick wrote: > >>Tom, >> >>Your comments bring up a question... >> >>In Windows, enabling DMA for CD-ROMs (and it variants) is considered >>a 'no-no' and will cause problems most every time. In many cases, >>Windows will automatically deactivate it if you set it on. How is it >>different in the Linux O/S, and what advantages are received by using >>Direct Memory Access in Linux over just using an IRQ to gain the >>attention of the CPU? > > > DMA has to do with faster disk IO. I don't know what you mean by > "just using an IRQ to gain the attention of the CPU?" On my mobo, as > with most all of 'em, the ide1 (second ide) is on IRQ 15. Enabling or > disabling DMA doesn't change this. IO improvement such as DMA is very > important since all drives, ide or scsi run on the 33 mhz PCI bus. Also > PIO modes (no DMA) go thru the cpu, DMA bypasses the cpu and does data > tranfers directly to memory. > > The various types of DMA, eg, for my CD drive, (hdparm -i) > UDMA modes: udma0 udma1 *udma2, employ some gimmicks to improve goin > thru the 33 mhz PCI bus. Much the same as AGP compared to PCI for > video. Therorectically AGP doubles it from 33 to 66 mhz, actually it > provides less than 10% boost. It's more important for disk IO tho. > While udma2 might get 12mb/sec, udma5 will get around 40mb/sec (hdparm > -t). 'Course that's for harddrives. Enabling DMA for Cd drives won't be > near as much, but it's still better than without it if your > hardware is capable. > >From 'info hdparm' > "Using DMA nearly always gives the best performance, with fast I/O > throughput and low CPU usage. But there are at least a few > configurations of chipsets and drives for which DMA does not make > much of a difference, or may even slow things down (on really messed up > hardware!). Your mileage may vary." > > I dual boot W98 (rarely ;), it sets all my drives including my CD > drives to DMA. I can't remember any Windoze version or combo of > hardware I've used in the past that didn't enable DMA. I do remember > some Winsux burning software that disabled DMA, but that's a software > deficiency. > > As to "How is it different in the Linux O/S". Memory access, > management and VM in Linux is much different than in Windoze. It's also > a moving target, with newer Linux kernels striving to constantly > improve it. Google "linux memory management", or search the kernel > mailing list. This might be a good place to start http://linux-mm.org/ > > > > > Want to buy your Pack or Services from MandrakeSoft? > Go to http://www.mandrakestore.com Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] hdparm and cd drive
et wrote: > really? my DVD wants DMA to work at all in winders > cause it is much faster > Yes, *really*. :-) How about some real life examples? Machine #1: XP Pro 2nd IDE Channel - Primary - Liteon DVD-ROM LTD163 Secondary - Philips PCRW404 (32/16X/4X) XP auto selects off for DVD drive CD-RW drive auto selects DMA on and its works fine. Machine #2: Win 98 SE 2nd IDE Channel - Primary - Philips PCRW2412/17 (40X/24X/12X) Secondary - "nada" DMA off in Device Manager. Checking it off to be "on" not only doesn't work, but also make the entire Secondary IDE Channel unusable. Machine #3: Win 95 2nd IDE Channel - Primary - Goldstar GCD-R542B (4X) Secondary - "nada" Win 95 refuses to allow the enabling of DMA for this CD-ROM drive. Machine #4: Win 2000 Pro 2nd IDE Channel - Primary - Matshita UTDA310 (CD-RW drive in laptop - hot-swap module) Win 2K auto selects DMA off. Machine #5: MDK 8.2 2nd IDE Channel - Primary - Acer CR6202A (6X/2X/2X) I have yet to check what MDK is doing with it, however I know that under every Windows version I have run it in, it either will fail under DMA or not allowed access to its use. These aren't even all of my working machines, but I think that you can see where I am coming from. And, I haven't even thought about those of my clients over the last 15 years... Not all O/S's, hardware configurations or drives (regardless of type) will allow CD/DVR/DVDR/CDR/CDRW to use DMA. Not necessarily all newer drives, either. Consequently, I just haven't thought about going there. Tom's comment about its use in Linux intrigued me and made me wonder if this particular OS can get drives to use it where Windows won't/can't. I'd like to hear from anyone using the Philips-brand CD-RWs, or an older Acer 6202A CD-RW drive with DMA access enabled under Linux. If Linux will drive these drives reliably (very important) faster with DMA enabled, I am all for it! TIA, T Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] hdparm and cd drive
On Monday September 30 2002 09:26 am, Technoslick wrote: > Tom, > > Your comments bring up a question... > > In Windows, enabling DMA for CD-ROMs (and it variants) is considered > a 'no-no' and will cause problems most every time. In many cases, > Windows will automatically deactivate it if you set it on. How is it > different in the Linux O/S, and what advantages are received by using > Direct Memory Access in Linux over just using an IRQ to gain the > attention of the CPU? DMA has to do with faster disk IO. I don't know what you mean by "just using an IRQ to gain the attention of the CPU?" On my mobo, as with most all of 'em, the ide1 (second ide) is on IRQ 15. Enabling or disabling DMA doesn't change this. IO improvement such as DMA is very important since all drives, ide or scsi run on the 33 mhz PCI bus. Also PIO modes (no DMA) go thru the cpu, DMA bypasses the cpu and does data tranfers directly to memory. The various types of DMA, eg, for my CD drive, (hdparm -i) UDMA modes: udma0 udma1 *udma2, employ some gimmicks to improve goin thru the 33 mhz PCI bus. Much the same as AGP compared to PCI for video. Therorectically AGP doubles it from 33 to 66 mhz, actually it provides less than 10% boost. It's more important for disk IO tho. While udma2 might get 12mb/sec, udma5 will get around 40mb/sec (hdparm -t). 'Course that's for harddrives. Enabling DMA for Cd drives won't be near as much, but it's still better than without it if your hardware is capable. From 'info hdparm' "Using DMA nearly always gives the best performance, with fast I/O throughput and low CPU usage. But there are at least a few configurations of chipsets and drives for which DMA does not make much of a difference, or may even slow things down (on really messed up hardware!). Your mileage may vary." I dual boot W98 (rarely ;), it sets all my drives including my CD drives to DMA. I can't remember any Windoze version or combo of hardware I've used in the past that didn't enable DMA. I do remember some Winsux burning software that disabled DMA, but that's a software deficiency. As to "How is it different in the Linux O/S". Memory access, management and VM in Linux is much different than in Windoze. It's also a moving target, with newer Linux kernels striving to constantly improve it. Google "linux memory management", or search the kernel mailing list. This might be a good place to start http://linux-mm.org/ -- Tom Brinkman Corpus Christi, Texas > Sorry for the technical question, but I can't help but ask now that > you have mentioned this. :-) > > T > > Tom Brinkman wrote: > > On Sunday September 29 2002 08:59 pm, L.V.Gandhi wrote: > >>Should hdparm be run for a cdrom device say /dev/hdd after it is > >>mounted? I have HP 9100c cd writer. > >>Enabling dma for it is worthwhile or not? > > > > Yes, if it doesn't cause problems. Somewhere during the 9.0 > > beta process, dma ceased to be automatically enabled for both my > > cdrom and cd-rw. I added these lines to the end of > > /etc/rc.d/rc.local and now all is well, no dma problems. > > > > hdparm -d1 /dev/hdc > > hdparm -d1 /dev/hdd > > > > (Then run rc.local to make the changes happen, eg, './rc.local' On > > subsequent boots, dma will be enabled automatically) > > > > So if hdparm doesn't show dma enabled, you may need to do the > > same rc.local edit. For example, (hdc is my cdrom) > > tom$ su > > Password: > > tom# hdparm -v /dev/hdc > > > > /dev/hdc: > > HDIO_GET_MULTCOUNT failed: Invalid argument > > IO_support = 1 (32-bit) > > unmaskirq= 1 (on) > > using_dma= 1 (on) > > keepsettings = 0 (off) > > readonly = 1 (on) > > readahead= 8 (on) > > HDIO_GETGEO failed: Invalid argument > > > > The failed mesgs are normal for a CD drive, they apply to > > harddrives. Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] hdparm and cd drive
On Monday 30 September 2002 09:55 am, et wrote: > On Monday 30 September 2002 10:26 am, you wrote: > > Tom, > > > > Your comments bring up a question... > > > > In Windows, enabling DMA for CD-ROMs (and it variants) is > > considered a 'no-no' and will cause problems most every time. > > really? my DVD wants DMA to work at all in winders > cause it is much faster I've tried to check mine a couple of times (when this topic comes up) and hdparm always says it's not support on my drives if I use /dev/scdX and if I use /dev/hdx I get input output errors. Could this be because I have them set up under scsi emulation? Any other thoughts? thanks, -s Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
[newbie] hdparm and cd drive
Should hdparm be run for a cdrom device say /dev/hdd after it is mounted? I have HP 9100c cd writer. Enabling dma for it is worthwhile or not? -- L.V.Gandhi 203, Soundaryalahari Apartments, Lawsons Bay colony, Visakhapatnam, 530017 MECON, 5th Floor, RTC Complex, Visakhapatnam AP 530020 INDIA Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com