<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to see VM vCPU to Host CPU mapping? in ESXi Discussions</title>
    <link>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2982622#M289664</link>
    <description>&lt;P&gt;Try below command:&lt;/P&gt;&lt;P&gt;#&amp;nbsp;sched-stats -t cpu | grep vcpu&lt;/P&gt;&lt;P&gt;[root@esxi-16:~] sched-stats -t cpu | grep vcpu&lt;BR /&gt;vcpu vsmp type &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;name&lt;/FONT&gt; &lt;/STRONG&gt;uptime status usedsec syssec wait waitsec idlesec readysec min max units shares group emin &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;cpu &lt;/FONT&gt;&lt;/STRONG&gt;llc prio mode affinity&lt;BR /&gt;757179 757179 U &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;vmx-vcpu-0&lt;/STRONG&gt;&lt;/FONT&gt;:VM-03 74506.526 WAIT 818.815 0.000 IDLE 73630.596 71637.028 53.855 0 -1 pct 2000 vm.757166 1744 &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/FONT&gt; 2 0 0 0-7&lt;BR /&gt;757181 757179 U &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;vmx-vcpu-1&lt;/STRONG&gt;&lt;/FONT&gt;:VM-03 74506.517 WAIT 897.525 0.000 IDLE 73535.015 72482.473 70.004 0 -1 pct 2000 vm.757166 1744 &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt; &lt;FONT color="#000000"&gt;3&lt;/FONT&gt;&lt;/FONT&gt; 0 0 0-7&lt;BR /&gt;757364 757364 U &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;vmx-vcpu-0&lt;/FONT&gt;&lt;/STRONG&gt;:VM-06 74501.212 WAIT 568.980 0.000 IDLE 73834.234 73328.542 98.886 0 -1 pct 1000 vm.757269 497 &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/FONT&gt; 2 0 0 0-7&lt;BR /&gt;1618850 1618850 U &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;vmx-vcpu-0&lt;/FONT&gt;&lt;/STRONG&gt;:vCLS-d68e9ed4-deab- 507.596 WAIT 20.893 0.000 IDLE 486.196 479.341 0.466 0 -1 pct 1000 vm.1618842 497 &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;7&lt;/FONT&gt;&lt;/STRONG&gt; 7 0 0 0-7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Aug 2023 06:05:43 GMT</pubDate>
    <dc:creator>YongDong</dc:creator>
    <dc:date>2023-08-17T06:05:43Z</dc:date>
    <item>
      <title>How to see VM vCPU to Host CPU mapping?</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2819893#M273714</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;How to see VM's vCPU to Host &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;physical/logical&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; CPU mapping?&lt;/P&gt;&lt;P&gt;i.e. &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;which VM vCPU is running on which physical/logical CPU?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2020 15:13:21 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2819893#M273714</guid>
      <dc:creator>vm7user</dc:creator>
      <dc:date>2020-12-30T15:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to see VM vCPU to Host CPU mapping?</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2819949#M273718</link>
      <description>&lt;P&gt;&lt;a href="https://communities.vmware.com/t5/user/viewprofilepage/user-id/1618235"&gt;@vm7user&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It potentially is changing too frequently for any such tool to be really useful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2020 20:46:07 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2819949#M273718</guid>
      <dc:creator>scott28tt</dc:creator>
      <dc:date>2020-12-30T20:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to see VM vCPU to Host CPU mapping?</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2820019#M273721</link>
      <description>&lt;P&gt;No, i do not see changing&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 12:47:42 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2820019#M273721</guid>
      <dc:creator>vm7user</dc:creator>
      <dc:date>2020-12-31T12:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to see VM vCPU to Host CPU mapping?</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2820075#M273724</link>
      <description>&lt;P&gt;&lt;a href="https://communities.vmware.com/t5/user/viewprofilepage/user-id/1618235"&gt;@vm7user&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do you see, and where do you see it?&lt;/P&gt;
&lt;P&gt;How does that differ from what you expect or want to see?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 16:51:13 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2820075#M273724</guid>
      <dc:creator>scott28tt</dc:creator>
      <dc:date>2020-12-31T16:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to see VM vCPU to Host CPU mapping?</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2820262#M273736</link>
      <description>&lt;P&gt;scott28tt&lt;/P&gt;&lt;P&gt;&lt;EM&gt;is changing too frequently&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;What is your proofs?&lt;/P&gt;&lt;P&gt;For example - if i have 32 cores host and 7 VM with 4 vcpu each, &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;give at least one reason why "&lt;EM&gt;is changing too frequently&lt;/EM&gt;"?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jan 2021 13:27:32 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2820262#M273736</guid>
      <dc:creator>vm7user</dc:creator>
      <dc:date>2021-01-02T13:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to see VM vCPU to Host CPU mapping?</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2820274#M273738</link>
      <description>&lt;P&gt;&lt;a href="https://communities.vmware.com/t5/user/viewprofilepage/user-id/1618235"&gt;@vm7user&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have an understanding of how the CPU scheduler of ESXi functions?&amp;nbsp;&lt;A href="https://www.simongreaves.co.uk/cpu-optimisation/" target="_blank" rel="noopener"&gt;https://www.simongreaves.co.uk/cpu-optimisation/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jan 2021 15:55:57 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2820274#M273738</guid>
      <dc:creator>scott28tt</dc:creator>
      <dc:date>2021-01-02T15:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to see VM vCPU to Host CPU mapping?</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2820287#M273741</link>
      <description>&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;you haven't answered the question - why will the scheduler change processors in my example?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jan 2021 18:05:11 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2820287#M273741</guid>
      <dc:creator>vm7user</dc:creator>
      <dc:date>2021-01-02T18:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to see VM vCPU to Host CPU mapping?</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2827558#M274360</link>
      <description>&lt;P&gt;One method is via esxtop. In the CPU view (c), sort by GID (shift-n), show only VMs (shift-v), select fields (f), mark "summary stats" (i), expand (e) the GID of the VM you are interested in, check the CPU column for each vcpu world.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 11:07:52 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2827558#M274360</guid>
      <dc:creator>vbondzio</dc:creator>
      <dc:date>2021-02-04T11:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to see VM vCPU to Host CPU mapping?</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2827571#M274364</link>
      <description>&lt;P&gt;I think there was a missunderstanding here:&lt;BR /&gt;Scott was trying to illustrate that there is no such tool to show the mapping of vCPU to pCPU at runtime. (IE: which pCPU core is running which&amp;nbsp; vCPU thread) Because, as he correctly said the CPU scheduler changes at a really fast rate so it wouldn't be possible to keep track of.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If what you want is to have a vCPU to pCPU operprovision (how much vCPUs am I using/can I use related to the pCPU's I have available) you can do it from some vROPs dashboards.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hope I have clarified the situation.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 12:08:38 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2827571#M274364</guid>
      <dc:creator>nachogonzalez</dc:creator>
      <dc:date>2021-02-04T12:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to see VM vCPU to Host CPU mapping?</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2827594#M274365</link>
      <description>&lt;P&gt;That is only somewhat correct when taken literal. While it is more complicated (and fairly expensive) to track each and every individual migration (using schedtraces), you can definitely paint a picture, statistically speaking, by looking at esxtop. On a idle system with some vcpus at higher load, migrations (even intra LLC) might be fairly rare. You can look at MIG/s in esxtop (part of the "CPU Event Counts" fields).&lt;BR /&gt;&lt;BR /&gt;There are reasons to be curious about this, not for capacity planning oe anything high level but esp. on AMD systems with multiple LLC domains per socket / NUMA node (depending on config) you might want to know where those vCPUs are when doing performance troubleshooting.&lt;/P&gt;&lt;P&gt;edit ~ two month later: just remembered that I updated a script that shows the placement and all affinity related information back then and forgot to add that. The caveat is that it is the vCPU/PCPU location at the time the vsi leaf was checked and depending on wakeup / switch / migrate rate, might not be very accurate: &lt;A href="https://github.com/vbondzio/sowasvonunsupported/blob/master/vcpu_affinity_info.sh" target="_self"&gt;https://github.com/vbondzio/sowasvonunsupported/blob/master/vcpu_affinity_info.sh&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 13:47:49 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2827594#M274365</guid>
      <dc:creator>vbondzio</dc:creator>
      <dc:date>2021-04-02T13:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to see VM vCPU to Host CPU mapping?</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2982622#M289664</link>
      <description>&lt;P&gt;Try below command:&lt;/P&gt;&lt;P&gt;#&amp;nbsp;sched-stats -t cpu | grep vcpu&lt;/P&gt;&lt;P&gt;[root@esxi-16:~] sched-stats -t cpu | grep vcpu&lt;BR /&gt;vcpu vsmp type &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;name&lt;/FONT&gt; &lt;/STRONG&gt;uptime status usedsec syssec wait waitsec idlesec readysec min max units shares group emin &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;cpu &lt;/FONT&gt;&lt;/STRONG&gt;llc prio mode affinity&lt;BR /&gt;757179 757179 U &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;vmx-vcpu-0&lt;/STRONG&gt;&lt;/FONT&gt;:VM-03 74506.526 WAIT 818.815 0.000 IDLE 73630.596 71637.028 53.855 0 -1 pct 2000 vm.757166 1744 &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/FONT&gt; 2 0 0 0-7&lt;BR /&gt;757181 757179 U &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;vmx-vcpu-1&lt;/STRONG&gt;&lt;/FONT&gt;:VM-03 74506.517 WAIT 897.525 0.000 IDLE 73535.015 72482.473 70.004 0 -1 pct 2000 vm.757166 1744 &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt; &lt;FONT color="#000000"&gt;3&lt;/FONT&gt;&lt;/FONT&gt; 0 0 0-7&lt;BR /&gt;757364 757364 U &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;vmx-vcpu-0&lt;/FONT&gt;&lt;/STRONG&gt;:VM-06 74501.212 WAIT 568.980 0.000 IDLE 73834.234 73328.542 98.886 0 -1 pct 1000 vm.757269 497 &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/FONT&gt; 2 0 0 0-7&lt;BR /&gt;1618850 1618850 U &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;vmx-vcpu-0&lt;/FONT&gt;&lt;/STRONG&gt;:vCLS-d68e9ed4-deab- 507.596 WAIT 20.893 0.000 IDLE 486.196 479.341 0.466 0 -1 pct 1000 vm.1618842 497 &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;7&lt;/FONT&gt;&lt;/STRONG&gt; 7 0 0 0-7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 06:05:43 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2982622#M289664</guid>
      <dc:creator>YongDong</dc:creator>
      <dc:date>2023-08-17T06:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to see VM vCPU to Host CPU mapping?</title>
      <link>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2982646#M289670</link>
      <description>&lt;P&gt;Hey there!&lt;/P&gt;&lt;P&gt;Understanding the mapping of VM's vCPUs to the host's physical or logical CPUs can be quite valuable, especially when troubleshooting performance or fine-tuning your environment.&lt;/P&gt;&lt;P&gt;To see this mapping in ESXi:&lt;/P&gt;&lt;P&gt;ESXTOP: This is your go-to tool. Connect to your host using SSH and run esxtop.&lt;/P&gt;&lt;P&gt;Press c for the CPU view.&lt;BR /&gt;Identify your VM by its World ID.&lt;BR /&gt;The column PCPU USED% and PCPU UTIL% will tell you on which physical CPU the VM's vCPU is running.&lt;BR /&gt;vCenter Performance Charts:&lt;/P&gt;&lt;P&gt;Select the VM in question.&lt;BR /&gt;Navigate to the "Performance" tab and then to "Advanced".&lt;BR /&gt;Choose 'Chart Options' and under 'CPU', select the metric 'Core Utilization'. This will give you an idea of which core the vCPUs are utilizing.&lt;BR /&gt;However, do note that ESXi employs a CPU scheduler which dynamically schedules vCPUs to run on any available physical CPU (pCPU) core, depending on the current load and other factors. This means the mapping isn't static and can change over time as the scheduler deems necessary.&lt;/P&gt;&lt;P&gt;For in-depth examination or if you're looking into CPU affinity settings (which I'd advise caution with), VMware's official documentation or the VMware communities would be a great place to dive deeper.&lt;/P&gt;&lt;P&gt;Hope this gives you a good starting point!&lt;BR /&gt;Best,&lt;BR /&gt;Ansar&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 07:59:51 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ESXi-Discussions/How-to-see-VM-vCPU-to-Host-CPU-mapping/m-p/2982646#M289670</guid>
      <dc:creator>ansarabass</dc:creator>
      <dc:date>2023-08-17T07:59:51Z</dc:date>
    </item>
  </channel>
</rss>

