VMWare ESXi, RHEL, LUKS and network latency
<p>My company is running into a network performance problem that seemingly has all of the "experts" we're working with (VMWare support, RHEL support, our managed services hosting provider) stumped.</p>

<p>The issue is that network latency between our VMs (even VMs residing on the same physical host) increases--up to 100x or more!--with network throughput. For example, without any network load, latency (measured by ping) might be ~0.1ms.  Start transferring a couple 100MB files, and latency grows to 1ms.  Initiate a bunch (~20 or so) concurrent data transfers between two VMs, and the latency between the VMs can increase to upwards of 10ms.</p>

<p>This is a huge problem for us because we have application server VMs hosting processes that might issue 1 million or so queries against a database server (different VM) per hour.  Adding a millisecond or two to each query therefore increases our runtime substantially--sometimes doubling or tripling our expected durations.</p>

<p>We've got what I would think is a pretty standard environment:</p>

<ul>
<li>ESXi 6.0u2</li>
<li>4 Dell M620 blades with 2x Xeon E5-2650v2 processors and 128GB RAM</li>
<li>SolidFire SAN</li>
</ul>

<p>And our base VM configuration consists of:</p>

<ul>
<li>RHEL7, minimal install</li>
<li>Multiple LUNs configured for mount points at /boot, /, /var/log, /var/log/audit, /home, /tmp and swap</li>
<li>All partitions <em>except</em> /boot encrypted with LUKS (over LVM)</li>
</ul>

<p>Our database server VMs are running Postgres 9.4.</p>

<p>We've already tried the following:</p>

<ul>
<li>Change the virtual NIC from VMNETx3 to e1000 and back</li>
<li>Adjust RHEL ethernet stack settings</li>
<li>Using ESXi's "low latency" option for the VMs</li>
<li>Upgrading our hosts and vCenter from ESX 5.5 to 6.0u2</li>
<li>Creating bare-bones VMs (setup as above with LUKS, etc., but without any of our production services on them) for testing</li>
<li>Moving the datastore from the SSD SolidFire SAN to local (on-blade) spinning storage</li>
</ul>

<p>None of these improved network latency.  The only test that showed expected (non-deteriorating) latency is when we set up a second pair of bare-bones VMs <em>without</em> LUKS encryption.  Unfortunately, we need fully encrypted partitions (for which we manage the keys) because we are dealing with regulated, sensitive data.</p>

<p>I don't see how LUKS--in and of itself--can be to blame here.  Rather, I suspect that LUKS running with some combination of ESX, our hosting hardware, and/or our VM hardware configuration is to blame.</p>

<p>I performed a test in a much wimpier environment (MacBook Pro, i5, 8GB RAM, VMWare Fusion 6.0, Centos7 VMs configured similarly with LUKS on LVM and the same testing scripts) and was unable to reproduce the latency issue.  Regardless of how much network traffic I sent between the VMs, latency remained steady at about 0.4ms.  And this was on a laptop with a ton of the things going on!</p>

<p>Any pointers/tips/solutions will be greatly appreciated!</p>