All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mahmood Naderan <mahmood.nt@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: CPU usage limitation (number of cores)
Date: Tue, 22 Mar 2016 13:09:42 +0430	[thread overview]
Message-ID: <CADa2P2US62K4xWSiEbM=DQ-OC1xQB15D20w3jE7hbEBEVZ4M6w@mail.gmail.com> (raw)

Hi,
There is a question about CPU usage limitation and I found no place
for my question other than here.

There are 32 cores in a system (2 cpus each 16 cores) and I want to
limit a user to use only 4 cores (100% usage for that 4 cores). There
are two kernel parameter for that according to the manuals:
cpu.cfs_quota_us and cpu.cfs_period_us

An example on the kernel.org documents says:

With 500ms period and 1000ms quota, the group
can get 2 CPUs worth of runtime every 500ms.
# echo 1000000 > cpu.cfs_quota_us /* quota = 1000ms */
# echo 500000 > cpu.cfs_period_us /* period = 500ms */


I want to know how those ms are determined? In my case, I think the
quota is 32000000 and the period is 4000000. Am I right?
But it doesn't work! and I get an error when I want to start cgroup service



Failed to parse /etc/cgconfig.conf or /etc/cgconfig.d
[FAILED]Starting cgconfig service: /sbin/cgconfigparser; error loading
/etc/cgconfig.conf: Failed to remove a non-empty group



Reference:
https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt




Regards,
Mahmood

             reply	other threads:[~2016-03-22  8:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22  8:39 Mahmood Naderan [this message]
2016-03-22 11:50 ` CPU usage limitation (number of cores) Mahmood Naderan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADa2P2US62K4xWSiEbM=DQ-OC1xQB15D20w3jE7hbEBEVZ4M6w@mail.gmail.com' \
    --to=mahmood.nt@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.