2012-10-05 51 views
10

我在我的OSX 10.8.2机器上运行了VirtualBox 4.2.1的centos 6.3,并且遇到了我不理解的延迟问题。基本上,每个http请求到任何地方都会有额外的5000毫秒延迟。 Ping没有额外的延迟。CentOS VirtualBox 5 http请求上的第二个延迟

screenshot of latency issue

[[email protected] ~]$ curl -o /dev/null https://google.com -w "" 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
110 220 110 220 0  0  42  0 0:00:05 0:00:05 --:--:-- 7586 
[[email protected] ~]$ curl -o /dev/null https://google.com -w "" 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
110 220 110 220 0  0  42  0 0:00:05 0:00:05 --:--:-- 7586 
[[email protected] ~]$ curl -o /dev/null https://google.com -w "" 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
110 220 110 220 0  0  42  0 0:00:05 0:00:05 --:--:-- 7857 
[[email protected] ~]$ ping google.com 
PING google.com (74.125.224.66) 56(84) bytes of data. 
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=1 ttl=63 time=7.64 ms 
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=2 ttl=63 time=6.26 ms 
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=3 ttl=63 time=8.69 ms 
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=4 ttl=63 time=7.89 ms 
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=5 ttl=63 time=5.99 ms 
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=6 ttl=63 time=8.64 ms 

为了记录在案,我有相同的VirtualBox的/ OSX环境的Ubuntu 12.04.1虚拟机,也不会遇到这个问题。

screenshot of not latency issue

回答

5

好吧,原来的问题是DNS问题。

基本上CentOS VirtualBox配置为使用10.0.2.3的DNS服务器,它本身就是内部的,但可能与我们网络上的东西冲突。

无论如何,使用不同的DNS服务器解决了这个问题。