Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2023 16:27:39 +0300
From:      Vitaliy Gusev <gusev.vitaliy@gmail.com>
To:        Aryeh Friedman <aryeh.friedman@gmail.com>
Cc:        FreeBSD virtualization <freebsd-virtualization@freebsd.org>, FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: bhyve: how to keep the host from starving the guest
Message-ID:  <A82C7A5C-4012-4A0D-A2EA-223A62E9BA01@gmail.com>
In-Reply-To: <CAGBxaXkY70PSC1qb1VsJUq_3UG0K5M2HruBoC40c66wun%2BcseA@mail.gmail.com>
References:  <CAGBxaXkcBuu70SjjW4ci-6Lhv24gqowf6T2Rj4Aig4sZLt-Tvg@mail.gmail.com> <48D9FE17-B885-40AC-8958-EA90EEB9D8B6@gmail.com> <CAGBxaXkY70PSC1qb1VsJUq_3UG0K5M2HruBoC40c66wun%2BcseA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_B5C82297-31F2-4C2B-AAD4-9E27C2C3F604
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8


> On 26 Jun 2023, at 15:06, Aryeh Friedman <aryeh.friedman@gmail.com> =
wrote:
>=20
> On Mon, Jun 26, 2023 at 7:50=E2=80=AFAM Vitaliy Gusev =
<gusev.vitaliy@gmail.com <mailto:gusev.vitaliy@gmail.com>> wrote:
>> ...
>> As recommendation:
>>=20
>> Look at an another memory consumers like ZFS, another processes
>> Increase swap
>> Tune vm.overcommit sysctl. See tuning(7) for details.
>> ...
> You completely mischaracterize the situation I want to reserve 16GB or
> 24GB for the VM and the other 8 are for the host (and the host
> alone).. I have already used the -S flag since it is required by
> passthru
>=20
> Also the memory is successfully reserved accoring to top(1) but yet it
> still runs out (i.e. it shows 19GB are wired).
>=20


You can try with protect(1):

     protect =E2=80=93 protect processes from being killed when swap =
space is
     exhausted




--Apple-Mail=_B5C82297-31F2-4C2B-AAD4-9E27C2C3F604
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: =
after-white-space;"><br><div><blockquote type=3D"cite"><div>On 26 Jun =
2023, at 15:06, Aryeh Friedman &lt;aryeh.friedman@gmail.com&gt; =
wrote:</div><br class=3D"Apple-interchange-newline"><div><meta =
charset=3D"UTF-8"><span style=3D"caret-color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 14px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; float: none; display: inline !important;">On Mon, Jun 26, 2023 at =
7:50=E2=80=AFAM Vitaliy Gusev &lt;</span><a =
href=3D"mailto:gusev.vitaliy@gmail.com" style=3D"font-family: Helvetica; =
font-size: 14px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; orphans: auto; text-align: =
start; text-indent: 0px; text-transform: none; white-space: normal; =
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: =
0px;">gusev.vitaliy@gmail.com</a><span style=3D"caret-color: rgb(0, 0, =
0); font-family: Helvetica; font-size: 14px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;">&gt; =
wrote:</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 14px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;"><blockquote type=3D"cite" style=3D"font-family: Helvetica; =
font-size: 14px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; orphans: auto; text-align: =
start; text-indent: 0px; text-transform: none; white-space: normal; =
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;">...<br>As recommendation:<br><br>Look at an =
another memory consumers like ZFS, another processes<br>Increase =
swap<br>Tune vm.overcommit sysctl. See tuning(7) for =
details.<br>...</blockquote><span style=3D"caret-color: rgb(0, 0, 0); =
font-family: Helvetica; font-size: 14px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;">You =
completely mischaracterize the situation I want to reserve 16GB =
or</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 14px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;"><span style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 14px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; float: none; display: inline !important;">24GB for the VM and the =
other 8 are for the host (and the host</span><br style=3D"caret-color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: =
normal; font-variant-caps: normal; font-weight: 400; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;"><span style=3D"caret-color: rgb(0, 0, 0); =
font-family: Helvetica; font-size: 14px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline =
!important;">alone).. I have already used the -S flag since it is =
required by</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 14px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;"><span style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 14px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; float: none; display: inline !important;">passthru</span><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
14px; font-style: normal; font-variant-caps: normal; font-weight: 400; =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none;"><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
14px; font-style: normal; font-variant-caps: normal; font-weight: 400; =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none;"><span =
style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: =
14px; font-style: normal; font-variant-caps: normal; font-weight: 400; =
letter-spacing: normal; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px; text-decoration: none; float: none; =
display: inline !important;">Also the memory is successfully reserved =
accoring to top(1) but yet it</span><br style=3D"caret-color: rgb(0, 0, =
0); font-family: Helvetica; font-size: 14px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;"><span style=3D"caret-color: rgb(0, 0, 0); =
font-family: Helvetica; font-size: 14px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;">still =
runs out (i.e. it shows 19GB are wired).</span><br style=3D"caret-color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: =
normal; font-variant-caps: normal; font-weight: 400; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;"><br style=3D"caret-color: rgb(0, 0, 0); =
font-family: Helvetica; font-size: 14px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;"></div></blockquote></div><div><br></div>You can =
try with protect(1):<div><br></div><div><p style=3D"margin: 0px; =
font-style: normal; font-variant-caps: normal; font-stretch: normal; =
font-size: 12px; line-height: normal; font-family: Menlo; =
font-size-adjust: none; font-kerning: auto; font-variant-alternates: =
normal; font-variant-ligatures: normal; font-variant-numeric: normal; =
font-variant-east-asian: normal; font-variant-position: normal; =
font-feature-settings: normal; font-optical-sizing: auto; =
font-variation-settings: normal;"><span style=3D"font-variant-ligatures: =
no-common-ligatures;">&nbsp; &nbsp; &nbsp;<b>protect</b> =E2=80=93 =
protect processes from being killed when swap space is</span></p>
<p style=3D"margin: 0px; font-style: normal; font-variant-caps: normal; =
font-stretch: normal; font-size: 12px; line-height: normal; font-family: =
Menlo; font-size-adjust: none; font-kerning: auto; =
font-variant-alternates: normal; font-variant-ligatures: normal; =
font-variant-numeric: normal; font-variant-east-asian: normal; =
font-variant-position: normal; font-feature-settings: normal; =
font-optical-sizing: auto; font-variation-settings: normal;"><span =
style=3D"font-variant-ligatures: no-common-ligatures;">&nbsp;&nbsp; =
&nbsp; =
exhausted</span></p><div><br></div><div><br></div><div><br></div></div></b=
ody></html>=

--Apple-Mail=_B5C82297-31F2-4C2B-AAD4-9E27C2C3F604--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A82C7A5C-4012-4A0D-A2EA-223A62E9BA01>