New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

DMA activated on bubba?

Got problems with Bubba? Then this forum is for you.
Locked
limpo
Posts: 59
Joined: 24 Mar 2007, 06:50

DMA activated on bubba?

Post by limpo »

Hi,

I am just wondering if dma is activated or not on bubba as default, if not why? and how could you do that. Will it not give you a speed improvment?


/Limpo
limpo
Posts: 59
Joined: 24 Mar 2007, 06:50

Post by limpo »

Hi,

I found this info, and tested it but I cant get dma to activate properly is there someone else who has gotten this to work?

Hard disk access optimization.

First I run the following to see current speed of /dev/hda
hdparm -tT /dev/hda to test disk access speed.

This changes the settings for /dev/hda (be warned if the settings are wrong you wont be able to access bubba, then you have to restart.)

hdparm -q -c3 -d1 -u1 -m16 /dev/hda to speed up a modern IDE system. (It may be dangerous.)

-q =quiet the next option
-c3= get/set IDE 32-bit IO setting
-d1= set dma
-u1=get/set unmaskirq flag (0/1)
-u16=get/set multiple sector count

/limpo
pa
Posts: 308
Joined: 06 Dec 2006, 04:38
Location: Sweden
Contact:

Post by pa »

Unfortunately there is very little DMA support in the cpu, only from inbuilt periferals to memory (and the other way around). Anything else added will have to do without DMA support.
As there is no IDE controller in the chip, software has to handle this and the disc is connected to the memory bus of the cpu. As mentioned above DMA support is only between peripheral and memory, not memory to memory which would be the case in the disc case.

/PA
limpo
Posts: 59
Joined: 24 Mar 2007, 06:50

Post by limpo »

Default:

The default setting on bubba.
bubba:/# hdparm /dev/hda

/dev/hda:
multcount = 0 (off)
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 16383/255/63, sectors = 156301488, start = 0


Disc read test 3X /dev/hda in normal/default settings.

hdparm -tT /dev/hda

1x =/dev/hda:
Timing cached reads: 236 MB in 2.01 seconds = 117.39 MB/sec
Timing buffered disk reads: 16 MB in 3.08 seconds = 5.19 MB/sec

2X =/dev/hda:
Timing cached reads: 240 MB in 2.01 seconds = 119.48 MB/sec
Timing buffered disk reads: 22 MB in 3.15 seconds = 6.99 MB/sec

3x =/dev/hda:
Timing cached reads: 244 MB in 2.03 seconds = 120.23 MB/sec
Timing buffered disk reads: 24 MB in 3.20 seconds = 7.51 MB/sec


UNMASK-IRQ:

Turning this on will allow Linux to unmask other interrupts while processing a disk interrupt.
What does that mean? It lets Linux attend to other interrupt-related tasks (i.e., network traffic)
while waiting for your disk to return with the data it asked for.
It should improve overall system response time, but be warned: Not all hardware configurations will be able to handle it.

Activating unmask-irq on /dev/hda.
bubba#hdparm -u1 /dev/hda

/dev/hda:
multcount = 0 (off)
IO_support = 0 (default 16-bit)
unmaskirq = 1 (on)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 16383/255/63, sectors = 156301488, start = 0


Disc read test 3X /dev/hda in with unmask-irq setting.

1x = /dev/hda:
Timing cached reads: 240 MB in 2.01 seconds = 119.21 MB/sec
Timing buffered disk reads: 20 MB in 3.09 seconds = 6.47 MB/sec

2x = /dev/hda:
Timing cached reads: 240 MB in 2.02 seconds = 118.57 MB/sec
Timing buffered disk reads: 20 MB in 3.02 seconds = 6.61 MB/sec

3x = /dev/hda:
Timing cached reads: 240 MB in 2.01 seconds = 119.13 MB/sec
Timing buffered disk reads: 22 MB in 3.14 seconds = 7.01 MB/sec


multicount:

Short for multiple sector count. This controls how many sectors are fetched from the disk
in a single I/O interrupt. Almost all modern IDE drives support this.
The man page claims:
When this feature is enabled, it typically reduces operating system overhead for disk I/O by 30-50%.
On many systems, it also provides increased data throughput of anywhere from 5% to 50%.

bubba#hdparm -m1 /dev/hda

/dev/hda:
multcount = 1 (on)
IO_support = 0 (default 16-bit)
unmaskirq = 1 (on)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
geometry = 16383/255/63, sectors = 156301488, start = 0

Disc read test 3X /dev/hda in with multicount setting.

1x = /dev/hda:
Timing cached reads: 240 MB in 2.02 seconds = 118.68 MB/sec
Timing buffered disk reads: 16 MB in 3.12 seconds = 5.12 MB/sec

2x = /dev/hda:
Timing cached reads: 240 MB in 2.02 seconds = 118.74 MB/sec
Timing buffered disk reads: 22 MB in 3.03 seconds = 7.26 MB/sec

3x = /dev/hda:
Timing cached reads: 240 MB in 2.01 seconds = 119.60 MB/sec
Timing buffered disk reads: 22 MB in 3.11 seconds = 7.07 MB/sec


Summary:

Default:
After running all these tests, the best speed increase is 24 MB in 3.20 seconds.

unmask-irq:
After running all these tests, the best speed increase is 20 MB in 3.02 seconds.

multicount:
After running all these tests, the best speed increase is 22 MB in 3.03 seconds.

Why wont unmask-irq or multicount give extra speed?

/Limpo
Locked