Skip to content

Instantly share code, notes, and snippets.

@mowings
Created June 24, 2019 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mowings/70498f314295657e96c4d17e27f18ef2 to your computer and use it in GitHub Desktop.
Save mowings/70498f314295657e96c4d17e27f18ef2 to your computer and use it in GitHub Desktop.
Disable NCQ (disk command queuing in linux)

There is a kernel option to do this, if it cauxes boot issues, but otherwise in /etc/rc.local you can just add

echo 1 > /sys/block/sdb/device/queue_depth

Normally the kernel disables it after too many errors automatically, but it can cause disk timeouts until that happens. Does not have much of a performance impact on ssds.

@attila-lendvai
Copy link

it has a major performance impact on random access, small read/write performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment