LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   hardrive and dvd drive with the same ide cable (https://www.linuxquestions.org/questions/linux-hardware-18/hardrive-and-dvd-drive-with-the-same-ide-cable-737059/)

golgo 07-01-2009 07:02 PM

hardrive and dvd drive with the same ide cable
 
hello everybody i have a small question i have my harddrive and the dvd drive with the same ide cable, but the problem is that sometimes it slows down and it gets frozen, and when i open movie player it really slows down.i have the ubuntu 9.04 64 bit version and i have a phenom x4 with 2GB of ram is that normal or is because i have my hardrive with the dvd drive with the same cable??

GrapefruiTgirl 07-01-2009 07:17 PM

Having the DVD and HDD on the same cable should be fine. However, Let's say that you are watching a movie, maybe running a couple other things in the background, and you have either A) a 40-wire IDE cable, or B) no DMA enabled, then yes, you can experience slowdowns of the video itself, simply because the computer cannot get the data fast enough to display. This however should not 'slow down the entire machine' in general.

Definitely DMA should be enabled in the BIOS for your IDE devices, and also in the kernel (which it should be unless the hardware is really weird). And, you SHOULD have 80-wire cables definitely.

Can you be a little bit more specific about exactly WHAT slows down and/or gets frozen? And is it when the media player is OPENED or do you have to be playing something to cause the slowdown?

Thanks
Sasha

Hern_28 07-01-2009 07:21 PM

Another possibility.
 
Check the jumpers and ensure they are set correctly and specifically. Don't use cable select because that can get a bit weird.. even with winblows.

Would also definitely check and ensure dma is enabled as grapfruitgirl suggested.

Another possible cause would be having the correct video driver installed and set up and working properly.

Would check out these first. If it still acts up then we can dig a little deeper

jay73 07-01-2009 07:41 PM

With that kind of set-up, always make sure that hard drive is master and optical drive slave.

golgo 07-01-2009 08:11 PM

thank u for your advices and it slows down the comuter when the music starts playing when it loading the track...so if the problem is for the cable it should be fine if i buy a sata to ide adapter????or i should check the drivers if they are the correct ones???or the bios???

ps:thank u for your support

GrapefruiTgirl 07-01-2009 08:34 PM

You're welcome!

Well, start with the cheap/free stuff first. As suggested above,

1) Check if your IDE cables are 80-wire or 40-wire (you can count them pretty easy with a fingernail)
2) Make sure the HDD is at the end of the wire and is jumped as MASTER
3) The DVD is in the middle of the wire, and is jumped as SLAVE
4) Check the BIOS - make sure DMA is enabled anywhere you see it mentioned.
5) If the drive is working, chances are very good that you have the correct driver.

6) I doubt a SATA-IDE adapter will gain you anything, but that's just my opinion; I haven't tried one, but I'd bet that the DVD drive cannot produce data fast enough to overload the IDE controller in your motherboard :twocents:

Try that stuff first; then, if performance still sucks, we can try to think of other things to consider, or if you feel it will help, you can go buy an adapter. But, if you do buy an adapter, you'll have to come back and tell us if it made any difference! :)

Sasha

salasi 07-02-2009 07:22 AM

Quote:

Originally Posted by golgo (Post 3593554)
...i have my harddrive and the dvd drive with the same ide cable, but the problem is that sometimes it slows down...is that normal or is because i have my hardrive with the dvd drive with the same cable??

Well, having the hard disk and optical drive on the same cable will slow things down, but it shouldn't be by a massive amount.
  • IDE is a blocking protocol, so the use of any two drives on the same cable will cause slow downs if the two drives are used simultaneously
  • The IDE channel can only be configured to the fastest mode of the slowest device on the cable, and optical drives are often slower than hard disks. So if, for example, you had an optical drive that would only support UDMA33 but the hard disk could (theoretically) support UDMA 133, the interface would be limited to UDMA 33. I don't know, though, when the error makes itself known (is it on config, and do you get a message, or is it when the slower device is operated??)

Now, as a general rule of thumb, dropping down one UDMA mode causes a slowdown, but one which you are only likely to notice in benchmarking (rather than casual observation) so I can't exclude the possibility that something else is going on here.

Quote:

buy a sata to ide adapter???
Well, it will get them off the same interface and so it will simplify the problem somewhat. I wouldn't like to guarantee that it will do much, though. I certainly wouldn't try it unless its cheap, though.

Have you tried looking at 'dmesg' for errors? What about any other perf tuning type measures? Does vmstat show up anything, like lots of swap activity? top?

onebuck 07-02-2009 08:49 AM

Hi,

What's on the other ide channel?

golgo 07-02-2009 12:49 PM

