Translated message

A translation of this page exists in English.

如何使用 cgroups 限制 CPU 的利用率?

Solution In Progress - Updated -

Issue

  • 一个进程消耗了 100% 的 CPU 资源,如何使用 cgroups 对其进行限制?

    # dd if=/dev/zero of=/dev/null
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
     1549 root      20   0  102m  652  548 R 100.0  0.0   0:08.24 dd    
    

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content