From nobody Tue Nov 25 21:23:28 2025 X-Original-To: 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 4dGFzy0wRCz6HpbC for ; Tue, 25 Nov 2025 21:23:42 +0000 (UTC) (envelope-from jason@tubnor.net) Received: from mail.tubnor.net (mail.tubnor.net [103.236.162.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGFzx1RwPz3V6L for ; Tue, 25 Nov 2025 21:23:40 +0000 (UTC) (envelope-from jason@tubnor.net) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tubnor.net; s=20220915; t=1764105809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=To66jkjeqyFyzVnKfD/Bsl9ybnOPoQOvBI9j+Hpy9mI=; b=Pxqi4fJPYG57wiDInDh87aFry8cjsdljyafKd6IZMLMbzuMI9TmVlO5sAEJ6FwXZ8xKF5M 6/T1Gp7U0mi8Ku2z47psdr4DUHXcF6aV8rl/DL9wqTZRAOl3IWT/BaPn8x0T+YLlCUAjMz 1s1lU/5lSyAJpjoI198U2ax3f6rj4ts= Received: from [IPV6:2403:5812:73e6:1:f72c:5c13:d2ae:844] ( [2403:5812:73e6:1:f72c:5c13:d2ae:844]) by mamel01.vic.tubnor.au (OpenSMTPD) with ESMTPSA id 5fd584b7 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 26 Nov 2025 08:23:29 +1100 (AEDT) Message-ID: <39fc2f91-bded-4d66-b52c-c9a1fa311efd@tubnor.net> Date: Wed, 26 Nov 2025 08:23:28 +1100 List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pinning cores To: virtualization@freebsd.org, void@f-m.fm References: Content-Language: en-US From: Jason Tubnor In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:133159, ipnet:103.236.162.0/23, country:AU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dGFzx1RwPz3V6L On 26/11/25 00:53, void wrote: > >       -p vcpu:hostcpu > > but there's nothing for package. On my system, there's 2x "packages" > if I'm reading correctly - CPU0 & CPU1. > > The system has CPU E5-2690 v2 @ 3.00GHz x2 (hw.ncpu=20 in total - 10 > on each CPU) and because SHT is off hw.vmm.maxcpu: 20 > > If i set a vm to use -p 0:0 -p 1:10, then will it use the first core on > the first physical package CPU0 and the first core on the second > physical package CPU1, if I understand correctly? > That is my understanding. You should see corresponding physical core load with your preferred monitoring tooling when you wire the guest up like that and push some load on it. When not pinned, the scheduler will move the virtual core workload to different cores (not ideal for some workloads). However, be careful stretching across your NUMA like that, it is highly likely that you'll introduce significant latency into your guest as the guest OS will think the total workload is on the same package and your caching/memory access will be less than optimal for multi-core aware software. Cheers