18c2ecf20Sopenharmony_ci=================== 28c2ecf20Sopenharmony_ciSwitching Scheduler 38c2ecf20Sopenharmony_ci=================== 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ciEach io queue has a set of io scheduler tunables associated with it. These 68c2ecf20Sopenharmony_citunables control how the io scheduler works. You can find these entries 78c2ecf20Sopenharmony_ciin:: 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci /sys/block/<device>/queue/iosched 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ciassuming that you have sysfs mounted on /sys. If you don't have sysfs mounted, 128c2ecf20Sopenharmony_ciyou can do so by typing:: 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci # mount none /sys -t sysfs 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciIt is possible to change the IO scheduler for a given block device on 178c2ecf20Sopenharmony_cithe fly to select one of mq-deadline, none, bfq, or kyber schedulers - 188c2ecf20Sopenharmony_ciwhich can improve that device's throughput. 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciTo set a specific scheduler, simply do this:: 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci echo SCHEDNAME > /sys/block/DEV/queue/scheduler 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciwhere SCHEDNAME is the name of a defined IO scheduler, and DEV is the 258c2ecf20Sopenharmony_cidevice name (hda, hdb, sga, or whatever you happen to have). 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciThe list of defined schedulers can be found by simply doing 288c2ecf20Sopenharmony_cia "cat /sys/block/DEV/queue/scheduler" - the list of valid names 298c2ecf20Sopenharmony_ciwill be displayed, with the currently selected scheduler in brackets:: 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci # cat /sys/block/sda/queue/scheduler 328c2ecf20Sopenharmony_ci [mq-deadline] kyber bfq none 338c2ecf20Sopenharmony_ci # echo none >/sys/block/sda/queue/scheduler 348c2ecf20Sopenharmony_ci # cat /sys/block/sda/queue/scheduler 358c2ecf20Sopenharmony_ci [none] mq-deadline kyber bfq 36