Incredibly high latency for Ubuntu guest on Hyper-V

I've got several Ubuntu 10.04 virtual machines running as Hyper-V guests on Windows Server 2008 R2 SP1 and they're all perfectly fine.

Today I installed my first Ubuntu 11.10 virtual machine and I'm seeing rediculous pings:

enter image description here

These servers are all connected via gigabit to a local LAN, with almost no network traffic at all1, with a legacy network adapter in Hyper-V.

I'm a bit of an Ubuntu n00b so I don't really know where to go from here. Any ideas?


free -m reports:

             total       used       free     shared    buffers     cached
Mem:           485        470         15          0         63        299
-/+ buffers/cache:        107        378
Swap:          507         20        487

This is within a few mb of our other Ubuntu servers that are on 10.04.


I removed the Legacy NIC and installed a Synthetic one in Hyper-V and this did improve the numbers, in that they're around 10-30ms now, but I would still be expecting <1ms response times.

1As a comparison, I have another Ubuntu 10.04 guest on Hyper-V almost 1,000km away that has a ping of 33ms


Solution 1:

Since it's a new system, it may have needed to download and install quite a few updated packages. If the slowness is still present, try doing something like

ps -ef|grep apt

on the virtual machine to see if there's an apt-related process running. If the slowness suddenly resolved itself, it's worth checking /var/log/dpkg.log to see if a bunch of packages were installed, causing the slowness.

Solution 2:

This problem has gone away on its own. Sorry I don't have a better answer than that.

I realise this is like pushing the green button but as this is not a mission critical production machine, I'm going to count my blessings and move on.

For what it's worth, switching to a synthentic NIC rather than a legacy NIC made a huge difference, but did not alleviate the problem completely.

Solution 3:

Old thread but still a reply; make sure after installing you remove the nic and then add a 'synthetic NIC' within Hyper-V. Ubuntu has the correct drivers for it and as far as I know it will use paravirtualization that way. Also on Windows guests OS'es you'll really want the synthetic NIC.

Solution 4:

Are hv_netvsc, hv_blkvsc, hv_storvsc and hv_vmbus kernel modules loaded on the guest? I run Ubuntu 10.04 under Hyper-V and ping is under 1ms. You can check modules using sudo lsmod | grep hv command.