From nobody Mon Jun 26 12:06:27 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 4QqRQm6hj3z4k5BW; Mon, 26 Jun 2023 12:06:40 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 4QqRQm2YfVz3PtG; Mon, 26 Jun 2023 12:06:40 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=Qe5nHgVl; spf=pass (mx1.freebsd.org: domain of aryeh.friedman@gmail.com designates 2a00:1450:4864:20::534 as permitted sender) smtp.mailfrom=aryeh.friedman@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-51bece5d935so4452271a12.1; Mon, 26 Jun 2023 05:06:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687781198; x=1690373198; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=eEe9TmWVfdRt56fuIgpscFt3GDDzv1cVJZUrfVO5RuA=; b=Qe5nHgVlpC2oD/Fk2OvZ8o50Cp+1Bj1D0mFPw/M9vacDC+jq/IP71YGmSI/WsKQN+s gmi1c3GAQFoMDM/s1HcAE35z3SsQ0dQZu8HkKkJ9yt7u/4HxpRmg4Qoq4lMZz8qTXqlc WUXakaxH455Si1qJxe5WQBHWe1HXlMACSKQFQxxZX7H5putO2pZLQ7kEMiSNWtaQEvWn gfAXa7dP9LMZ3cwyeLp+pLlbInPSwZgphelDZPRrPFiaO3VKjxP2RcxgkdRFjhSh7293 TR0eEZ6qe7cLIn71YmFbdtQG6lYDIo0OnrDbY6gYsYEEFkw9GUbxvm5zQVZ9BrUBfPvI FsDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687781198; x=1690373198; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eEe9TmWVfdRt56fuIgpscFt3GDDzv1cVJZUrfVO5RuA=; b=FZZD+lWVl+oPV/Lgz9LE/eermCfu1feUiDpMTtsS8D578l6Qg2WxIVnSEWNTR+STw5 y6icJOwJLqrBNfIHj4nLJpUmElbHME0WmPASSbry3XxLsoKz5aLS78EGKkk2ARnyCUNl vIPwjf4cfLFWGb29kOybwfazOm5skFSb+2jl7dExhM2pdMmL9fR27PrsGpCDGif1ADLw RO/mM6Kyvijnf4M2a0fdezmFJrDFyngUJ11/USHy75I6FPEaUZFVJ2m1ZmDuztVnXruy t9Nj+od5w3tGWmTunlmJUo3lta4MX0+WegA1nB3TE4H3xdi9TyA2NQ5CKJfSU8PuhGf4 2h0w== X-Gm-Message-State: AC+VfDxA3err3mWP+KNgFeLEZnrtlV4YCtjH6DjeayctD9U4DNs+rq40 u/bUNyL1dVG97A+NSjlcRHYTQp1V2PdS+neTXjjXYsxctbs= X-Google-Smtp-Source: ACHHUZ4SY4LrgbXLDh1TZiTGuI/YIybWQGN4QOQEwSoA7IhHETgZifl2O3evHStNZ9DIBo1R20jMzWDctFWXJP1lUlY= X-Received: by 2002:a05:6402:148e:b0:51d:7fa6:62ca with SMTP id e14-20020a056402148e00b0051d7fa662camr4776338edv.14.1687781198230; Mon, 26 Jun 2023 05:06:38 -0700 (PDT) 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 References: <48D9FE17-B885-40AC-8958-EA90EEB9D8B6@gmail.com> In-Reply-To: <48D9FE17-B885-40AC-8958-EA90EEB9D8B6@gmail.com> From: Aryeh Friedman Date: Mon, 26 Jun 2023 08:06:27 -0400 Message-ID: Subject: Re: bhyve: how to keep the host from starving the guest To: Vitaliy Gusev Cc: FreeBSD virtualization , FreeBSD Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-2.09 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; NEURAL_HAM_SHORT(-1.00)[-0.995]; NEURAL_SPAM_LONG(0.90)[0.898]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::534:from]; TAGGED_RCPT(0.00)[]; MLMMJ_DEST(0.00)[freebsd-virtualization@freebsd.org,freebsd-questions@freebsd.org]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TAGGED_FROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; TO_DN_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4QqRQm2YfVz3PtG X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On Mon, Jun 26, 2023 at 7:50=E2=80=AFAM Vitaliy Gusev wrote: > > Hi Aryeh, > > Have you wired a guest memory with bhyve's -S option? > > -S Wire guest memory > > > Anyway, OS does not have another choice than kill a process to free some = memory > when RAM+swap is fully used (assume kernel already scanned Inactive memor= y). > > As recommendation: > > Look at an another memory consumers like ZFS, another processes > Increase swap > Tune vm.overcommit sysctl. See tuning(7) for details. > > > So in short, there is no good way to run applications that fully use 10 G= B > memory on a systems with just 1 GB RAM + 1 GB swap. You should have > enough resources to do that. 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). -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org