Virtual Machine Tx threads explained

Looking at the ESXi VMkernel network path you will notice it consists of Netpoll threads and Tx threads. Netpoll threads receive traffic from an ESXi host perspective where Tx threads transmit data from a VM to another VM or physical component.

By default, each VM is armed with only one Tx thread. As network packets are transmitted from the VM towards the pNIC layer via the VMkernel, ESXi consumes CPU cycles. These cycles, or CPU time, will be accounted to the VM itself. Tx threads are identified in esxtop in the CPU view as NetWorld-VM-XXX. This ensure that you to have a clear picture on what the costs are of transmitting large numbers of networks packets from that specific VM. It allows you to have a better understanding if a VM is constrained by the amount of CPU time that is spent on transmission of data.

Again, only one Tx thread is spun up by default. That correlates with one CPU core. This is why the NetWorld will not trespass the ±100% of %USED.

In the screenshot above, the VM in question was running the transmit side of the packet-generator test. The NetWorld-VM-69999 world was constantly running up to 100%. This is a clear example of a VM being constrained by only one Tx thread. A relatively quick solution is to add an additional Tx thread. You can add more as needs require. Looking at the network view in esxtop, you will be able to see what vNIC is processing the largest amount of network I/O. In this specific case, we knew exactly what vNIC was in extra need of network processing power.

Additional Tx threads

You can add an additional Tx thread per vNIC. This is configured as an advanced parameter in the VM configuration. The ethernetX.ctxPerDev = 1 advanced setting is used for this. The ‘X’ stands for the vNIC for which the parameter is set. You can configure each vNIC with a separate Tx thread. However, that will create unnecessary Tx threads in your VM and potentially consume CPU time in an inefficient way, because not every vNIC is likely to require its own Tx thread. It really is a setting that is driven by demand. If your workload running in the VMs has a large appetite for network I/O, take a closer look at what vNIC could benefit from additional Tx threads.

Once the additional Tx thread(s) are configured, you want to verify that it is activated. Additional Tx threads will appear in esxtop in the CPU view as NetWorld-Dev-<id>-Tx. By being added as a separate world, a clear overview can be generated on which NetWorld is processing the majority of network I/O as a result of the CPU usage associated with that thread.

In this screenshot, you will notice that the additional Tx thread is active and processing network I/O. This is one way to determine if your advanced setting is working correctly. You can also use a net-stats command to do so.

More information…

…can be found in the vSphere 6.5 Host Resources Deep Dive book that is available on Amazon!

Read More

Host Resources Deep Dive Released!

The time has finally come that we published our (e)book. It is available via Amazon using the following links:

PaperbackKindle (ebook)
Amazon USAmazon US 
Amazon DEAmazon DE
Amazon MexicoAmazon NL
Amazon UKAmazon UK
 Amazon JapanAmazon Japan
 Amazon IndiaAmazon India

 

Countless hours, weeks, months has gone into this project. It all began in the beginning of 2016. Frank and I had a lot of discussions about consistent performance and how to optimize while keeping consolidation ratios in mind. At the time, I was working on a NFV platform that was plotted on a virtual datacenter and Frank was working on his epic NUMA content. It all led to the idea of writing down our findings in a book.

It is almost like going against the current; we were looking into ESXi host behaviour, while the world is advancing to higher services running on top of vSphere. Why even bother about the hypervisor? It is all commodity after all, right? Well… not per se. It is all about understanding what you are doing on each level, not about just throwing hardware at a performance/capacity requirement. We began to talk about our ideas to our peers to see if they were interesting and feasible to include in a book.

We quickly came to the conclusion that there are a lot of unknowns when it comes to tuning your virtual environment to accompany distributed services like vSAN and NSX, latency sensitive workloads and right-sizing your VMs in general. We hope our book will help vSphere administrators, architects, consultants, aspiring VCDX-es and people eager to learn more about the elements that control the behavior of CPU, memory, storage and network resources.

I am extremely grateful that I was part of realising this book. It is really inspiring to work closely with Frank. He has a tremendous way of expressing his train of thought and has a lot of experience in creating tech books. Our discussions about tech or general topics are always a blast.

All our effort led to our (and my first) publishing which contains:

  • 122.543 words
  • 5217 paragraphs
  • 23 chapters
  • 569 pages
  • 311 screenshots and diagrams

The main challenge was to dig deep in the world of host resources while working a very busy day job at my beloved customers. The effort required was immense. Think a VCDX path times 10. At least, that is how it felt to me. But it was so much fun. I remember a few weeks ago; We were working on the last storage content until deep into the night, like we did almost every day for the last few months, and we were still so psyched at 3.30AM. So even after a very intense period, we still got the kicks out of talking about the content and book in the middle of the night!

We tried to keep the price as low as possible to allow everybody interested in it to be able to buy it. We feel we managed to do that even though the book contains 569 pages. The digital book will following after some PTO and both VMworlds.

As discussed in a previous post; We attended several VMUGs to talk about content included in the book. We are now also confirmed to have a ‘part deux’ of last years VMworld top 10 session this year in Las Vegas and in Barcelona (session 1872). We really look forward seeing you there! Please let us know your thoughts on our book, even write a review on Amazon if you will. It is very rewarding to hear it helped you in some way. Thanks!

Read More

Datanauts: Diving Deep Into vSphere Host Resources

Last week Frank and I had the pleasure and honor to join Chris Wahl and Ethan Banks in their awesome Datanauts podcast!

We discussed our upcoming book and the rationale behind it. After that we thoroughly discussed some topics on CPU architecture and Non-Uniform Memory Access (NUMA).

Don’t miss out and listen in on this and other amazing Datanauts podcasts:

Be sure to follow these accounts to get the latest updates about the book.

Twitter: @HostDeepDive
Facebook: HostDeepDive

 

Read More

VMUGs and VMworlds

While being extremely busy to complete our upcoming book, Frank and I are planning to deliver our vSphere 6.5 : Host Resources Deep Dive sessions at several VMUG’s. Just last week we had a blast presenting some Compute and Networking content at one of the largest UserCon VMUGs in the world, the NLVMUG. It was one of the best VMUG UserCons I have ever visited. I do love these days as you really get to connect with your peers and share knowledge and experiences! You can’t afford to miss your local VMUG.

It was very good to see that our room was packed! We got loads of positive feedback which is always nice. It is pretty rewarding to see that the VMware community is taking great interest in our content which is basically about the VMware vSphere layer and how host resources are consumed in ESXi 6.5. To give you some impressions of our session last week, check the pictures below:



After thoroughly enjoying the NLVMUG day, we were on the lookout to attend more VMUGs. So, after having contact with several VMUG leaders, it looks like we are presenting at the following VMUGs:

  • Belgium VMUG in Mechelen, 12th of May  (Didn’t work out planning-wise)
  • German VMUG in Frankfurt, 14th of June
  • UK VMUG in London, 22nd of June

If everything follows through, it will be a very good way to meet up with even more people. Be sure to mark these dates your agenda’s, the listed VMUGs are going to be epic!

VMworld 2017

In other news, we also submitted a session for both VMworld US and EMEA 2017. It will be a sequel to our VMworld 2016 top 10 session. Keep an eye out for session ID 1872vSphere 6.5 Host Resources Deep Dive : Part 2.

We will get the book done long before VMworld, so we are really excited to see the reactions on it. We are working effortlessly, as are our reviewers, to get create a book that can help everybody working with virtual datacenters in their daily job!

Hope to see you at a VMUG or at a VMworld conference!

Read More

AWS direct connect – Connectivity matters!

I had some discussion about AWS (Amazon Web Services) and how to connect to their services, especifically when you run production workloads on virtual machines in AWS. Bringing workloads to public clouds, means that your business and/or your customers are more depended on their (internet) connectivity to be able to reach the workloads running on public cloud environment.

Connectivity matters

There are a multiple solutions out there to make your internet facing connections highly available. Bandwidth-wise there aren’t really any challenges, aside from the costs… in the Netherlands at least. It is easy to get a 1GbE or better connection from your datacenter or office location(s).

The thing we were discussing about, is the latency between you and your public cloud services. Even though it’s strongly depending on what workloads you are planning to run in AWS, you want a decent user experience. Thus a lowest possible network latency towards that workload. That brings us to www.cloudping.info. A nifty web tool to give you an idea on what your latency is to the regions from where AWS offers their services. It’s output looks like this:

awscloudping

Since I’m in the Netherlands, the EU Frankfurt site in Germany is the closest AWS site for me. So an average ping time of 23ms… Note: This number is depending strongly on how your internet provider or your datacenter is connected to AWS via peering on various Internet Exchanges or via transits.

(more…)

Read More

Lab test: vSphere Fault Tolerance performance impact

Triggered by some feedback on the VMware reddit channel, I was wondering what is holding us back in adopting the vSphere Fault Tolerance (FT) feature. Comments on Reddit stated that although the increased availability is desirable, the performance impact is holding them back to actually use it in production environments.

Use cases for FT could be, according to the vSphere 6 documentation center:

  • Applications that need to be available at all times, especially those that have long-lasting client connections that users want to maintain during hardware failure.
  • Custom applications that have no other way of doing clustering or other forms of application resiliency.
  • Cases where high availability might be provided through custom clustering solutions, which are too complicated to configure and maintain.

However, the stated use cases only focus on availability and do not seem to incorporate a performance impact when enabling FT. Is there a sweet-spot for applications that do need high resiliency, but do not require immense performance and could coop with a latency impact due to FT? It really depends on the application workload. A SQL server typically generates more FT traffic then for instance a webserver that primarily transmits. So the impact of enabling FT will impact some workloads more then other.

Requirements

Since the introduction of vSphere 6: Multi-Processor Fault Tolerance (SMP-FT), the requirements for FT are a bit more flexible. The compute maximums for a FT enabled VM are 4 vCPUs and 64GB memory. The use of eager zero thick disks is no longer a requirement. So thin, lazy zeroed thick and eager zero thick provisioned disks are all supported in SMP-FT!
(more…)

Read More