From: "Yan-Ching CHU" Subject: BVT CPU Slice Date: Tue, 9 Mar 2004 20:29:54 -0000 Sender: xen-devel-admin@lists.sourceforge.net Message-ID: <035201c40615$48590550$a054fd8a@barcelona> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_034F_01C40615.484AAD70" Return-path: Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: xen-devel@lists.sourceforge.net Cc: cs0u210a@liverpool.ac.uk List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. ------=_NextPart_000_034F_01C40615.484AAD70 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I have just tried playing with the BVT CPU slice (context switch = allowance in BVT scheduling) in Xen, which is similar to the 'quantum' = in timesharing scheduler. The default is 5ms. Using the xc tool I intuitively set 'xc cpu_bvtslice 10' aiming = something like 10ms, that caused thrashing in the system and I had to do = a reboot. The unit of the BVT slice is actually in nanoseconds (ns) which I = think it will be useful if it can be shown in the xc usage menu. Setting = it at 50,000ns still fine with only domain0, but with more than 1 domain = running (not even any CPU-bound processes) the system will be thrashed = by busy context switching. (I merely set the slice back to normal so = that I can still use the machine.) I think anything lower than 100,000ns should be warned by the system = in general for it to do anything useful other than merely context = switching. The BVT CPU slice is rarely changed and leaving it at default = surely is a good idea as I found that except there are a couple of = cpu-bound threads, otherwise Xenolinux (domains>0) almost do a yield = before their quantum is finished all the time. In that case you may = actually want to increase the slice. Perhaps it's also worth to add this in FAQ Jan? Another question is that I wonder if it will be desirable for the = absolute scheduling to have two versions, one for overall efficiency = that do_yield() is allowed and another for strict guarantee that = do_yield() is somehow ignored until the effective quantum is due. The = former seems will not, in a long run, converge to the share that we want = easily as I found the timing that they do_yield() is quite random. Cheers, Yan-Ching CHU ------=_NextPart_000_034F_01C40615.484AAD70 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
    I have just = tried playing=20 with the BVT CPU slice (context switch allowance in BVT scheduling) = in Xen,=20 which is similar to the 'quantum' in timesharing scheduler. The default = is=20 5ms.
 
    Using the xc tool I = intuitively=20 set 'xc cpu_bvtslice 10' aiming something like 10ms, that caused = thrashing=20 in the system and I had to do a reboot.
 
    The unit of the BVT = slice is=20 actually in nanoseconds (ns) which I think it will be useful if it can = be shown=20 in the xc usage menu. Setting it at 50,000ns still fine with only = domain0, but=20 with more than 1 domain running (not even any CPU-bound = processes) the=20 system will be thrashed by busy context switching. (I merely = set the=20 slice back to normal so that I can still use the machine.)
 
    I think anything = lower than=20 100,000ns should be warned by the system in general for it to do = anything useful=20 other than merely context switching. The BVT CPU slice is rarely changed = and=20 leaving it at default surely is a good idea as I found that except = there=20 are a couple of cpu-bound threads, otherwise Xenolinux=20 (domains>0) almost do a yield before their quantum is = finished all=20 the time. In that case you may actually want to increase the = slice.
 
   Perhaps it's also = worth to add=20 this in FAQ Jan?
 
   Another question is that = I wonder=20 if it will be desirable for the absolute scheduling to have two = versions, one=20 for overall efficiency that do_yield() is allowed and another for strict = guarantee that do_yield() is somehow ignored until the effective quantum = is due.=20 The former seems will not, in a long run, converge to the share that we = want=20 easily as I found the timing that they do_yield() is quite = random.
 
Cheers,
Yan-Ching CHU
 
    =
------=_NextPart_000_034F_01C40615.484AAD70-- ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click