Opened 4 years ago

Closed 17 months ago

#15821 closed bug (fixed)

Poor download speed in virtio-net

Reported by: axeld Owned by: korli
Priority: normal Milestone: Unscheduled
Component: Drivers/Network/virtio Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

When I download stuff from Haiku (running in VirtualBox) using the virtio network driver, the performance is flaky, and generally rather bad.

Uploading, on the other hand, works just fine. Using SCP, I get upload speed of about 18 MB/s, and only some KB/s downstream.

I haven't investigated this at all yet, but the issue does not appear using other drivers in VirtualBox. If you need additional info, please yell, I can reproduce this every time (so far).

Change History (10)

comment:1 by waddlesplash, 4 years ago

This was an issue under R1/beta1 but was since fixed, at least using VirtualBox for me seems to work. Or perhaps your VirtualBox is older? Some versions had issues.

comment:2 by axeld, 4 years ago

I tested with VirtualBox 6.1.0, and Haiku hrev53903 (from February 23rd). I'll retest with up to date versions.

comment:3 by waddlesplash, 4 years ago

Hmm, I'm still on VirtualBox 6.0. Maybe something changed in the newer version.

comment:4 by waddlesplash, 4 years ago

Looking at VirtualBox source code, there are 2 different virtio_net devices ("1.0" and then non-"1.0"); the "1.0" one looks pretty immature (there are comments in the commit logs that ping only just now works), and I guess the other one is the one that everyone must use. Are we somehow selecting the "wrong" one? (Does VirtualBox just ship broken code as a matter of course...?)

FWIW, I'd recommend not using VirtualBox at all; its IO-APIC performance is abysmal to the point where I/O under SMP guests is actually slower than non-SMP guests. If you are running on Linux, QEMU/KVM are leagues better (and easier to launch via the command line too.)

comment:5 by axeld, 4 years ago

I can reproduce the same behaviour with VirtualBox 6.1.4 and hrev54008; I'm on Windows with that machine, so there is no real (free) alternative to VirtualBox. Besides that, I'm quite content with it; SMP performance sucks, indeed, though :-)

FWIW, the same issue happens with kvm/qemu on Linux. It starts with a speed around 5 MB/s, and then slowly deteriorates to a few KB within the first 100 MB transferred. That rules out a VirtualBox issue.

comment:6 by axeld, 4 years ago

BTW the receive path is blazingly fast OTOH; I get 30+ MB/s with SCP from Windows -- that's much faster than with e1000 (I get around 15 MB/s there).

comment:7 by waddlesplash, 4 years ago

FWIW, the same issue happens with kvm/qemu on Linux. It starts with a speed around 5 MB/s, and then slowly deteriorates to a few KB within the first 100 MB transferred.

Does this not occur with ipro1000? If it does, it could just be another manifestation of #12876, which is a TCP issue, presumably.

comment:8 by axeld, 4 years ago

I have no issue whatsoever with ipro1000; it runs flawlessly for weeks.

comment:9 by waddlesplash, 23 months ago

Please retest with a recent nightly; it's possible the MTU handling changes affected this. (Check ifconfig for the "error" counts if the problem persists.) Additionally you may want to enable X2APIC in your VM (via VBoxManage) for a performance improvement.

comment:10 by axeld, 17 months ago

Resolution: fixed
Status: newclosed

I had actually already tested it, and it ran fine for quite a while. However, it does not work anymore with VirtualBox 7 at all (it's supposed to be more strict concerning adhering to the specs). I'll open a new ticket for this, though.

Note: See TracTickets for help on using tickets.