The origin of the nice program name in Linux

Source: Internet
Author: User

The origin of the nice program name in Linux

The role of the nice program in Linux must be known as a-20 to 19 number to control how much time the CPU is allocated to this process. The smaller the number, the more time slices the CPU allocates, that is, the higher the priority.

As a matter of fact, when I first saw the name of this program, I had a question: why is the smaller the number, the better the running (nice?

It turns out that nice not only represents a wonderful thing, but also "friendly and kind" when describing a person. Therefore, if the nice value of a process is higher, it means that the process (anthropomorphic method) is better, the more friendly, that is, the CPU time is used by others, therefore, the priority is low. These processes should be assigned a "good person card!

The nice processes with low or even negative values are very unfriendly. they occupy a lot of CPU time slices in a selfish manner. If the CPU can be provided, they can occupy up to 99% of the CPU time! Of course, nice with negative numbers can only be used by root users, and not everyone can be so selfish!

For example, if we extract a file from the server but do not want to affect the running of WEB services, we can:

Nice-n 19 tar xf archive. tgz

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.