Como aumentar a taxa de transferência de dados entre minhas VMs

4

Eu vi muitos artigos, mas não respondi a minha pergunta.

Meu servidor usa o VMware vSphere Hypervisor. Existem 20 máquinas virtuais no meu servidor.

Sistema operacional da VM: centos7

Eu já mudei minha largura de banda vSwitch e Rede VM para 1000000000 KB / s

para que outro vm não afete meu dtr (taxa de transferência de dados).

Agora meu dtr é 170 ~ 200 MB / s

Como faço para aumentar meu dtr para 500 MB / s, para que eu possa transferir um arquivo de 20 GB de A vm para B vm mais rápido.

VM A : nc -l 20000 > /dev/null

VM B : time dd if=/dev/zero bs=100M count=200 | nc <VM A> 20000

200+0 records in
200+0 records out
20971520000 bytes (21 GB) copied, 122.466 s, 171 MB/s

real    2m2.479s
user    0m2.148s
sys     3m10.841s

Obrigado em avançado.

    
por kevin su 07.11.2018 / 08:52

2 respostas

9

Como parece ser uma solução, estou adicionando como resposta:

Ao criar uma VM, o adaptador de rede padrão é um Intel E1000E emulado. Este adaptador funciona na maioria dos sistemas operacionais sem drivers adicionais, mas é instável e só usa 1Gbit.

Para usar tráfego total de 10 Gbit entre vms no mesmo host (ou através de conexões de 10 Gbit para sua rede), você precisa adicionar um adaptador vmxnet3. Você não pode alterar o tipo de adaptador, você tem que criar um novo. Mesmo se você usar o powercli para alterar o tipo de adaptador, ele criará um novo adaptador, para que as configurações de rede e o endereço MAC sejam redefinidos.

Para que o adaptador vmxnet3 funcione, em alguns sistemas (especialmente no Windows), é necessário instalar o VMware Tools, já que os drivers desse adaptador estão incluídos (Obrigado ao Gerald e John pelas informações adicionais).

    
por 07.11.2018 / 10:08
-1

Use a interface de virtio . É um dispositivo para-virtualizado exposto ao host pelo kernel do guess. Não há mais adaptador de rede na adivinhação, reduzindo significativamente a sobrecarga do driver. Seu suporte foi incluído em todos os kernels do Linux ⩾ 2.6.25

So-called "full virtualization" is a nice feature because it allows you to run any operating system virtualized. However, it's slow because the hypervisor has to emulate actual physical devices such as RTL8139 network cards . This emulation is both complicated and inefficient.

Virtio is a virtualization standard for network and disk device drivers where just the guest's device driver "knows" it is running in a virtual environment, and cooperates with the hypervisor. This enables guests to get high performance network and disk operations, and gives most of the performance benefits of paravirtualization.

https://wiki.libvirt.org/page/Virtio

Veja também a tag e

Eu não sei o nome exato do virtio no VMware, mas parece que ele é VMXNET 3

VMXNET 3: The VMXNET 3 adapter is the next generation of a paravirtualized NIC designed for performance, and is not related to VMXNET or VMXNET 2. It offers all the features available in VMXNET 2, and adds several new features like multiqueue support (also known as Receive Side Scaling in Windows), IPv6 offloads, and MSI/MSI-X interrupt delivery. For information about the performance of VMXNET 3, see Performance Evaluation of VMXNET3 Virtual Network Device.

Choosing a network adapter for your virtual machine (1001805)

Você pode ler a Avaliação de desempenho do dispositivo de rede virtual VMXNET3 da VMware

Para mais informações, leia as recomendações do Virtualbox sobre como melhorar o desempenho, muitas das quais se aplicam também ao VMware

6.11. Improving network performance

VirtualBox provides a variety of virtual network adapters that can be "attached" to the host's network in a number of ways. Depending on which types of adapters and attachments are used the network performance will be different. Performance-wise the virtio network adapter is preferable over Intel PRO/1000 emulated adapters, which are preferred over PCNet family of adapters. Both virtio and Intel PRO/1000 adapters enjoy the benefit of segmentation and checksum offloading. Segmentation offloading is essential for high performance as it allows for less context switches, dramatically increasing the sizes of packets that cross VM/host boundary.

Three attachment types: internal, bridged and host-only, have nearly identical performance, the internal type being a little bit faster and using less CPU cycles as the packets never reach the host's network stack. The NAT attachment is the slowest (and safest) of all attachment types as it provides network address translation. The generic driver attachment is special and cannot be considered as an alternative to other attachment types.

The number of CPUs assigned to VM does not improve network performance and in some cases may hurt it due to increased concurrency in the guest.

Here is the short summary of things to check in order to improve network performance:

  1. Whenever possible use virtio network adapter, otherwise use one of Intel PRO/1000 adapters;
  2. Use bridged attachment instead of NAT;
  3. Make sure segmentation offloading is enabled in the guest OS. Usually it will be enabled by default. You can check and modify offloading settings using ethtool command in Linux guests.
  4. Perform a full, detailed analysis of network traffic on the VM's network adaptor using a 3rd party tool such as Wireshark. To do this, a promiscuous mode policy needs to be used on the VM's network adaptor. Use of this mode is only possible on networks: NAT Network, Bridged Adapter, Internal Network and Host-only Adapter.

    To setup a promiscuous mode policy, either select from the drop down list located in the Network Settings dialog for the network adaptor or use the command line tool VBoxManage; for details, refer to Section 8.8, “VBoxManage modifyvm”.

    Promiscuous mode policies are:

    • deny (default setting) which hides any traffic not intended for this VM's network adaptor.
    • allow-vms which hides all host traffic from this VM's network adaptor, but allows it to see traffic from/to other VMs.
    • allow-all which removes all restrictions - this VM's network adaptor sees all traffic.
    
por 08.11.2018 / 08:51