Skip to content

Instantly share code, notes, and snippets.

@devdetonator
Created October 9, 2018 10:23
Show Gist options
  • Save devdetonator/af1721687be88a71d7bed6af21d883fd to your computer and use it in GitHub Desktop.
Save devdetonator/af1721687be88a71d7bed6af21d883fd to your computer and use it in GitHub Desktop.
Note: Linux IO scheduler
Check Your I/O Scheduler
If you are using SSDs, make sure your OS I/O scheduler is configured correctly. When you write data to disk, the I/O scheduler decides when that data is actually sent to the disk. The default under most *nix distributions is a scheduler called cfq (Completely Fair Queuing).
This scheduler allocates time slices to each process, and then optimizes the delivery of these various queues to the disk. It is optimized for spinning media: the nature of rotating platters means it is more efficient to write data to disk based on physical layout.
This is inefficient for SSD, however, since there are no spinning platters involved. Instead, deadline or noop should be used instead. The deadline scheduler optimizes based on how long writes have been pending, while noop is just a simple FIFO queue.
This simple change can have dramatic impacts. We’ve seen a 500-fold improvement to write throughput just by using the correct scheduler.
Link: https://www.elastic.co/guide/en/elasticsearch/guide/2.x/hardware.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment