OpenVZ Forum


Home » General » Support » Slow first ping to any VE IP? It's driving me crazy!
Slow first ping to any VE IP? It's driving me crazy! [message #21682] Sun, 14 October 2007 11:27 Go to next message
tomfra is currently offline  tomfra
Messages: 28
Registered: September 2007
Junior Member
This is really a strange problem.

When I ping any of the IP addresses assigned to VEs on my Hardware Node (OpenVZ), the first ping is very often (but not always) extremely slow but the consecutive pings are OK.

I have tested this from my home PC as well as from one different server located in a different data center.

This is an example of such a ping:

PING 195.242.153.137 (195.242.153.137) 56(84) bytes of data.
64 bytes from 195.242.153.137: icmp_seq=0 ttl=55 time=401 ms
64 bytes from 195.242.153.137: icmp_seq=1 ttl=55 time=13.2 ms
64 bytes from 195.242.153.137: icmp_seq=2 ttl=55 time=10.9 ms
64 bytes from 195.242.153.137: icmp_seq=3 ttl=55 time=10.7 ms
64 bytes from 195.242.153.137: icmp_seq=4 ttl=55 time=10.6 ms

When you repeat the same ping after a short while, everything is OK. When you wait a few more minutes, it happens again. It looks like some caching mechanism is in place but I am not a "network guru".

You can try it yourself - ping 195.242.153.135, 195.242.153.137, 195.242.153.140, 195.242.153.142.

I thought it could have been caused by firewall but I disabled CSF/iptables on both the HN and VEs and the problem persisted.

Pinging the main hardware node IP always works great so it is something that has to be related to the VE network setup.

Any ideas are very welcome, it's driving me crazy!

Tomas


Do you really believe the Internet is a safe place?
IdentityCloaker.com - Take Back Your Privacy!

[Updated on: Mon, 15 October 2007 03:16]

Report message to a moderator

Re: Slow first ping to any VE IP? It's driving me crazy! [message #21683 is a reply to message #21682] Sun, 14 October 2007 11:42 Go to previous messageGo to next message
tomfra is currently offline  tomfra
Messages: 28
Registered: September 2007
Junior Member
This problem has been solved. I posted the same question at lxlabs forums and got the answer there. You can see it at http://forum.lxlabs.com/index.php?t=msg&goto=15488 . I wanted to delete this topic and was unable to. Sorry for that...

Tomas


Do you really believe the Internet is a safe place?
IdentityCloaker.com - Take Back Your Privacy!
Re: [SOLVED] Slow first ping to any VE IP? It's driving me crazy! [message #21692 is a reply to message #21682] Mon, 15 October 2007 03:16 Go to previous messageGo to next message
tomfra is currently offline  tomfra
Messages: 28
Registered: September 2007
Junior Member
Actually, the problem is not solved yet I am afraid. So if anyone has some ideas, please share them...

Tomas



Do you really believe the Internet is a safe place?
IdentityCloaker.com - Take Back Your Privacy!
Re: [SOLVED] Slow first ping to any VE IP? It's driving me crazy! [message #21702 is a reply to message #21692] Mon, 15 October 2007 08:14 Go to previous messageGo to next message
khorenko is currently offline  khorenko
Messages: 533
Registered: January 2006
Location: Moscow, Russia
Senior Member
Hello Tomas,

most probably you should blame ARP caching.

When you ping the host for the first time (or after some timeout) the node doesn't have a corresponding ARP entry (the destination ARP entry or default gateway ARP entry). So the node issues an ARP request for destination IP or default gateway IP or IP of the next gateway. This takes time, and the same algorithm is true for each gateway the packet goes through.

--
Konstantin.


If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
Re: Slow first ping to any VE IP? It's driving me crazy! [message #21721 is a reply to message #21682] Mon, 15 October 2007 11:34 Go to previous messageGo to next message
tomfra is currently offline  tomfra
Messages: 28
Registered: September 2007
Junior Member
I have asked the same question at Experts Exchange and just today got a similar answer there. I was told to do:

c:\>arp -s <ip.add.res.s> <ma-ca-dd-re-ss>

I tried it from my home PC (Win XP) and it worked but the question is how do I make the cache record permament for every computer without needing each of them to run this command?

I thought I should do this on the hardware node itself and that this would perhaps do the trick but the linux command "arp" has apparently different syntax so I will have to take a look at that.

But shouldn't this all be done automatically?

There is one thing I should mention. I compiled the openvz kernel myself and there is a chance I could have done a mistake when doing so. For example I just found that I didn't compile it with "CONFIG_BRIDGE_EBT_ARP" and all the other EBT related options. Do you think this could be a part of the problem? I've just checked the kernel config for the default openvz kernel and it is included in there...

Tomas





Do you really believe the Internet is a safe place?
IdentityCloaker.com - Take Back Your Privacy!
Re: Slow first ping to any VE IP? It's driving me crazy! [message #21723 is a reply to message #21721] Mon, 15 October 2007 12:16 Go to previous messageGo to next message
khorenko is currently offline  khorenko
Messages: 533
Registered: January 2006
Location: Moscow, Russia
Senior Member
But why this first time access delay disturbs you so much?
If you plan to deal with that IP address often - you won't get this delay but if not - well, is it a horrow thing to wait for half a second once?

Talking about the kernel config: i suppose the best scenario creating a custom config - to take a default OpenVZ config and change only those options which are known to you. It seems to me this is the simplest way to eliminate the doubts if you did a mistake during the config customization.
BTW, if you want to check if that option affects somehow - just reboot into the default OpenVZ kernel and check. Smile but IMHO - it's unlikely.

config BRIDGE_EBT_ARP
tristate "ebt: ARP filter support"
depends on BRIDGE_NF_EBTABLES
help
This option adds the ARP match, which allows ARP and RARP header field
filtering.


