# Slow network performance inside VM

**URL:** <https://forum.opennebula.io/t/slow-network-performance-inside-vm/5854>\
**Category:** Product Support\
**Created:** [March 27, 2018, 1:42pm UTC](https://forum.opennebula.io/t/slow-network-performance-inside-vm/5854 "2018-03-27T13:42:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![v3ng](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/v3ng/32/5634_2.png) [@v3ng](https://forum.opennebula.io/u/v3ng)\
**Post date:** [March 27, 2018, 1:42pm UTC](https://forum.opennebula.io/t/slow-network-performance-inside-vm/5854/1 "2018-03-27T13:42:17Z")

</div>

Hello,

I have a server running OpenNebula based on Debian Stretch. I then virtualize using KVM.  
I noticed that the network performance in the VM is much slower than directly on the host system.

I ran a script which downloads test files from various mirrors via wget.  
Strange is that almost all mirrors in the VM are a lot slower, but others achieve a similar performance as on the host system (Cachefly mirror or IP-Projects speedtest).

I could not yet reproduce what the speed depends on. The system was empty each time the test was run, so no other processes were running in the background.

Anybody have any idea what might be causing this?  
I am using a routed network setup on the system.

 ![nCqJqku](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/2/21bb44e9fcaf10e9b6cfc0da21f4736c1431f765.png)

---

<div class="post-metadata">

**Author:** ![knawnd](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/knawnd/32/6119_2.png) [@knawnd](https://forum.opennebula.io/u/knawnd)\
**Post date:** [March 28, 2018, 2:19pm UTC](https://forum.opennebula.io/t/slow-network-performance-inside-vm/5854/2 "2018-03-28T14:19:45Z")

</div>

Did you use virtio as network device model? What is the output of ‘lspci |grep -i ethernet’ command inside VM?

---

<div class="post-metadata">

**Author:** ![GabrielDias](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/gabrieldias/32/5457_2.png) [@GabrielDias](https://forum.opennebula.io/u/GabrielDias)\
**Post date:** [March 28, 2018, 5:21pm UTC](https://forum.opennebula.io/t/slow-network-performance-inside-vm/5854/3 "2018-03-28T17:21:21Z")

</div>

Try to use `virtio` model at your VMs.

```xml
NIC = [
...
  MODEL = "virtio",
...]

NIC_DEFAULT = [
  MODEL = "virtio" ]

```

---

<div class="post-metadata">

**Author:** ![v3ng](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/v3ng/32/5634_2.png) [@v3ng](https://forum.opennebula.io/u/v3ng)\
**Post date:** [March 31, 2018, 6:23pm UTC](https://forum.opennebula.io/t/slow-network-performance-inside-vm/5854/4 "2018-03-31T18:23:53Z")

</div>

Thank you, I solved it by using virtio.
