mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Poetzl <herbert@13thfloor.at>
To: Kirill Korotaev <dev@sw.ru>
Cc: Sam Vilain <sam@vilain.net>,
	devel@openvz.org, Kir Kolyshkin <kir@sacred.ru>,
	linux-kernel@vger.kernel.org
Subject: Re: [Devel] Re: [RFC] Virtualization steps
Date: Thu, 13 Apr 2006 03:05:06 +0200	[thread overview]
Message-ID: <20060413010506.GA16864@MAIL.13thfloor.at> (raw)
In-Reply-To: <443CBA48.7020301@sw.ru>

On Wed, Apr 12, 2006 at 12:28:56PM +0400, Kirill Korotaev wrote:
> Sam,
> 
> >Ok, I'll call those three VPSes fast, faster and fastest.
> >
> >"fast"    : fill rate 1, interval 3
> >"faster"  : fill rate 2, interval 3
> >"fastest" : fill rate 3, interval 3
> >
> >That all adds up to a fill rate of 6 with an interval of 3, but that is
> >right because with two processors you have 2 tokens to allocate per
> >jiffie.  Also set the bucket size to something of the order of HZ.
> >
> >You can watch the processes within each vserver's priority jump up and
> >down with `vtop' during testing.  Also you should be able to watch the
> >vserver's bucket fill and empty in /proc/virtual/XXX/sched (IIRC)
> >
> >I mentioned this earlier, but for the sake of the archives I'll repeat -
> >if you are running with any of the buckets on empty, the scheduler is
> >imbalanced and therefore not going to provide the exact distribution you
> >asked for.
> >
> >However with a single busy loop in each vserver I'd expect the above to
> >yield roughly 100% for fastest, 66% for faster and 33% for fast, within
> >5 seconds or so of starting those processes (assuming you set a bucket
> >size of HZ).
> 
> Sam, what we observe is the situation, when Linux cpu scheduler spreads 
> 2 tasks on 1st CPU and 1 task on the 2nd CPU. Std linux scheduler 
> doesn't do any rebalancing after that, so no plays with tokens make the 
> spread to be 3:2:1, since the lowest priority process gets a full 2nd 
> CPU (100% instead of 33% of CPU).
> 
> Where is my mistake? Can you provide a configuration where we could test 
> or the instuctions on how to avoid this?

well, your mistake seems to be that you probably haven't
tested this yet, because with the following (simple)
setups I seem to get what you consider impossible 
(of course, not as precise as your scheduler does it)


vcontext --create --xid 100 ./cpuhog -n 1 100 &
vcontext --create --xid 200 ./cpuhog -n 1 200 &
vcontext --create --xid 300 ./cpuhog -n 1 300 &

vsched --xid 100 --fill-rate 1 --interval 6
vsched --xid 200 --fill-rate 2 --interval 6
vsched --xid 300 --fill-rate 3 --interval 6

vattribute --xid 100 --flag sched_hard
vattribute --xid 200 --flag sched_hard
vattribute --xid 300 --flag sched_hard


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
   39 root      25   0  1304  248  200 R   74  0.1   0:46.16 ./cpuhog -n 1 300  
   38 root      25   0  1308  252  200 H   53  0.1   0:34.06 ./cpuhog -n 1 200  
   37 root      25   0  1308  252  200 H   28  0.1   0:19.53 ./cpuhog -n 1 100  
   46 root       0   0  1804  912  736 R    1  0.4   0:02.14 top -cid 20        

and here the other way round:

vsched --xid 100 --fill-rate 3 --interval 6
vsched --xid 200 --fill-rate 2 --interval 6
vsched --xid 300 --fill-rate 1 --interval 6

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
   36 root      25   0  1304  248  200 R   75  0.1   0:58.41 ./cpuhog -n 1 100  
   37 root      25   0  1308  252  200 H   54  0.1   0:42.77 ./cpuhog -n 1 200  
   38 root      25   0  1308  252  200 R   29  0.1   0:25.30 ./cpuhog -n 1 300  
   45 root       0   0  1804  912  736 R    1  0.4   0:02.26 top -cid 20        


note that this was done on a virtual dual cpu
machine (QEMU 8.0) with 2.6.16-vs2.1.1-rc16 and
that there were roughly 25% idle time, which I'm
unable to explain atm ...

feel free to jump on that fact, but I consider
it unimportant for now ...

best,
Herbert

> Thanks,
> Kirill

  reply	other threads:[~2006-04-13  1:05 UTC|newest]

Thread overview: 125+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-24 17:19 Kirill Korotaev
2006-03-24 17:33 ` Nick Piggin
2006-03-24 19:25   ` Dave Hansen
2006-03-24 19:53     ` Eric W. Biederman
2006-03-28  4:28     ` Bill Davidsen
2006-03-28  5:31       ` Sam Vilain
2006-03-28  6:45       ` [Devel] " Kir Kolyshkin
2006-03-28 21:59         ` Sam Vilain
2006-03-28 22:24           ` Kir Kolyshkin
2006-03-28 23:28             ` Sam Vilain
2006-03-29  9:13               ` Kirill Korotaev
2006-03-29 11:08                 ` Sam Vilain
2006-03-29 13:45                 ` Herbert Poetzl
2006-03-29 14:47                   ` Kirill Korotaev
2006-03-29 17:29                     ` Herbert Poetzl
2006-03-29 21:37                     ` Sam Vilain
2006-04-12  8:28                       ` Kirill Korotaev
2006-04-13  1:05                         ` Herbert Poetzl [this message]
2006-04-13  6:52                           ` Kirill Korotaev
2006-04-13 13:42                             ` Herbert Poetzl
2006-04-13 21:33                               ` Cedric Le Goater
2006-04-13 22:45                                 ` Herbert Poetzl
2006-04-14  7:41                                   ` Kirill Korotaev
2006-04-14  9:56                                   ` Cedric Le Goater
2006-04-15 19:29                                     ` Herbert Poetzl
2006-04-13 22:51                                 ` Kir Kolyshkin
2006-04-14 10:08                                   ` Cedric Le Goater
2006-04-15 19:31                                     ` Herbert Poetzl
2006-03-28  8:52       ` Herbert Poetzl
2006-03-28  9:00         ` Nick Piggin
2006-03-28 14:26           ` Herbert Poetzl
2006-03-28 14:44             ` Nick Piggin
2006-03-29  6:05               ` Eric W. Biederman
2006-03-29  6:19                 ` Sam Vilain
2006-03-29 18:20                   ` Chris Wright
2006-03-29 22:36                     ` Sam Vilain
2006-03-29 22:52                       ` Chris Wright
2006-03-29 23:01                         ` Sam Vilain
2006-03-29 23:13                           ` Chris Wright
2006-03-29 23:18                             ` Sam Vilain
2006-03-29 23:28                               ` Chris Wright
2006-03-30  1:02                         ` Eric W. Biederman
2006-03-30  1:36                           ` Chris Wright
2006-03-30  1:41                             ` David Lang
2006-03-30  2:04                               ` Chris Wright
2006-03-30 14:32                                 ` Serge E. Hallyn
2006-03-30 15:30                                   ` Herbert Poetzl
2006-03-30 16:43                                     ` Serge E. Hallyn
2006-03-30 18:00                                     ` Eric W. Biederman
2006-03-31 13:40                                       ` Serge E. Hallyn
2006-03-30 16:07                                   ` Stephen Smalley
2006-03-30 16:15                                     ` Serge E. Hallyn
2006-03-30 18:55                                     ` Chris Wright
2006-03-30 18:44                                   ` Eric W. Biederman
2006-03-30 19:07                                     ` Chris Wright
2006-03-31  5:36                                       ` Eric W. Biederman
2006-03-31  5:51                                         ` Chris Wright
2006-03-31  6:52                                           ` Eric W. Biederman
2006-03-30 18:53                                   ` Chris Wright
2006-03-30  2:48                             ` Eric W. Biederman
2006-03-30 19:23                               ` Chris Wright
2006-03-31  6:00                                 ` Eric W. Biederman
2006-03-31 14:52                                   ` Stephen Smalley
2006-03-31 16:39                                     ` Eric W. Biederman
2006-03-30 13:29                             ` Serge E. Hallyn
2006-03-30 13:37                               ` Eric W. Biederman
2006-03-30 14:55                                 ` Serge E. Hallyn
2006-03-30  2:24                           ` Sam Vilain
2006-03-30  3:01                             ` Eric W. Biederman
2006-03-30  3:26                 ` Nick Piggin
2006-03-30 10:30                   ` Eric W. Biederman
2006-04-11 10:32                   ` Kirill Korotaev
2006-04-11 11:14                     ` Nick Piggin
2006-04-11 14:44                       ` Kirill Korotaev
2006-03-28  9:00       ` Kirill Korotaev
2006-03-28 14:41         ` Bill Davidsen
2006-03-28 15:03           ` Eric W. Biederman
2006-03-28 17:48             ` Jeff Dike
2006-03-28 23:07           ` Sam Vilain
2006-03-29 20:56             ` Bill Davidsen
2006-03-28 20:29     ` [Devel] " Jun OKAJIMA
2006-03-28 20:50       ` Kir Kolyshkin
2006-03-28 21:38         ` Jun OKAJIMA
2006-03-28 21:51           ` Eric W. Biederman
2006-03-28 23:18             ` Sam Vilain
2006-04-03 16:47         ` Bill Davidsen
2006-04-11 10:38           ` Kirill Korotaev
2006-04-11 16:20             ` Herbert Poetzl
2006-04-11 18:12               ` Kir Kolyshkin
2006-04-12  5:12             ` Andi Kleen
2006-04-12  6:55               ` Kirill Korotaev
2006-04-12  6:53                 ` Andi Kleen
2006-04-12  7:51                   ` Kirill Korotaev
2006-04-12 17:03                     ` Andi Kleen
2006-04-12 17:20                       ` Eric W. Biederman
2006-04-13 16:54               ` Alexey Kuznetsov
2006-04-30 13:22             ` Bill Davidsen
2006-04-30 21:34               ` Sam Vilain
2006-05-01 12:27               ` Kirill Korotaev
2006-05-03 20:32                 ` Bill Davidsen
2006-03-28  9:02   ` Kirill Korotaev
2006-03-28  9:15     ` Nick Piggin
2006-03-28 15:35       ` Herbert Poetzl
2006-03-28 15:53         ` Nick Piggin
2006-03-28 16:31         ` Eric W. Biederman
2006-03-29 21:37         ` Bill Davidsen
2006-03-28 16:15       ` Eric W. Biederman
2006-03-28 23:04       ` Sam Vilain
2006-03-29  1:39       ` Kirill Korotaev
2006-03-29 13:47         ` Herbert Poetzl
2006-03-28 15:48     ` [Devel] " Matt Ayres
2006-03-28 16:42       ` Eric W. Biederman
2006-03-28 17:04         ` Matt Ayres
2006-03-29  0:55       ` Kirill Korotaev
2006-03-24 18:36 ` Eric W. Biederman
2006-03-24 21:19 ` Herbert Poetzl
2006-03-27 18:45   ` Eric W. Biederman
2006-03-28  8:51     ` Kirill Korotaev
2006-03-28 12:53       ` Serge E. Hallyn
2006-03-28 22:51       ` Sam Vilain
2006-03-29 20:30       ` Dave Hansen
2006-03-29 20:47         ` Eric W. Biederman
2006-03-29 22:44         ` Sam Vilain
2006-03-30 13:51         ` Kirill Korotaev
2006-03-28 21:58   ` Eric W. Biederman

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=20060413010506.GA16864@MAIL.13thfloor.at \
    --to=herbert@13thfloor.at \
    --cc=dev@sw.ru \
    --cc=devel@openvz.org \
    --cc=kir@sacred.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@vilain.net \
    /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