OpenVZ Forum


Home » General » Support » OpenVZ and OpenVPN
OpenVZ and OpenVPN [message #37999] Sun, 08 November 2009 12:21 Go to next message
caluml is currently offline  caluml
Messages: 5
Registered: November 2009
Junior Member
Hello all,

I am new to OpenVZ but not to virtualisation.

I am running 2.6.26-2-openvz-686 (036test001)

I have created a simple VM with the following config:
KMEMSIZE="11055923:11377049"
LOCKEDPAGES="256:256"
PRIVVMPAGES="65536:69632"
SHMPAGES="21504:21504"
NUMPROC="240:240"
PHYSPAGES="0:2147483647"
VMGUARPAGES="33792:2147483647"
OOMGUARPAGES="26112:2147483647"
NUMTCPSOCK="360:360"
NUMFLOCK="188:206"
NUMPTY="16:16"
NUMSIGINFO="256:256"
TCPSNDBUF="1720320:2703360"
TCPRCVBUF="1720320:2703360"
OTHERSOCKBUF="1126080:2097152"
DGRAMRCVBUF="262144:262144"
NUMOTHERSOCK="360:360"
NUMFILE="9312:9312"
DCACHESIZE="3409920:3624960"
NUMIPTENT="128:128"
AVNUMPROC="180:180"
CPUUNITS="1000"
ONBOOT="yes"
ORIGIN_SAMPLE="vps.basic"
DISKSPACE="1048576:1153024"
DISKINODES="200000:220000"
QUOTATIME="0"
OSTEMPLATE=debian
HOSTNAME="vpn"
NETIF=" ifname=eth0,mac=00:18:51:67:AD:E1,host_ifname=veth101.0,host _mac=00:18:51:91:22:DC "
CAPABILITY="NET_ADMIN:on NET_RAW:on SYS_ADMIN:on "
DEVICES="c:10:200:rw "
IPTABLES="ip_tables ip_conntrack iptable_filter iptable_nat "

I have created br0 with eth0 and veth101.0, and have assigned myself a public IP address within the VM (I have a /29 from my ISP). I've added the correct routes.

Everything works fine.
I can ping fine from inside the VM, with low ping times.
vpn:~# ping google.co.uk
PING google.co.uk (216.239.59.104) 56(84) bytes of data.
64 bytes from gv-in-f104.1e100.net (216.239.59.104): icmp_seq=1 ttl=55 time=68.0 ms
...snip....
64 bytes from gv-in-f104.1e100.net (216.239.59.104): icmp_seq=20 ttl=55 time=63.9 ms
^C
--- google.co.uk ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19085ms
rtt min/avg/max/mdev = 59.055/63.461/69.563/2.892 ms

The ping times are nice and constant.

However, when I ping over an OpenVPN link to the other side, I get strange results:

vpn:~# ping -c 20 xxx
PING xxx (xxx) 56(84) bytes of data.
64 bytes from xxx: icmp_seq=1 ttl=255 time=412 ms
64 bytes from xxx: icmp_seq=2 ttl=255 time=159 ms
64 bytes from xxx: icmp_seq=3 ttl=255 time=160 ms
64 bytes from xxx: icmp_seq=4 ttl=255 time=163 ms
64 bytes from xxx: icmp_seq=5 ttl=255 time=163 ms
64 bytes from xxx: icmp_seq=6 ttl=255 time=458 ms
64 bytes from xxx: icmp_seq=7 ttl=255 time=493 ms
64 bytes from xxx: icmp_seq=8 ttl=255 time=530 ms
64 bytes from xxx: icmp_seq=9 ttl=255 time=565 ms
64 bytes from xxx: icmp_seq=10 ttl=255 time=3573 ms
64 bytes from xxx: icmp_seq=11 ttl=255 time=3572 ms
64 bytes from xxx: icmp_seq=12 ttl=255 time=3574 ms
64 bytes from xxx: icmp_seq=13 ttl=255 time=5568 ms
64 bytes from xxx: icmp_seq=14 ttl=255 time=4579 ms
64 bytes from xxx: icmp_seq=15 ttl=255 time=4565 ms
64 bytes from xxx: icmp_seq=16 ttl=255 time=9563 ms
64 bytes from xxx: icmp_seq=17 ttl=255 time=11563 ms
64 bytes from xxx: icmp_seq=18 ttl=255 time=11555 ms

--- xxx ping statistics ---
20 packets transmitted, 18 received, 10% packet loss, time 19056ms
rtt min/avg/max/mdev = 159.752/3401.350/11563.189/3821.773 ms, pipe 6

Note the strange increasing ping time.
I have also had the following error while running ping:
ping: sendmsg: No buffer space available

I'm not sure what the problem is here - I didn't notice this problem when I was running OpenVPN on the host - but I will recheck.

Any ideas, anyone?
Re: OpenVZ and OpenVPN [message #38000 is a reply to message #37999] Sun, 08 November 2009 14:43 Go to previous messageGo to next message
caluml is currently offline  caluml
Messages: 5
Registered: November 2009
Junior Member
After some testing, I think this is due to my use of the "shaper" openvpn option.

I had shaped the outbound link down, and this seems to have been where the ping (and presumably the other traffic) was having troubles.

Two questions though.

1. Why didn't I get this effect on the host, and
2. What option can I change in the VM to stop getting this problem?

C
Re: OpenVZ and OpenVPN [message #38003 is a reply to message #37999] Sun, 08 November 2009 19:11 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Check your user_beancounters. http://wiki.openvz.org/Resource_shortage

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and OpenVPN [message #38006 is a reply to message #38003] Sun, 08 November 2009 20:33 Go to previous messageGo to next message
caluml is currently offline  caluml
Messages: 5
Registered: November 2009
Junior Member
Hello Kir,

That is something I checked, and there were no oversteps, apart from 4 for lockedpages.
Re: OpenVZ and OpenVPN [message #38008 is a reply to message #38006] Sun, 08 November 2009 22:05 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

You had this error:
Quote:
ping: sendmsg: No buffer space available


This is probably caused by othersockbuf shortage. Did you really checked all the fail counters?

Other than that, check openvpn logs.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: FAIL LOCKPAGES , NUMPROC and PRIVVMPAGES
Next Topic: External network access from a CT /CT0 inside Virtualbox
Goto Forum:
  


Current Time: Tue Sep 17 03:15:14 GMT 2024

Total time taken to generate the page: 0.04827 seconds