Linux How To Disable SATA NCQ For Better Performance

This is the closest way to disabling it without using the "libata.force=noncq" kernel boot option is to set the queue to a depth of 1 which doesn't actually disable it.

Change the sdc below to match the device you want to disable NCQ for.

[root@officebox ~]# echo "1" > /sys/block/sdc/device/queue_depth

Errors that indicate you are having a performance issue are these in messages or dmesg relating to NCQ and SATA bus timeout and reset are killing your IO performance!

 

Apr 12 12:12:50 officebox kernel: ata8: EH in SWNCQ mode,QC:qc_active 0x400FFFFF sactive 0x400FFFFF
Apr 12 12:12:50 officebox kernel: ata8: SWNCQ:qc_active 0x40000007 defer_bits 0xFFFF8 last_issue_tag 0x2
Apr 12 12:12:50 officebox kernel:  dhfis 0x40000003 dmafis 0x40000008 sdbfis 0x0
Apr 12 12:12:50 officebox kernel: ata8: ATA_REG 0x51 ERR_REG 0x84
Apr 12 12:12:50 officebox kernel: ata8: tag : dhfis dmafis sdbfis sacitve
Apr 12 12:12:50 officebox kernel: ata8: tag 0x0: 1 0 0 1 
Apr 12 12:12:50 officebox kernel: ata8: tag 0x1: 1 0 0 1 
Apr 12 12:12:50 officebox kernel: ata8: tag 0x2: 0 0 0 1 
Apr 12 12:12:50 officebox kernel: ata8: tag 0x1e: 1 1 0 1 
Apr 12 12:12:50 officebox kernel: ata8.00: exception Emask 0x1 SAct 0x400fffff SErr 0x0 action 0x6 frozen
Apr 12 12:12:50 officebox kernel: ata8.00: Ata error. fis:0x21
Apr 12 12:12:50 officebox kernel: ata8.00: failed command: WRITE FPDMA QUEUED
Apr 12 12:12:50 officebox kernel: ata8.00: cmd 61/08:00:bf:83:8b/00:00:02:00:00/40 tag 0 ncq 4096 out
Apr 12 12:12:50 officebox kernel:         res 51/84:10:d7:83:8b/84:00:02:00:00/40 Emask 0x10 (ATA bus error)
Apr 12 12:12:50 officebox kernel: ata8.00: status: { DRDY ERR }
Apr 12 12:12:50 officebox kernel: ata8.00: error: { ICRC ABRT }
Apr 12 12:12:50 officebox kernel: ata8.00: failed command: WRITE FPDMA QUEUED
Apr 12 12:12:50 officebox kernel: ata8.00: cmd 61/10:08:c7:83:8b/00:00:02:00:00/40 tag 1 ncq 8192 out
Apr 12 12:12:50 officebox kernel:         res 51/84:10:d7:83:8b/84:00:02:00:00/40 Emask 0x10 (ATA bus error)
Apr 12 12:12:50 officebox kernel: ata8.00: status: { DRDY ERR }
Apr 12 12:12:50 officebox kernel: ata8.00: error: { ICRC ABRT }
Apr 12 12:12:50 officebox kernel: ata8.00: failed command: WRITE FPDMA QUEUED
Apr 12 12:12:50 officebox kernel: ata8.00: cmd 61/18:10:d7:83:8b/00:00:02:00:00/40 tag 2 ncq 12288 out
Apr 12 12:12:50 officebox kernel:         res 51/84:10:d7:83:8b/84:00:02:00:00/40 Emask 0x10 (ATA bus error)
Apr 12 12:12:50 officebox kernel: ata8.00: status: { DRDY ERR }
Apr 12 12:12:50 officebox kernel: ata8.00: error: { ICRC ABRT }
Apr 12 12:12:50 officebox kernel: ata8.00: failed command: WRITE FPDMA QUEUED
Apr 12 12:12:50 officebox kernel: ata8.00: cmd 61/10:18:ef:83:8b/00:00:02:00:00/40 tag 3 ncq 8192 out
Apr 12 12:12:50 officebox kernel:         res 51/84:10:d7:83:8b/84:00:02:00:00/40 Emask 0x10 (ATA bus error)

:
 


Tags:

linux, disable, sata, ncq, performancethis, disabling, quot, libata, noncq, kernel, queue, depth, doesn, sdc, officebox, echo, sys, queue_depth, errors, indicate, dmesg, relating, timeout, reset, io, apr, ata, swncq, mode, qc, qc_active, fffff, sactive, defer_bits, xffff, last_issue_tag, dhfis, dmafis, sdbfis, ata_reg, err_reg, sacitve, exception, emask, sact, serr, fis, fpdma, queued, cmd, bf, res, drdy, err, icrc, abrt, ef,

Latest Articles

  • How high can a Xeon CPU get?
  • bash fix PATH environment variable "command not found" solution
  • Ubuntu Linux Mint Debian Redhat Youtube Cannot Play HD or 4K videos, dropped frames or high CPU usage with Nvidia or AMD Driver
  • hostapd example configuration for high speed AC on 5GHz using WPA2
  • hostapd how to enable and use WPS to connect wireless devices like printers
  • Dell Server Workstation iDRAC Dead after Firmware Update Solution R720, R320, R730
  • Cloned VM/Server/Computer in Linux won't boot and goes to initramfs busybox Solution
  • How To Add Windows 7 8 10 11 to GRUB Boot List Dual Booting
  • How to configure OpenDKIM on Linux with Postfix and setup bind zonefile
  • Debian Ubuntu 10/11/12 Linux how to get tftpd-hpa server setup tutorial
  • efibootmgr: option requires an argument -- 'd' efibootmgr version 15 grub-install.real: error: efibootmgr failed to register the boot entry: Operation not permitted.
  • Apache Error Won't start SSL Cert Issue Solution Unable to configure verify locations for client authentication SSL Library Error: 151441510 error:0906D066:PEM routines:PEM_read_bio:bad end line SSL Library Error: 185090057 error:0B084009:x509 certif
  • Linux Debian Mint Ubuntu Bridge br0 gets random IP
  • redis requirements
  • How to kill a docker swarm
  • docker swarm silly issues
  • isc-dhcp-server dhcpd how to get longer lease
  • nvidia cannot resume from sleep Comm: nvidia-sleep.sh Tainted: Linux Ubuntu Mint Debian
  • zfs and LUKS how to recover in Linux
  • [error] (28)No space left on device: Cannot create SSLMutex Apache Solution Linux CentOS Ubuntu Debian Mint