i have the 80 wire, and on the bios it shows that the dvd drive is the master and the HDD is the slave and i check it with both ways and it didn't change the dvd drive was the master.i also check the DMA and they are on auto :-(...and how do i check what type of UDMA im using????...and well the sata to ide adapter its only $4 i think im going to give it a try

onebuck 07-02-2009 01:35 PM

Hi,

What's on the other channel? If nothing then move the HD to ide1 as master/single.

golgo 07-02-2009 01:49 PM

mmmm what you mean by on the oder channel??? my mother board only has 1 for 1 ide cale and i try it both ways and it appears on the bios that the dvd drive is the master

onebuck 07-02-2009 02:07 PM

Hi,

Some MB do have ide0 and ide1. I looked through the thread again and it does seem you have only one ide with 2 sata. What about setting the drives to alternate master/slave? It seems to me that you attempted but what about the jumpers on the drives? Were they changed to reflect the setting? What about the cable position at the time of the jumper change? When you set the master then the cable position should be at the end of the cable. The slave would then be positioned inward on the second connector. Do you have a spare ide cable to swap with?

golgo 07-02-2009 02:17 PM

hi thank your for helping me out and how do i alternate the master/slave cable???

GrapefruiTgirl 07-02-2009 02:27 PM

If I understand you correctly, you tried changing the position on the cable, of the two drives, right? ANd the BIOS still reported that the DVD was master?
If this is right, then what you need to do to switch them around, is check that the little jumpers on the back of the unit are correctly set.

There will be a little tiny block with a few sets of little metal pins in it, and usually on the housing of the unit, there is a little diagram of which pins to jump to set the unit as master or slave.

While there's no guarantee that this will help, I think it's wise to set the HDD as master, and the DVD as slave, and put the HDD at the end of the wire and the DVD in the middle. At least it will eliminate the physical setup as a factor in the problem.

Something else worth noting, is that you can use the HDPARM (utility) command to check and/or set the USING_DMA flag, and the 32BIT_IO flag, as well as maybe one or two others, that can determine/set how the drive uses DMA.
Hdparm is included with many Linux distros, but if you don't have it, you can get it easily enough and install it.

Sasha

onebuck 07-02-2009 04:53 PM

Hi,
Quote:

Originally Posted by golgo (Post 3594629)
hi thank your for helping me out and how do i alternate the master/slave cable???

By placing the connector to mate with the proper jumper drive. If you set the cd/dvd to master then place the cable connector that is at the end of the cable on this drive. Then you would jumper your hdd as slave and place it on the inward or first connector from the MB. Alternately try drives set as master with the other as slave. But you must move the cable to mate with the proper drive configuration. Master will always be at the end of a IDE cable on the channel.

Electro 07-02-2009 08:43 PM

The performance is normal for IDE when both a hard drive and an optical drive is connected to the same channel. Both drives are fighting for attention, so one drive have to be paused in order for the other to be used. This pause is a latency penalty and nothing having to do with throughput. The rule of thumb for IDE controllers is one device per channel or categorize each channel for either hard drive only or optical drive only. If all you have is a one channel IDE controller, you can either add an IDE controller or use SATA controller that I assume you have. You can use SATA to IDE converter, but you have to edit /etc/fstab for the drive changes. To make the transition easier is to set labels for each partitions and mount by labels. If you do change things around, Linux will always boot up in a reliable and predictable manner when using labels. Sure UUID could be used but not all file systems support it.

Hard drives barely reaches 66 megabytes per second. They average around 30 megabytes per second. UDMA-33 or UDMA-66 is plenty. All the need and want for UDMA-133 or SATA 300 for hard drives is just about stupidity.

GrapefruiTgirl 07-02-2009 09:14 PM

Some HDD stuff, from Wikipedia and TechARP
 
Quote:

Originally Posted by Electro (Post 3594996)
..Hard drives barely reaches 66 megabytes per second. They average around 30 megabytes per second. UDMA-33 or UDMA-66 is plenty. All the need and want for UDMA-133 or SATA 300 for hard drives is just about stupidity.

While this was entirely true a few years ago (not the 'stupidity' part), and is still often true for mobile HDD's and lower end or older desktop HDD's, it soon will not be true at all.

Look here for a tiny idea of what some HDD's can do:
http://www.techarp.com/showarticle.a...tno=511&pgno=3

Also, for everyone's reference (including my own):
Quote:

Originally Posted by http://en.wikipedia.org/wiki/Parallel_ATA
"Lowest speed"

It is a common misconception that, if two devices of different speed capabilities are on the same cable, both devices' data transfers will be constrained to the speed of the slower device.

For all modern ATA host adapters this is not true, as modern ATA host adapters support independent device timing. This allows each device on the cable to transfer data at its own best speed. Even with older adapters without independent timing, this effect only applies to the data transfer phase of a read or write operation. This is usually the shortest part of a complete read or write operation.

"One operation at a time"

This is caused by the omission of both overlapped and queued feature sets from most parallel ATA products. Only one device on a cable can perform a read or write operation at one time, therefore a fast device on the same cable as a slow device under heavy use will find it has to wait for the slow device to complete its task first.

However, most modern devices will report write operations as complete once the data is stored in its onboard cache memory, before the data is written to the (slow) magnetic storage. This allows commands to be sent to the other device on the cable, reducing the impact of the "one operation at a time" limit.

The impact of this on a system's performance depends on the application. For example, when copying data from an optical drive to a hard drive (such as during software installation), this effect probably doesn't matter: Such jobs are necessarily limited by the speed of the optical drive no matter where it is. But if the hard drive in question is also expected to provide good throughput for other tasks at the same time, it probably should not be on the same cable as the optical drive.


jay73 07-02-2009 09:52 PM

Please please I want cheaper SSDs now :D

golgo 07-02-2009 10:28 PM

thank you...well i aready have it as a master and it still the same...so if i change the cable it wont go faster right??

GrapefruiTgirl 07-02-2009 10:44 PM

No, if it's wired correctly, and the jumpers are set appropriately, it will not go faster unfortunately.
Did you check the other points and stuff that has been mentioned earlier? Such as the BIOS, the hdparm tool, etc?
If you've checked everything, then there's not much more to do!

Sasha

jay73 07-02-2009 11:13 PM

You can always get a PCI IDE card, they shouldn't cost too much (they are getting rare, though, so you may need to look around a bit). Or a PCI Sata controller card, many of them have both IDE and Sata (I still have a Promise Trax something something around here that has 2 sata connectors and 1 IDE connector).

Electro 07-03-2009 02:07 PM

Quote:

Originally Posted by GrapefruiTgirl (Post 3595011)
While this was entirely true a few years ago (not the 'stupidity' part), and is still often true for mobile HDD's and lower end or older desktop HDD's, it soon will not be true at all.

Benchmarks do not relate to real world setups. Benchmarks only show the ideal performance. Even the best hard drives such as Western Digital VelociRaptor will have the same flaws as any hard drive when ~90% of its capacity is full although this hard drive requires additional system resources. This means high performance and past hard drives still comes out the same at the end.

FYI, golgo is having problems with latency not with throughput. Performance is affected by latency more than throughput. When two different IDE drives are used on the same channel, latency gets penalized. The hard drive has an average latency of 15 to 30 millisecond and an optical drives has an average latency of 300 millisecond and higher. Since IDE devices takes turns, these drives will cause the computer to wait if the computer requires access to a drive that is paused during the transmission of data from the other device.

It will always be true even with pathetic SSD.

The following is the reason why SSD are pathetic.

1) Power problems can and will cause data corruption and/or data loss
2) Data corruption is several times higher than regular hard drives
3) Limited amount of writes.
4) The oldest data can not be any older than 10 years and this depends on quality of non-volatile memory used.
5) Data recovery is not a possibility

golgo 07-03-2009 04:22 PM

so thats why my computer is slowing down??well from my point of view i should really buy the adapter right or im wrong?

NeddySeagoon 07-03-2009 04:32 PM

golgo,

It should all work well. Setting DMA in the BIOS does not do a great deal for Linux. The kernel will do it s own thing.

Please post the output of
Code:

hdparm /dev/hda
hdparm /dev/hdb

This will tell how the kernel is controlling your IDE chipset.

As has been said, old IDE controllers run both devices at the speed of the slowest device but that has not been true for years now. Each device will operate at its own speed.

Oh, you may need to put sudo in front of those commands.

I suspect the kernel has wrongly identified your chip set and is using the generic IDE driver, which does not support DMA.

golgo 07-03-2009 09:24 PM

daniel@daniel-desktop:~$ hdparm /dev/hda
/dev/hda: No such file or directory
daniel@daniel-desktop:~$ hdparm /dev/hdb
/dev/hdb: No such file or directory
daniel@daniel-desktop:~$ sudo hdparm /dev/hdb
/dev/hdb: No such file or directory
daniel@daniel-desktop:~$ sudo hdparm /dev/hda
/dev/hda: No such file or directory
daniel@daniel-desktop:~

NeddySeagoon 07-04-2009 07:16 AM

golgo,

Thats good. It shows that your kernel is using the libata drivers and your hard drive is called /dev/sda.
SCSI does not permit DMA to be off - even when its a PATA device being driven under the kernel SCSI layer.

A few more things to check.
In your BIOS, you may have options for different modes for the disk drive controller, labels vary. IDE or Legacy is bad AHCI is good. Changing this can make it impossible to boot if you don't have the correct kernel support.

There is a kernel bug that affects some 64 bit users and not others. It involves excessive I/O wait.
Run top, press (numeral) 1 to see each core load separately and trigger the problem.
Code:

top - 13:12:33 up 51 min,  2 users,  load average: 2.24, 2.25, 2.12
Tasks: 139 total,  1 running, 138 sleeping,  0 stopped,  0 zombie
Cpu0  :  0.7%us,  2.0%sy,  0.0%ni, 57.1%id, 40.3%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  :  0.6%us,  1.3%sy,  0.0%ni, 70.1%id, 28.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  :  0.3%us,  1.9%sy,  0.0%ni, 97.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  8176688k total,  881288k used,  7295400k free,  183264k buffers
Swap:  2088416k total,        0k used,  2088416k free,  322500k cached

look at the %wa figures.
Is from my PhenomII three core system.

golgo 07-04-2009 11:25 AM

top - 09:24:46 up 13 min, 2 users, load average: 0.53, 0.34, 0.25
Tasks: 166 total, 1 running, 165 sleeping, 0 stopped, 0 zombie
Cpu0 : 3.3%us, 1.7%sy, 0.0%ni, 95.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu1 : 0.0%us, 0.3%sy, 0.0%ni, 96.4%id, 3.3%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu3 : 16.2%us, 3.6%sy, 0.0%ni, 79.9%id, 0.0%wa, 0.3%hi, 0.0%si, 0.0%st
Mem: 1777024k total, 805984k used, 971040k free, 19992k buffers
Swap: 4803392k total, 0k used, 4803392k free, 308112k cached

Electro 07-04-2009 02:21 PM

NeddySeagoon, You are not helping golgo because golgo's setup is the following for one IDE channel.

Master: Hard drive
Slave: DVD/Optical Drive

The problem is latency. The delays is caused by latency of the optical drive during use which can be in seconds.

On any setup that I have, IDE shows its flaws when using a hard drive and an optical on the same channel. If each IDE channel is categorized as hard drive only or optical drive only, latency will not show as much.

Checking for DMA will not help because it automatically is set unless the drive is listed in the blacklist. Using SCSI for IDE makes things even worst because latency is increased during translating SCSI to IDE and IDE to SCSI. If the controller went from DMA to PIO settings and it is behind a SCSI layer, re-activating DMA is more work. AHCI will not help because it is not mature as IDE or SCSI, so performance will suffer. AHCI is not better because it is not matured enough, so I recommend using AHCI as the last resort or when there is no modules (drivers) yet for the storage controller. For a AMD Phenom or AM2+ or AM3 board, both ITE and JMicron storage controllers are supported.

The best way to fix the problem is using an SATA to IDE converter because the problem is a hardware limitation of IDE. Software can only do so much until it hits a wall.

golgo 07-04-2009 02:59 PM

so i should really buy the sata to ide converter if i dont want my pc to be slow????yea i have ECS BLACK SERIES A780GM-A AM2+/AM2 AMD 780G HDMI ATX AMD Motherboard, AMD Phenom 9600 Agena 2.3GHz 4 x 512KB L2 Cache 2MB L3 Cache Socket AM2+ 95W Quad-Core Processor with 2GB of ram im planing on buying another 2GB of ram would that help my pc not to be slow??

onebuck 07-04-2009 03:38 PM

Hi,

You need to re-read what has been stated. 'Electro' gave you some good advice relative to latency on the ide channel. Sure more memory won't hurt but you are still going to have a problem with just having a single channel ide. That's one of the reason it's great to have at least two channels of ide if that is your hardware configuration. The hdd on the same channel as the optical will continue to present problems for you.

So, solution would be to move your OS off the ide0 channel. Either with a converter or adding a SATA hdd to your SATA. Then moving or coping from the ide hdd to the new SATA.

BTW, while doing this don't listen to your rock on the optical drive. :)

NeddySeagoon 07-05-2009 08:16 AM

Electro,

Latency is only an issue when both the optical and hard drive are used at the same time. As you say, commands in the same IDE bus may not be overlapped. Provided the optical drive is not used, there should be no speed/latency penalty associated with just having it attached to the cable.

We know from golgos post number 26, that both drives use the SCSI/libata drivers as /dev/hda and /dev/hdb are both missing. This implies that DMA is always on. There is no SCSI/IDE translation in this process, its not like the old ide-scsi driver that used to be needed for burning under 2.2 and 2.4 kernels.

I have heard anacdotal evidence that the old IDE driver branch is better that libata for ATA drives but testing that is a kernel rebuild. Its not likely to fix this issue either.

golgo,

Some further tests.
Is your system slow when you do not use the CDROM drive ?
If so, disconnect it from the IDE data cable and test again.
If your system is still slow, reboot it and post the output of
Code:

dmesg

golgo 07-07-2009 05:07 PM

thank you for your support and now that i reinstall ubuntu and i just have the HDD on the ide cable it runs fine
thank you guys!


All times are GMT -5. The time now is 09:07 PM.