I was trying to enable the BFQ scheduler on my laptop running Ubuntu 19.04, because as I moved around and created some large files my computer became basically unusable. After some investigation I found the page on the BFQ scheduler and how it is meant to address these sorts of issues.
There is some instructions on StackExchange on how to do this, so what I’ve done is turn it into an Ansible playbook to make it easier to apply. Here’s the original link: https://unix.stackexchange.com/questions/375600/how-to-enable-and-use-the-bfq-scheduler/376136
Note, this playbook doesn’t edit the /etc/default/grub
file, because Ubuntu 19.04 already uses blk-mq by default. Here is the playbook:
To use the playbook, just save it somewhere and run with ansible-playbook
, then reboot. For example:
~/l/a/bfq> ls
enable_bfq_playbook.yml
~/l/a/bfq> ansible-playbook enable_bfq_playbook.yml --ask-become-pass
SUDO password:
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [localhost] *************************************************************************************************************************************
TASK [Gathering Facts] *******************************************************************************************************************************
ok: [localhost]
TASK [Enable kernel module loading] ******************************************************************************************************************
ok: [localhost]
TASK [Enable bfq by default] *************************************************************************************************************************
ok: [localhost]
PLAY RECAP *******************************************************************************************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=0
~/l/a/bfq>