LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 12-20-2004, 01:45 PM   #1
coolzero
LQ Newbie
 
Registered: Sep 2004
Posts: 12

Rep: Reputation: 0
Enabling DMA on FC2


Hi.

I've made a search on the forum and stated that enabling DMA will "make Linux faster".

Is there a tutorial on how to activate it?
Where can I see if i'm using DMA or not?

Tanks
 
Old 12-20-2004, 02:00 PM   #2
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
You use hdparm for this. man hdparm for more info (assuming it's installed). The command is going to be something like: hdparm -c 1 -d 1 -u 1 /dev/hda

replace hda with your disk letter if it's not 'a'
 
Old 12-20-2004, 02:13 PM   #3
coolzero
LQ Newbie
 
Registered: Sep 2004
Posts: 12

Original Poster
Rep: Reputation: 0
$ sudo /sbin/hdparm -c 1 -d 1 -u 1 /dev/hda

/dev/hda:
setting 32-bit IO_support flag to 1
setting unmaskirq to 1 (on)
setting using_dma to 1 (on)
IO_support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)


And now?
It's done?
 
Old 12-20-2004, 03:09 PM   #4
gandalf2041
Member
 
Registered: Jul 2003
Location: Sunny Florida, USA
Distribution: Ubuntu 6.06 LTS
Posts: 53

Rep: Reputation: 15
Yep. "hdparm -Tt" should give you your new timing. Did you take one prior to the change for comparision?
 
Old 12-20-2004, 05:36 PM   #5
coolzero
LQ Newbie
 
Registered: Sep 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Great.

I deactived DMA first just to make the benchmark...
Code:
$ sudo /sbin/hdparm -d 0 /dev/hda
 
/dev/hda:
 setting using_dma to 0 (off)
 using_dma    =  0 (off)
[czo@fedorento czo]$ sudo /sbin/hdparm -t /dev/hda
 
/dev/hda:
 Timing buffered disk reads:   20 MB in  3.28 seconds =   6.10 MB/sec
Now with it activated
Code:
$ sudo /sbin/hdparm -d 1 /dev/hda
 
/dev/hda:
 setting using_dma to 1 (on)
 using_dma    =  1 (on)
[czo@fedorento czo]$ sudo /sbin/hdparm -t /dev/hda
 
/dev/hda:
 Timing buffered disk reads:  160 MB in  3.02 seconds =  52.95 MB/sec
geeeeeeeeeeee... What a difference!!

When I reboot the DMA will be automatically activated?

Tanks

Last edited by coolzero; 12-20-2004 at 05:59 PM.
 
Old 12-20-2004, 06:13 PM   #6
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Unfortunately, no. You'll need to add the command to the end of /etc/rc.local (there are other places, but rc.local is the simplest).
 
Old 12-21-2004, 02:35 AM   #7
coolzero
LQ Newbie
 
Registered: Sep 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Tanks
 
Old 12-21-2004, 08:30 AM   #8
Belghouth
Member
 
Registered: Dec 2004
Location: Tunisia
Distribution: Redhat (Now Fedora), Mandrake, Suse, Debian.
Posts: 65

Rep: Reputation: 15
I want to activate DMA before starting services, when can I put my command?
 
Old 12-21-2004, 09:04 AM   #9
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Quote:
Originally posted by Belghouth
I want to activate DMA before starting services, when can I put my command?
Go back to the top of this thread and read all the way to the bottom. I already answered that.
 
Old 12-21-2004, 09:11 AM   #10
Belghouth
Member
 
Registered: Dec 2004
Location: Tunisia
Distribution: Redhat (Now Fedora), Mandrake, Suse, Debian.
Posts: 65

Rep: Reputation: 15
Quote:
I already answered that
I monitered this thread from its begining, but I don' find an answer
/etc/rc.local starts ofter initializing services, and me I want to start DMA BEFORE starting services.
what about /etc/rc.sysinit ?

Last edited by Belghouth; 12-21-2004 at 09:16 AM.
 
Old 12-21-2004, 11:23 AM   #11
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Quote:
Originally posted by Belghouth
I monitered this thread from its begining, but I don' find an answer
/etc/rc.local starts ofter initializing services, and me I want to start DMA BEFORE starting services.
what about /etc/rc.sysinit ?
My bad. My brain read your post faster than my eyes did.

I don't think I'd put it in rc.sysinit in the off chance that some package might update that file and wipe out your changes. If you really want to do it right, create a script to set the DMA the way you want it, and place it in (for example) /etc/init.d/setDma. Then create symlinks to it in the appropriate runlevel directories so that it gets executed before everything else, like so:
Code:
ln -s /etc/init.d/setDma /etc/rc2.d/S00setDma
ln -s /etc/init.d/setDma /etc/rc3.d/S00setDma
ln -s /etc/init.d/setDma /etc/rc5.d/S00setDma
HTH
 
Old 12-21-2004, 02:44 PM   #12
jspaar
Member
 
Registered: Feb 2004
Location: California
Posts: 99

Rep: Reputation: 15
It's likely that DMA is already enabled for your hard disk at boot time.

One way to check:
- Remove that hdparm from rc.local and reboot.
- Run this at a command line:
$ sudo hdparm /dev/hda

Look in the output for:
using_dma = 1 (on)

If it says "on", then DMA is already on for that drive automatically.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Enabling DMA - tried everything? imranakbar Linux - Hardware 2 01-18-2005 03:49 AM
Enabling DMA DeadlyMuffin Slackware 4 07-19-2004 10:24 PM
Enabling DMA with no hdparm SML Red Hat 1 02-22-2004 04:46 PM
stupid dma not enabling Gill Bates Linux - Newbie 6 11-06-2003 07:18 AM
Enabling DMA bizzikid Linux - Newbie 4 08-06-2003 06:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration