FedoraForum.org - Fedora Support Forums and Community
Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Age
    47
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    NCQ: how do I tell if its on / turning it on

    I am running a Gigabyte GA965P-S3 with 3x SATA drives, all NCQ capable. BIOS settings for the Intel ICH8/Jmicron363 controllers is in AHCI mode.

    When I boot up I get lines like this suggesting that I do have NCQ and fedora sees it

    ata1: SATA max UDMA/133 cmd 0xB400 ctl 0xB802 bmdma 0xC400 irq 17
    ata2: SATA max UDMA/133 cmd 0xBC00 ctl 0xC002 bmdma 0xC408 irq 17
    scsi0 : ata_piix
    ata1.00: ATA-7, max UDMA/133, 625140335 sectors: LBA48 NCQ (depth 0/32)
    ata1.00: ata1: dev 0 multi count 16
    ata1.00: configured for UDMA/133
    scsi1 : ata_piix
    ata2.00: ATA-7, max UDMA/133, 625142448 sectors: LBA48 NCQ (depth 0/32)
    ata2.00: ata2: dev 0 multi count 16
    ata2.00: configured for UDMA/133
    scsi 0:0:0:0: Direct-Access ATA ST3320620AS 3.AA PQ: 0 ANSI: 5
    SCSI device sda: 625140335 512-byte hdwr sectors (320072 MB)
    sda: Write Protect is off
    sda: Mode Sense: 00 3a 00 00
    SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    SCSI device sda: 625140335 512-byte hdwr sectors (320072 MB)
    sda: Write Protect is off
    sda: Mode Sense: 00 3a 00 00
    SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    sda: sda1
    sd 0:0:0:0: Attached scsi disk sda
    scsi 1:0:0:0: Direct-Access ATA ST3320620AS 3.AA PQ: 0 ANSI: 5
    SCSI device sdb: 625142448 512-byte hdwr sectors (320073 MB)
    sdb: Write Protect is off
    sdb: Mode Sense: 00 3a 00 00
    SCSI device sdb: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    SCSI device sdb: 625142448 512-byte hdwr sectors (320073 MB)
    sdb: Write Protect is off
    sdb: Mode Sense: 00 3a 00 00
    SCSI device sdb: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    sdb: sdb1 sdb2 sdb3 sdb4 < sdb5 >
    sd 1:0:0:0: Attached scsi disk sdb
    ata_piix 0000:00:1f.5: MAP [ P0 P2 P1 P3 ]


    HOWEVER,
    (As per this FAQ from the libata homepage: http://linux-ata.org/faq.html)
    When I do "cat /sys/block/sdX/device/queue_depth" I get a 1 instead of a 31 as per below article.

    QUESTIONs
    a.) Is NCQ enabled? (I'm thinking no)
    b.) since the FAQ above states my chipset is compatible AND the feature is definitely getting recognised by the OS as per the log, is it safe to enable it?
    c.) and to enable it, its "$ echo 31 > /sys/block/sdX/device/queue_depth" like the FAQ states?

    also, if I do "hdparm -I /dev/sda" I get a * next to the NCQ feature set (which means its set?)

    Thanks
    Last edited by wintermute000; 21st May 2007 at 11:30 AM.
    the phases of 'nix troubleshooting

    For :eek:
    :confused: | google > :D
    Next

  2. #2
    Join Date
    Jan 2008
    Location
    Ohio
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you are correct, that NCQ is not enabled on your machine.
    On mine entering dmesg | grep -i ncq gives
    ata1.00: 390721968 sectors, multi 8: LBA48 NCQ (depth 31/32)

    cat /sys/block/sdX/device/queue_depth
    if you get a number greater than 1 it is enabled

    enable via
    echo 31 > /sys/block/sdX/device/queue_depth
    disable via
    echo 1 > /sys/block/sdX/device/queue_depth

    apparently there is a kernel bug in dealing with ncq that is supposed to be
    fixed in 2.6.24
    :eek: vince

  3. #3
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Age
    47
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks

    Will wait till my next backup cycle then update and we'll see

    How does this affect LVM? or can you apply this transparently? Do you have to unmount partitions beforehand? thanks in advance
    the phases of 'nix troubleshooting

    For :eek:
    :confused: | google > :D
    Next

  4. #4
    Join Date
    Jan 2008
    Location
    Ohio
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What I found out is that there is a ncq black list for specific drives.
    Supposedly the black list is to be cleared in kernel 2.6.24. You might find the reason
    yours comes up disabled is because it is on the black list.
    the black list is in
    /lib/modules/2.6.23.14-107.fc8/kernel/drivers/ata/libata.ko

    you could do a
    strings libata.ko|grep -i <your model>

    I didn't find mine in the list. Previously I would notice a log of errors
    in dmesg and then the kernel would disable ncq.

    For some reason, my latest re-boot hasn't had any of the ncq errors.
    :eek: vince

  5. #5
    Join Date
    Jan 2008
    Location
    Ohio
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in /var/log/messages. I would see messages like
    Jan 23 18:36:38 lap2 kernel: ata1.00: spurious completions during NCQ issue=0x0
    SAct=0x7f9ff FIS=005040a1:00000400
    Jan 23 18:36:38 lap2 kernel: ata1.00: NCQ disabled due to excessive errors

    The last one I see was Jan 25 which is when I installed
    2.6.23.14-107.fc8
    :eek: vince

  6. #6
    Join Date
    Jan 2008
    Location
    Ohio
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, I forgot, I have no idea how this affects LVM. I don't use it.
    :eek: vince

  7. #7
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Age
    47
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll wait til the update then, I'm not having any performance complaints (its a fairly new rig, Core2Duo) so it it ain't broke
    the phases of 'nix troubleshooting

    For :eek:
    :confused: | google > :D
    Next

  8. #8
    Join Date
    Feb 2007
    Location
    European Union - Romania, Bucharest
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you also need the ahci kernel module load on boot. I've recently switched on the AHCI support on for my Gigabyte GA-P35-DS3L motherboard and I had to load ahci and sg modules for it to work properly. I've done this by including them in the initrd image that runs at startup.

    You might have another option in your bios that prevents you from running sata in native mode, doesn't hurts if you read the bios manual that came with you motherboard.
    Last edited by gala_dragos; 5th February 2008 at 01:40 PM.

Similar Threads

  1. Turning *.iso into a bootable CD
    By theAdmiral in forum Installation, Upgrades and Live Media
    Replies: 8
    Last Post: 28th February 2009, 04:35 AM
  2. Turning Off My Webcam
    By carney1979 in forum Using Fedora
    Replies: 5
    Last Post: 23rd July 2007, 02:27 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •