From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: How to find out how much cpu time each domain used? Date: Wed, 13 Jul 2016 10:07:44 +0200 Message-ID: <1468397264.13039.13.camel@citrix.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4989288683459129016==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Amin Fallahi , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============4989288683459129016== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-dgYa3GKOcmrVvvyqfogW" --=-dgYa3GKOcmrVvvyqfogW Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2016-07-04 at 20:09 +0000, Amin Fallahi wrote: > Dear all >=20 > I am modifying credit scheduler and I want to give credit to each > vcpu based on cpu time which its domain has consumed. > Suppose: > credit_fair =3D((credit_total*sdom->weight)+(weight_total- > 1))/weight_total >=20 Mind describing what your actual end goal is, and spending a little more word describing how you were thinking to achieve it? I see the formula, but I don't understand: =C2=A0- what is it that you are trying to improve/achieve? Better fairness,= =C2=A0 =C2=A0 =C2=A0I guess? =C2=A0- how do you plan to use such formula, i.e., where in the algorithm= =C2=A0 =C2=A0 =C2=A0you'd put it? Credits are already been burned basing on how mu= ch a=C2=A0 =C2=A0 =C2=A0vcpu executes, is this about how much credits a vcpu is given = at=C2=A0 =C2=A0 =C2=A0the beginning/reset? How would it integrate with credits_per_t= slice=C2=A0 =C2=A0 =C2=A0and friends? > I want to multiply something to this formula according to the domain > cpu usage. Thus I need to somehow find out cpu time for each domain. > Cpu usage in terms of what? Time? Percentage? Over what time interval? It is certainly possible to figure out how long a vcpu executed on a pcpu on a given time interval, but depending from the characteristics of such time interval, the way to actually do that varies. Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-dgYa3GKOcmrVvvyqfogW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJXhfbeAAoJEBZCeImluHPuwB0P/2vx8C4XZpaq9o5nswqiFhO4 1CVWDq9JDGN7zDL0zo4RwhI5+dLQHQ7g+jAQlGcosnhwSwRTyw1u107BoRveRybJ iHfIPebOBiHQeDUiTns4pYYe9B/+o69WhD10jHEPjFEjgRoqSX57NuKWwcYhGwgS bHW/fVjiC9LdUnxTBSJLFqkHZDzyq2iMeuiQgsDYge9z87/jh7/JWGN9Rt3wDKwz 1FCMHN5kRj3ARS8JZhBrEq6qAs20dmiTdDQBQ5alAdK1N6p7FL/tSaPXKMgxsE+x eZRcpeJopOe/5g8iwDsJ5xuORJ/EepgUq8crDRX848JxwAy/GTXnLxduIAactqcg J7w635X9CibUbDfXFVwG7sn9fW+96RVjeU+XZkzcb45Cogrv7Zp7YKNENrzrfkha drDw2gam8rhvxj6Lqb/bEYvmG4xMBgTbh5lTB0ilee/1WV8QRRfFugTHUujsB8Am kl1ObUFkjT3fNP/DtKZNuLEYLbXVYOXwunuutSn/AWGXqVxYFpLzk0lTTx9mPJ4W 3Zqq/3c6vvWMGtebxJixAas9oc5aJqvKt0x6MoRSCgytbTdcLKA7MbxrQcHGPxbZ rWX3MiG1pRQ4YkYXuuotFGp854RDQgji+8gmcPuBwXxW/QbrTjkxEkoP5qjeuuJ4 zGdGe632EUXo+X2aFh57 =2X2g -----END PGP SIGNATURE----- --=-dgYa3GKOcmrVvvyqfogW-- --===============4989288683459129016== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============4989288683459129016==--