From nobody Mon Jun 26 10:44:03 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 4QqPbj6Sv2z4hRqq; Mon, 26 Jun 2023 10:44:17 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (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 4QqPbh5MCSz3x3j; Mon, 26 Jun 2023 10:44:16 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b="fh/wveuw"; spf=pass (mx1.freebsd.org: domain of aryeh.friedman@gmail.com designates 2a00:1450:4864:20::22e as permitted sender) smtp.mailfrom=aryeh.friedman@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2b6a5fd1f46so5313671fa.1; Mon, 26 Jun 2023 03:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687776254; x=1690368254; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=HGFsM7bwvzrhKd5Lc8Ep5TzSoSHtIn/A/NHa68epDWI=; b=fh/wveuwS+3uaGoKIA8yTDwCZZV6PHij9NhL9w+Ck9zNYpL9gZdPtzSkSW1QHWZwC4 On+jmhnh2H2R5mPm5dQBCzWVxQAqLgR7N1uftvFIUSzhWq8dAQC8AsSEp/MycGFBpUvW zcan/W4YOshu7A0ssYdSVGGIPsFde+swwk3e0BRLV6s8Q2H0vfOreNNtYKRJw9m0ZvF0 gNbgBDqNm+oAxBoDAq7UNWJ56XmWkceyGNtAw5N4YQnNXpenmw65L86PZfUtNqSkBErd q2JbUwwROF10O8Oy9TwknP79G1hV8cJQX58mF5JaKP6AX8ZpkSLwBBhLIgWxblZRbVpL Tvog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687776254; x=1690368254; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HGFsM7bwvzrhKd5Lc8Ep5TzSoSHtIn/A/NHa68epDWI=; b=C8iLWq/n4Wp2BE21+t7WbC7UNTGKKZd9nZH9TdipclvVmhjR3zo4nk7ovZXh4i4V4t XafhLtC8LrM9LcxcIIRRm6K6Qok0J1+m2e6kgwjRysm3sbAdJim9lVhB1nBJSbUhH10A 3wVhRP+ty1PjoPNHTpWaigt/Km/XMDaDnsD+5wGkljZAevnosO7U9eEat5E7S4I00AG5 JXo/Ai/6Zb1LOWUEQzh5Re60+W3BltKp7mbaMAdlNDLYusylYj6F07JvJBavI5SciCbY ZEEAZQ7YMCJ05B1UWAjaDAcqsOotgPrfgJ0f8CjKF47bebVmpiOxIEjSBJxVfPRkrlxS g9Mg== X-Gm-Message-State: AC+VfDxWH5JcnGf521DlGXcfQzVmeI3qARBmqumtHCPhUtPAA3l26ouy N15jYUj6ggNyJi9TQozZAGi4p7o2ZgdygELND84/ZvFRNPw= X-Google-Smtp-Source: ACHHUZ6jA6syM7r43/CbvY1GxaySRIiMZJsPllSergzMwjMFOaj9WGZNE3uyClFfd7+2ZhyW5CCHjopq9dBJoOfZPfY= X-Received: by 2002:a2e:3c18:0:b0:2b4:8239:b11f with SMTP id j24-20020a2e3c18000000b002b48239b11fmr16698625lja.41.1687776254171; Mon, 26 Jun 2023 03:44:14 -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 From: Aryeh Friedman Date: Mon, 26 Jun 2023 06:44:03 -0400 Message-ID: Subject: bhyve: how to keep the host from starving the guest To: FreeBSD virtualization , FreeBSD Mailing List Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-1.29 / 15.00]; NEURAL_SPAM_MEDIUM(0.99)[0.987]; NEURAL_HAM_SHORT(-0.97)[-0.970]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_LONG(-0.31)[-0.308]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; BLOCKLISTDE_FAIL(0.00)[2a00:1450:4864:20::22e:server fail]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22e:from]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MLMMJ_DEST(0.00)[freebsd-virtualization@freebsd.org,freebsd-questions@freebsd.org]; DKIM_TRACE(0.00)[gmail.com:+]; TO_DN_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; TAGGED_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4QqPbh5MCSz3x3j X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N I am a 12 core machine that I want allocate only 4 CPU's to the host and 8 to a VM (the host is my desktop FreeBSD machine and the guest is debian 11 used for playing around with learning AI model making).... I have passed my GeForce 1030 (bottom of the line GPU for AI work it seems) but since it appears that no one can get tensorflow, pytorch or anything else that runs ANN's on a GPU to work on FreeBSD (I have tracked down to the fact nvidia never ported CUDA to FreeBSD)... the problem is sometimes during heavy work on the guest then the host slows down and if the the host is doing heavy work (especially resource intensive things like compiling lang/rust) that the host will kill the guest if it runs out of available memory+swap (speaking of that does wiring the memory at least prevent this?) -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org