linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kamil Kamiński" <kwb.kot-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Cgroups, burst
Date: Thu, 27 Apr 2017 11:13:22 +0200	[thread overview]
Message-ID: <CACf67ttiCBpmQEmz-MRhfJasCgs4DDLo2geCZ7i=0D2kXcY-ow@mail.gmail.com> (raw)

Hey,

Is there an easy way to burst CPU resources with cgroups when needed?
For example I want to restrict 20% of CPU per process and for example
i want to allow process to use 100% of CPU for 30 sec (burst).

I mean i want restrict CPU usage at 20% per process, not per group.
Restrict resources per group I can do this way:

echo 10000 > cpu.cfs.quota_us
echo 50000 > cpu.cfs_period_us

But I want to restrict usage per process, and if there is a
possibility to burst it.

Or maybe is there a function that will indicate when app will consume
all resources? Then I will just switch her PID to another cgroup (that
will have 100% CPU) for 30 seconds and then back to previous cgroup.

                 reply	other threads:[~2017-04-27  9:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CACf67ttiCBpmQEmz-MRhfJasCgs4DDLo2geCZ7i=0D2kXcY-ow@mail.gmail.com' \
    --to=kwb.kot-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).