vhost_net, macvtap 및 virtio를 사용한 ping 대기 시간

vhost_net, macvtap 및 virtio를 사용한 ping 대기 시간

저는 네트워크 처리량과 대기 시간을 테스트해 왔으며 측정 결과가 예상한 대로인지 궁금합니다. 테스트를 위해 커널 3.5.2-3.fc17.86_64를 사용하여 호스트와 게스트 모두에 Fedora 17을 사용했습니다.

기가비트 인터페이스를 사용하여 호스트에서 LAN에 있는 외부 서버를 ping하면 결과는 다음과 같습니다.

# ping -c 10 172.16.1.1
PING 172.16.1.1 (172.16.1.1) 56(84) bytes of data.
64 bytes from 172.16.1.1: icmp_req=1 ttl=64 time=0.109 ms
64 bytes from 172.16.1.1: icmp_req=2 ttl=64 time=0.131 ms
64 bytes from 172.16.1.1: icmp_req=3 ttl=64 time=0.145 ms
64 bytes from 172.16.1.1: icmp_req=4 ttl=64 time=0.116 ms
64 bytes from 172.16.1.1: icmp_req=5 ttl=64 time=0.110 ms
64 bytes from 172.16.1.1: icmp_req=6 ttl=64 time=0.114 ms
64 bytes from 172.16.1.1: icmp_req=7 ttl=64 time=0.112 ms
64 bytes from 172.16.1.1: icmp_req=8 ttl=64 time=0.117 ms
64 bytes from 172.16.1.1: icmp_req=9 ttl=64 time=0.119 ms
64 bytes from 172.16.1.1: icmp_req=10 ttl=64 time=0.128 ms

--- 172.16.1.1 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 8999ms
rtt min/avg/max/mdev = 0.109/0.120/0.145/0.011 ms

게스트에서 LAN에 있는 동일한 외부 호스트를 핑하면 대기 시간이 훨씬 길어진 것 같습니다.

# ping -c 10 172.16.1.1
PING 172.16.1.1 (172.16.1.1) 56(84) bytes of data.
64 bytes from 172.16.1.1: icmp_req=1 ttl=64 time=0.206 ms
64 bytes from 172.16.1.1: icmp_req=2 ttl=64 time=0.352 ms
64 bytes from 172.16.1.1: icmp_req=3 ttl=64 time=0.518 ms
64 bytes from 172.16.1.1: icmp_req=4 ttl=64 time=0.351 ms
64 bytes from 172.16.1.1: icmp_req=5 ttl=64 time=0.543 ms
64 bytes from 172.16.1.1: icmp_req=6 ttl=64 time=0.387 ms
64 bytes from 172.16.1.1: icmp_req=7 ttl=64 time=0.348 ms
64 bytes from 172.16.1.1: icmp_req=8 ttl=64 time=0.364 ms
64 bytes from 172.16.1.1: icmp_req=9 ttl=64 time=0.345 ms
64 bytes from 172.16.1.1: icmp_req=10 ttl=64 time=0.334 ms

--- 172.16.1.1 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 8999ms
rtt min/avg/max/mdev = 0.206/0.374/0.543/0.093 ms

(LAN, 호스트 및 게스트는 테스트 중에 유휴 상태입니다.)

vhost_net 및 macvtap 모듈이 호스트에 로드되고 qemu가 -netdev vhost=on 옵션을 사용하여 libvirtd에 의해 시작되었습니다.

이는 예상된 정상적인 현상입니까, 아니면 다른 사람들이 더 나은 지연 시간을 보입니까? 상황을 개선하기 위해 무엇이든 시도해 볼 수 있나요? 다른 사람들은 어떤 지연 시간을 보나요?

답변1

로드된 모듈이 잘 구성된 VM을 의미하는 것은 아닙니다. 테스트 중인 VM이 정확히 어떻게 설정되어 있나요?

RHEL 5, 브리징 및 virtio_net을 사용하면 물리적 호스트 간에 ~0.1ms의 대기 시간이 발생하고 VM 내부에서 핑할 때 ~0.18ms의 대기 시간이 발생합니다. 간단한 브리지, 최적화나 변경 없음, 꽤 오래된 RHEL 5 스택.

관련 정보