From nobody Mon Jun 26 13:27:39 2023 X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QqTDV4rK0z4kZqS; Mon, 26 Jun 2023 13:27:54 +0000 (UTC) (envelope-from gusev.vitaliy@gmail.com) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqTDT6VQ9z3QCf; Mon, 26 Jun 2023 13:27:53 +0000 (UTC) (envelope-from gusev.vitaliy@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=chhz8jgb; spf=pass (mx1.freebsd.org: domain of gusev.vitaliy@gmail.com designates 2a00:1450:4864:20::130 as permitted sender) smtp.mailfrom=gusev.vitaliy@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4f9fdb0ef35so2358556e87.0; Mon, 26 Jun 2023 06:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687786071; x=1690378071; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=2Yvso0yOj61tajnCRSAyt+/avEZBKzV6HSsKrzb3qHk=; b=chhz8jgbvchCKEuToKmvsuNMP+y59iyX5pdTbdYqKbJj7Guk7GOH2aJgfvCKHBANOg 9pWSshV/GTBvGl91KAF+di16QwznsV02Gu4YoemFH09ff3e7QRONWSJpHHWBzz6IkQHV 8JiROWUIPY+soLJ1hkXQUPhewud1t8g/lSxHDFnqoHeq3uKUn3+qv6irBcmzSmPbvZyv wLRy+HHd5q09ZIkKaSAVyShAIAsxs6lYItmjyXVVs5cj2Z0ldNAIGUcPu/78lVdYYXRH KrhFIzpEAqtmwFiPzVSVgu8mm/BLbvG5h3vMORToV8cNLBvMM8Rbz/4QyeyNPu2xb7Tk XPsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687786071; x=1690378071; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2Yvso0yOj61tajnCRSAyt+/avEZBKzV6HSsKrzb3qHk=; b=Yu/6e2jVGw1HijWZ43M/B+DADPrU+Zc7CRx65WdWhbN43doylMqlk87vXkP046TCf6 8TWf4gRCcfazp4X1F2ljXKdbOUWo7ghiuIlksNnR1MJdzVV3BDoai4kFgUDhJfTpRqqA 5/8aw7icAzYfyGoTwqsg1fqEmIsB3cw2LJw6IQmLbltlYzuZPnbPuG/ZDdGFGUvD5jaR z46hyf8eZGjFqYPApMjTEjJzzVp0+yrqX8+RmThc1Er88v8lIWqEe4l5dbAWNq2QB2Mp iKb+q/o1FwNhFRhaqOOhghKcpUFt5Q5Vqn6BPIxMoxqhhISOiIcSuBwZrN4ze7Sf9MRM Bcsw== X-Gm-Message-State: AC+VfDxWvNyoff2mY/nMoG7Y+dVl0SWv11kW63Pn816SU6KnujsjznuL Nz91z2+ex7qC/x3k7Yz+SCA= X-Google-Smtp-Source: ACHHUZ4aBl01XD5wK6ASoGaFZXfKxV1OHm3EHg/kQG4HMxS8I2g+j0cVoF8BNFYGj0Ex2oV5OLIt7g== X-Received: by 2002:a19:5f5e:0:b0:4f8:554f:36aa with SMTP id a30-20020a195f5e000000b004f8554f36aamr16103240lfj.29.1687786070962; Mon, 26 Jun 2023 06:27:50 -0700 (PDT) Received: from smtpclient.apple ([188.187.60.230]) by smtp.gmail.com with ESMTPSA id o30-20020ac2495e000000b004f865fe9c4dsm1101168lfi.263.2023.06.26.06.27.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jun 2023 06:27:50 -0700 (PDT) From: Vitaliy Gusev Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_B5C82297-31F2-4C2B-AAD4-9E27C2C3F604" List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: bhyve: how to keep the host from starving the guest Date: Mon, 26 Jun 2023 16:27:39 +0300 In-Reply-To: Cc: FreeBSD virtualization , FreeBSD Mailing List To: Aryeh Friedman References: <48D9FE17-B885-40AC-8958-EA90EEB9D8B6@gmail.com> X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Result: default: False [0.99 / 15.00]; NEURAL_SPAM_SHORT(0.86)[0.856]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_SPAM_LONG(0.47)[0.468]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; NEURAL_SPAM_MEDIUM(0.17)[0.167]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_VIA_SMTP_AUTH(0.00)[]; TAGGED_RCPT(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::130:from]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MLMMJ_DEST(0.00)[freebsd-virtualization@freebsd.org,freebsd-questions@freebsd.org] X-Rspamd-Queue-Id: 4QqTDT6VQ9z3QCf X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N --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 = wrote: >=20 > On Mon, Jun 26, 2023 at 7:50=E2=80=AFAM Vitaliy Gusev = > 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
On 26 Jun = 2023, at 15:06, Aryeh Friedman <aryeh.friedman@gmail.com> = wrote:

On Mon, Jun 26, 2023 at = 7:50=E2=80=AFAM Vitaliy Gusev <gusev.vitaliy@gmail.com> = wrote:
...
As recommendation:

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

Also the memory is successfully reserved = accoring to top(1) but yet it
still = runs out (i.e. it shows 19GB are wired).


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--