OpenVZ Forum


Home » General » Support » [Solved] First slow ping on CTs
[Solved] First slow ping on CTs [message #32084] Fri, 18 July 2008 19:06 Go to next message
ulver is currently offline  ulver
Messages: 12
Registered: July 2008
Junior Member
Hello everyone,

First, sorry for my bad english Crying or Very Sad

I have a little problem, and i don't understand.

When i ping a VEs, the first ping is very slow.
For example :
PING toto (192.168.1.1) 56(84) bytes of data.
64 bytes from toto (192.168.1.1): icmp_seq=1 ttl=64 time=718 ms
64 bytes from toto (192.168.1.1): icmp_seq=2 ttl=64 time=0.223 ms
64 bytes from toto (192.168.1.1): icmp_seq=3 ttl=64 time=0.284 ms

After, it is good for all pings. If i try few seconds later, it's ok, but after 5mn for example the first ping will be slow again.

When i try on a computer (not a VE), the first ping is often higher than the other, but not ~ 500ms or more (30 ms for example, and after 0.2ms)

I tried with venet device, veth device, and it's the same thing. I try on my local network and over the internet, idem.
With veth, when i erase the arp tables on the VE beetween each ping, the problem happens all time. Is it a clue ?

I use Debian :
Linux 2.6.18-12-fza-amd64 #1 SMP

I have no firewall/iptables on the VE or the HN.

I'd want to know 3 things :
- is it normal to have this ?
- is it possible to correct it ?
- does it affect the performance ? For example, on a web server ?

Thank you very much !

[Updated on: Wed, 30 July 2008 12:43]

Report message to a moderator

Re: First slow ping on CTs [message #32128 is a reply to message #32084] Tue, 22 July 2008 11:24 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

1. This delay always happens only if you try to ping any host FROM INSIDE the VE, doesn't it? And when you ping the same host from inside the HN everything is perfect. Am I right?

2. Is this delay happens whet you ping a host using it IP address (not name), for example, "ping 192.168.1.1". Is there a difference between "ping 192.168.1.1" and "ping toto"

3. please show output of the /etc/resolv.conf from HN and from the VE.

4.
Quote:

With veth, when i erase the arp tables on the VE beetween each ping, the problem happens all time. Is it a clue ?


Of course, it has an influence.

Thank You!
Re: First slow ping on CTs [message #32268 is a reply to message #32128] Tue, 29 July 2008 09:03 Go to previous messageGo to next message
ulver is currently offline  ulver
Messages: 12
Registered: July 2008
Junior Member
Hi, thank you for your help.

1) With veth (proxy_arp enabled) and venet :
a) I am inside the VE, I ping any host (not a VE) on the network, the delay happens.
b) I am on any host, I ping any VE, the delay happens.

If I try after another ping, the delay doesn't happen.

2) There is no difference beetween ping toto and ping 192.168.1.1 : the delay happens, i don't think this is a problem of DNS.

3) The /etc/resolv.conf is the same on the HN and the VE.
For example :
nameserver 192.168.1.20

IP of the VE : 192.168.1.1
IP of the HN : 192.168.1.10




I try two solutions with veth :
- with proxy_arp enabled (I follow this tutorial : http://wiki.openvz.org/Virtual_Ethernet_device#Simple_config uration_with_virtual_Ethernet_device). The delay happens.
- with bridge (i bridge eth0 from the host with veth101.0 in a br0) and without proxy_arp, the delays doesn't happen.

So does the problem come from the proxy_arp ?

[Updated on: Tue, 29 July 2008 09:07]

Report message to a moderator

Re: First slow ping on CTs [message #32283 is a reply to message #32268] Wed, 30 July 2008 10:48 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

You are right.
The reason of this delay is the interchange of the "arp who-has", "arp reply" packages.
But veth interface is supposed to be used like bridged interface. You've also done it.
Quote:


- with bridge (i bridge eth0 from the host with veth101.0 in a br0) and without proxy_arp, the delays doesn't happen.


If you want to use it via routing rules you'd better choose venet interface. The first delay with venet should be smaller.
Thank You!
Re: First slow ping on CTs [message #32294 is a reply to message #32283] Wed, 30 July 2008 12:43 Go to previous message
ulver is currently offline  ulver
Messages: 12
Registered: July 2008
Junior Member
Ok, thank you very much for your help ! Smile
Previous Topic: Vmware to openvz ?
Next Topic: The vps is locked by another user
Goto Forum:
  


Current Time: Tue Apr 30 19:55:20 GMT 2024

Total time taken to generate the page: 0.01724 seconds