Linux Container Development
 help / color / mirror / Atom feed
From: Dhaval Giani <dhaval-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: Mukesh G <mukgbv-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Peter Zijlstra
	<a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org>,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Paul Jackson <pj-sJ/iWh9BUns@public.gmane.org>
Subject: Re: [Devel] Re: Write Error: No space left on device
Date: Tue, 28 Oct 2008 17:42:31 +0530	[thread overview]
Message-ID: <20081028121231.GA15052@linux.vnet.ibm.com> (raw)
In-Reply-To: <c7704c490810280307s141a7a18vc708049e7f499c50-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Tue, Oct 28, 2008 at 03:37:52PM +0530, Mukesh G wrote:
> Hi Dhaval,
>     Thanks for clarifying some doubts. Further to your mail and my
> understanding, I can make some conclusions
> 
> 1) Even though there is a hierarchical order for containers, the shares are
> not allocated in terms of that order i.e. If the parent container has a
> certain no of cpu.shares and more child containers. The parent and child
> containers have the same priority.
> 

No, the hierarchy is always maintained for the group scheduler. The parent
group's shares are used to see how long/when it will get scheduled with
respect to other tasks/groups at that level. As an example, if you have
a hierarchy like this

/
|-A
| |-A1
| |-A2
|
|-B
|-t1
|-t2

Let A, B have shares 1024 and t1 and t2 be tasks at nice 0. With this
setting, A, B, t1 and t2 will get equal CPU bandwidth. The tasks and
groups in A will split bandwidth available to A in a similar fashion. So
the cpu shares is not some resource which is split but it is a value which
will decide in what proportion the CPU bandwidth will be shared. So, if
you have no tasks in /, then setting the shares of A and B to 10 is the
same as setting the shares of A and B to 1000 (not exactly in terms of
load balancing, but enough for the purpose of this discussion).

> 2) For only 2 process running on a dual core system and If I have one
> process assigned to C2048 container and another process assigned to C1024
> container, I would expect the scheduler to allocate in the order of 2:1.
> Behavior 2 indicates that allocation did not happen.
> 

Well, its not possible to run one thread on more than one core at the
sametime :-). So we do not see the 2:1 usage happen.

> 3) I ran the experiment having 2 instances of multi-threaded version of java
> workload on the same system and noticed that 2:1 scenario did not repeat.
> Hence, a multi threaded code does not benefit from this kind of a scheduler.
> 

I am not sure if I have understood your question. But I think the answer
to the previous question should help.

> 4) If you have more processes than the no of cores for the cpu shares to
> work.
> 

Well, the physical limit on how much CPU a thread can hog is 100%, so
yes, if you have lesser threads than number of CPUs, you don't expect
shares to  work as expected, and each thread will get 100% CPU time.

thanks,
-- 
regards,
Dhaval

  parent reply	other threads:[~2008-10-28 12:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-05 12:41 Write Error: No space left on device Mukesh G
     [not found] ` <c7704c490809050541v2df520f9ja9edc4582ee1199f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-05 13:00   ` Paul Jackson
     [not found]     ` <20080905080008.bf9748ab.pj-sJ/iWh9BUns@public.gmane.org>
2008-09-15 11:55       ` Mukesh G
     [not found]         ` <c7704c490809150455r3376db54g8d37aba6670500a9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-16  0:26           ` [Devel] " Paul Menage
     [not found]             ` <6599ad830809151726t4ff6082dsfda259dccd503415-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-17 12:57               ` Mukesh G
     [not found]                 ` <c7704c490809170557o21330ceaoeca5193add14c6d4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-18  0:40                   ` Paul Menage
     [not found]                     ` <6599ad830809171740t2cbb459dqc273f240b9877ed8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-10-28  7:28                       ` Mukesh G
     [not found]                         ` <c7704c490810280028y74bb9c55pd9d6af844571fcd6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-10-28  8:38                           ` Dhaval Giani
     [not found]                             ` <20081028083806.GB4097-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-10-28 10:07                               ` Mukesh G
     [not found]                                 ` <c7704c490810280307s141a7a18vc708049e7f499c50-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-10-28 12:12                                   ` Dhaval Giani [this message]
     [not found]                                     ` <20081028121231.GA15052-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-10-29  5:43                                       ` Mukesh G

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=20081028121231.GA15052@linux.vnet.ibm.com \
    --to=dhaval-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
    --cc=a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=mukgbv-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=pj-sJ/iWh9BUns@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