mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: vatsa@in.ibm.com
Cc: Ingo Molnar <mingo@elte.hu>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Sam Vilain <sam@vilain.net>,
	linux-kernel@vger.kernel.org, Kirill Korotaev <dev@openvz.org>,
	Balbir Singh <balbir@in.ibm.com>,
	sekharan@us.ibm.com, Andrew Morton <akpm@osdl.org>,
	nagar@watson.ibm.com, matthltc@us.ibm.com, dipankar@in.ibm.com
Subject: Re: [PATCH 7/7] CPU controller V1 - (temporary) cpuset interface
Date: Tue, 22 Aug 2006 11:10:36 +0000	[thread overview]
Message-ID: <1156245036.6482.16.camel@Homer.simpson.net> (raw)
In-Reply-To: <20060820174839.GH13917@in.ibm.com>

On Sun, 2006-08-20 at 23:18 +0530, Srivatsa Vaddagiri wrote:

> As an example, follow these steps to create metered cpusets:
> 
> 
> 	# cd /dev
> 	# mkdir cpuset
> 	# mount -t cpuset cpuset cpuset
> 	# cd cpuset
> 	# mkdir grp_a
> 	# cd grp_a
> 	# /bin/echo "6-7" > cpus	# assign CPUs 6,7 for this cpuset
> 	# /bin/echo 0 > mems		# assign node 0 for this cpuset
> 	# /bin/echo 1 > cpu_exclusive
> 	# /bin/echo 1 > meter_cpu
> 
> 	# mkdir very_imp_grp
> 	# Assign 80% bandwidth to this group
> 	# /bin/echo 80 > very_imp_grp/cpu_quota
> 
> 	# echo $apache_webserver_pid > very_imp_grp/tasks
> 
> 	# mkdir less_imp_grp
> 	# Assign 5% bandwidth to this group
> 	# /bin/echo 5 > less_imp_grp/cpu_quota
> 
> 	# echo $mozilla_browser_pid > less_imp_grp/tasks

Doesn't seem to work here, but maybe I'm doing something wrong.

I set up cpuset "all" containing cpu 0-1 (all, 1.something cpus I have;)
exactly as you created grp_a.  I then creaded sub-groups mikeg and root,
and gave them 20% and 80% sub-group/cpu_quota respectively, and plunked
one shell in mikeg/tasks, and two in root/tasks.

In each root shell, I started a proggy that munches ~80% cpu.

top - 10:51:12 up 32 min, 10 users,  load average: 2.00, 2.81, 2.69
Tasks: 114 total,   3 running, 111 sleeping,   0 stopped,   0 zombie
Cpu(s): 79.7% us,  0.0% sy,  0.0% ni, 20.3% id,  0.0% wa,  0.0% hi,  0.0% si

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 6503 root      15   0  1368  276  228 S   79  0.0   0:31.03 f
 6504 root      15   0  1368  280  228 R   78  0.0   0:29.17 f

I then add the same to the mikeg shell.

top - 10:54:37 up 35 min, 10 users,  load average: 3.80, 2.95, 2.74
Tasks: 115 total,   6 running, 109 sleeping,   0 stopped,   0 zombie
Cpu(s): 94.7% us,  0.5% sy,  0.0% ni,  4.8% id,  0.0% wa,  0.0% hi,  0.0% si

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 6503 root      15   0  1368  276  228 S   65  0.0   3:12.86 f
 6505 mikeg     15   0  1368  276  228 R   64  0.0   0:11.77 f
 6504 root      16   0  1368  280  228 R   59  0.0   3:10.58 f

If I add a third to root, the percentages go to roughly 50% per.

	-Mike


  parent reply	other threads:[~2006-08-22  9:02 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-20 17:40 [PATCH 0/7] CPU controller - V1 Srivatsa Vaddagiri
2006-08-20 17:41 ` [PATCH 1/7] CPU controller V1 - split runqueue Srivatsa Vaddagiri
2006-08-25 12:38   ` Kirill Korotaev
2006-08-28  3:33     ` Srivatsa Vaddagiri
2006-08-28  8:15       ` Kirill Korotaev
2006-08-28 11:03         ` Srivatsa Vaddagiri
2006-08-28 12:31           ` Nick Piggin
2006-08-28 12:52             ` Srivatsa Vaddagiri
2006-08-20 17:42 ` [PATCH 2/7] CPU controller V1 - define group operations Srivatsa Vaddagiri
2006-08-20 17:44 ` [PATCH 3/7] CPU controller V1 - deal with movement of tasks Srivatsa Vaddagiri
2006-08-20 17:45 ` [PATCH 4/7] CPU controller V1 - Handle dont care groups Srivatsa Vaddagiri
2006-08-20 17:46 ` [PATCH 5/7] CPU controller V1 - Extend smpnice to be task-group aware Srivatsa Vaddagiri
2006-08-20 17:47 ` [PATCH 6/7] CPU controller V1 - task_cpu(p) needs to be correct always Srivatsa Vaddagiri
2006-08-20 17:48 ` [PATCH 7/7] CPU controller V1 - (temporary) cpuset interface Srivatsa Vaddagiri
2006-08-20 20:48   ` Paul Jackson
2006-08-21 17:49     ` Srivatsa Vaddagiri
2006-08-28  1:50       ` Paul Jackson
2006-08-22 11:10   ` Mike Galbraith [this message]
2006-08-22 10:10     ` Srivatsa Vaddagiri
2006-08-22 14:41       ` Mike Galbraith
2006-08-22 15:23         ` Mike Galbraith
2006-08-22 14:01           ` Srivatsa Vaddagiri
2006-08-22 18:01             ` Mike Galbraith
2006-08-22 15:58               ` Srivatsa Vaddagiri
2006-08-22 18:55               ` Paul Jackson
2006-08-22 15:45           ` Mike Galbraith
2006-08-22 13:50             ` Srivatsa Vaddagiri
2006-08-22 18:05               ` Mike Galbraith
2006-08-22 16:02                 ` Srivatsa Vaddagiri
2006-08-22 19:09                   ` Mike Galbraith
2006-08-23  9:43   ` Mike Galbraith
2006-08-23 15:24     ` Mike Galbraith
2006-08-23 13:25       ` Srivatsa Vaddagiri
2006-08-21 10:42 ` [PATCH 0/7] CPU controller - V1 Mike Galbraith
2006-08-21 12:48   ` Srivatsa Vaddagiri
2006-08-21 17:10     ` Mike Galbraith
2006-08-21 16:45       ` Srivatsa Vaddagiri
2006-08-21 20:33         ` Mike Galbraith
2006-08-21 18:36           ` Srivatsa Vaddagiri

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=1156245036.6482.16.camel@Homer.simpson.net \
    --to=efault@gmx.de \
    --cc=akpm@osdl.org \
    --cc=balbir@in.ibm.com \
    --cc=dev@openvz.org \
    --cc=dipankar@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthltc@us.ibm.com \
    --cc=mingo@elte.hu \
    --cc=nagar@watson.ibm.com \
    --cc=nickpiggin@yahoo.com.au \
    --cc=sam@vilain.net \
    --cc=sekharan@us.ibm.com \
    --cc=vatsa@in.ibm.com \
    /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

Powered by JetHome