If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
Re: Slow first ping to any VE IP? It's driving me crazy! [message #21725 is a reply to message #21723] Mon, 15 October 2007 12:44 Go to previous messageGo to next message
tomfra is currently offline  tomfra
Messages: 28
Registered: September 2007
Junior Member
finist wrote on Mon, 15 October 2007 14:16

But why this first time access delay disturbs you so much?
If you plan to deal with that IP address often - you won't get this delay but if not - well, is it a horrow thing to wait for half a second once?


I was asked the same question at the experts exchange... Yes, it is a problem for me because there will be some VPN stuff running on it and because of the way the custom created VPN client software measures connection "health".

Anyway, since it works great for others I do not see a reason I should be getting that delay. The delay is sometimes up to 800ms and that's very noticeable IMHO. It's very noticeable even when you browse web pages on the VPSes.

Tomas



Do you really believe the Internet is a safe place?
IdentityCloaker.com - Take Back Your Privacy!
Re: Slow first ping to any VE IP? It's driving me crazy! [message #21727 is a reply to message #21682] Mon, 15 October 2007 12:52 Go to previous messageGo to next message
tomfra is currently offline  tomfra
Messages: 28
Registered: September 2007
Junior Member
I've just tried rebooting with the default openvz kernel - didn't help.

Tomas



Do you really believe the Internet is a safe place?
IdentityCloaker.com - Take Back Your Privacy!
Re: Slow first ping to any VE IP? It's driving me crazy! [message #21984 is a reply to message #21682] Thu, 18 October 2007 11:19 Go to previous messageGo to next message
tomfra is currently offline  tomfra
Messages: 28
Registered: September 2007
Junior Member
This question is still open. It's apparently so mysterious that nobody knows what the problem is exactly...

Some facts:
-----------

*) Response to ping from the main hardware node IP and from the gateway is always perfect without the initial delay. Only pinging the VPS IPs from the "outside" shows a delay of roughly 200-800ms on the first ping. The consequent pings are OK.

*) It's possibly caused by ARP cache expiration. One idea is that the hardware node does not store the VPS IPs in the ARP table as permanent. However, the "arp -a" command does show the record *is* indeed permanent, unless I am misinterpreting it.

*) The VPS network settings is the default as set by HyperVM.

As always, any ideas are very welcome!

Tomas



Do you really believe the Internet is a safe place?
IdentityCloaker.com - Take Back Your Privacy!
Re: Slow first ping to any VE IP? It's driving me crazy! [message #42250 is a reply to message #21984] Sat, 26 March 2011 04:56 Go to previous messageGo to next message
cbschuld is currently offline  cbschuld
Messages: 5
Registered: April 2009
Location: Phoenix, AZ
Junior Member
Tomas:

I know this thread is quite old; did you (or anyone for that matter) come to a resolution on this problem. I am experiencing a similar situation and I have not been able to resolve it.

I just applied the reverse DNS update/concept you discussed in the thread as we were merely using /etc/hosts.... we'll see see how it goes.

Thanks,
Chris
Re: Slow first ping to any VE IP? It's driving me crazy! [message #42251 is a reply to message #42250] Sat, 26 March 2011 05:00 Go to previous messageGo to next message
tomfra is currently offline  tomfra
Messages: 28
Registered: September 2007
Junior Member
Well, since then I moved to a different dedicated server in a different datacenter and the problem did not appear then.

Tomas


Do you really believe the Internet is a safe place?
IdentityCloaker.com - Take Back Your Privacy!
Re: Slow first ping to any VE IP? It's driving me crazy! [message #42254 is a reply to message #42251] Sat, 26 March 2011 14:12 Go to previous messageGo to next message
cbschuld is currently offline  cbschuld
Messages: 5
Registered: April 2009
Location: Phoenix, AZ
Junior Member
Tomas,

Thanks for the reply (I was hoping you might say "oh yea, use this setting"); we have multiple servers in our rack all experiencing this same issue. We replaced our switch this week and the experience is still the same. It's basically "initial communication" slowness... I'll keep digging!

Thanks for taking time to reply!

--Chris
Re: Slow first ping to any VE IP? It's driving me crazy! [message #42257 is a reply to message #42254] Sat, 26 March 2011 21:45 Go to previous messageGo to next message
tomfra is currently offline  tomfra
Messages: 28
Registered: September 2007
Junior Member
Well, I can only guess it could be caused by a firewall on the DC level, or something similar, but it is so long since I had this problem, I do not remember much about it to be honest.


Do you really believe the Internet is a safe place?
IdentityCloaker.com - Take Back Your Privacy!

[Updated on: Sat, 26 March 2011 21:45]

Report message to a moderator

Re: Slow first ping to any VE IP? It's driving me crazy! [message #42258 is a reply to message #42257] Sun, 27 March 2011 03:55 Go to previous message
ajc1 is currently offline  ajc1
Messages: 1
Registered: March 2011
Location: SLC, UT, USA
Junior Member
I used to have this problem and it was an ARP/routiing issue as I recall. I ended up installing Quagga on my firewall pair and all host nodes and using OSPF to resolve it. This has the added benefit of making live migrations very easy, as well as when you run out of IP space and obtain additional subnets.

In other words, when a request hits one of my firewalls for an IP of a VE, the firewalls know right off the bat via OSPF the IP of the host node that VE lives on and thus where the packets should be routed to.

This does require that the firewalls and host nodes live in a separate subnet from the VE's.

This solved the first packet delay for me... YMMV.
Previous Topic: vzquota and rsync backup
Next Topic: Bootlader
Goto Forum:
  


Current Time: Sun Aug 04 12:57:07 GMT 2024

Total time taken to generate the page: 0.02820 seconds