Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to change the Linux I Dot O Scheduler to adjust performance

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to change the Linux I-beat O scheduler to adjust the performance". The explanation in the article is simple and clear, easy to learn and understand. Please follow the editor's train of thought to study and learn "how to change the Linux I-G O scheduler to adjust the performance".

In order to extract as much performance as possible from the Linux server, learn how to change the Imax O scheduler to meet your needs. The Linux Linux O scheduler scheduler controls how the kernel submits read and write requests to disk. Since the 2.6 kernel, administrators have been able to change the scheduler, so they can customize their platform to fully suit their needs.

There are three schedulers to choose from, and each scheduler has its own advantages. These schedulers are:

CFQ (Completely Fair Scheduler full Fair Scheduler) (cfq): it is the default scheduler for many Linux distributions; it puts synchronization requests submitted by processes into multiple process queues and then allocates time slices to each queue to access disk.

Noop Scheduler (noop): the simplest Imax O scheduler in the Linux kernel based on the concept of first-in first-out (FIFO) queues. This scheduler is best suited for SSD.

Deadline Scheduler (deadline): attempts to guarantee the start service time of the request.

This may be one of the things you need to do when you want your Linux machine to perform. Fortunately, it is very easy to change the Ithumb O scheduler. Let me tell you what to do.

Find out what dispatcher you have.

The only thing you need to do is to find out which scheduler is dealing with Icano on your system. This is done from the command line, and you must know the name of the disk. For simplicity, I assume that the disk is sda. Based on this information, open the terminal window and enter the following command:

Cat / sys/block/sda/queue/scheduler

The result of this command shows the currently running scheduler (below).

Elementary OS Loki runs deadline Scheduler.

Change your scheduler

You can change your scheduler in two ways: instantly or *. If you change the scheduler immediately, it will revert to the previous default scheduler after reboot. You may want to make immediate changes first to see which scheduler can bring performance to your needs.

Speaking of which, you need to change to the noop scheduler immediately. To do this, enter the following command:

Sudo echo noop > / sys/block/hda/queue/scheduler

You can change noop to cfq or deadline.

This change can take effect without restarting the computer. Once changed, the Imax O scheduler will switch, (hopefully) you can see performance improvement (again, depending on your needs).

If you want to change the scheduler to *, you must do this in the GRUB configuration file. To do this, type sudo nano / etc/default/grub, and then modify the following line:

GRUB_CMDLINE_LINUX_DEFAULT= "quiet splash"

To

GRUB_CMDLINE_LINUX_DEFAULT= "quiet splash elevator=noop"

Similarly, you can change the noop to any scheduler you need. If you are using immediate changes, you do not have to restart for the new scheduler to take effect.

These are the ways to modify the scheduler.

Thank you for your reading, the above is the content of "how to change the Linux Imax O scheduler to adjust the performance". After the study of this article, I believe you have a deeper understanding of how to change the Linux Imax O scheduler to adjust the performance, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report