Bug 216760 - poor performance on QEMU-KVM host
Summary: poor performance on QEMU-KVM host
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-virtualization mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-03 20:21 UTC by kvanbiesen
Modified: 2018-06-24 18:06 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kvanbiesen 2017-02-03 20:21:29 UTC
Performance Is Insanely low on when you install freebsd on a QEMU-KVM

command to test:
sysbench --num-threads=1 --test=memory --memory-total-size=1G run

FREEBSD 11 on QEMU-KVM

Operations performed= 1048576 (61139.84 ops/sec)
1024.00 transferred (59.71 MB/sec)

UBUNTU 11 on identical KVM:

Operations performed= 1048576 (2718486.33 ops/sec)
1024.00 transferred (2654.77 MB/sec)

FREEBSD on bare metal:
Around 2700MB/s

I tested this on several installations; BBother freebsd 10 and 11. On Different KVM's, all the same results. Freebsd speeds are more than 60 times slower. 

Another user has tested this on servers KVM as in this reddit topic:
https://www.reddit.com/r/freebsd/comments/5rtf05/abysmal_memory_perfomance_witch_freebsd_under/

FReebsd as guest under vmware and virtualbox performs as normal (speeds way over 2000MB)

Gonna file a bug report with QEMU as well
Comment 1 kvanbiesen 2017-02-05 11:12:23 UTC
Xen is unaffected.
Freebsd 12-current is also affected.
Tested both i386 and amd64 builds.
Comment 2 rainer 2017-02-06 10:48:58 UTC
Maybe these two are related:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212681

How do you debug this?
Comment 3 kvanbiesen 2017-02-06 11:31:25 UTC
Could be altho the other bug is referring to disk performance and i am reffering to memory performance.

Its not a sysbench bug, when i create a memory disk on freebsd-guest and do 1k reads from that, speeds are the same (low)
Comment 4 rainer 2017-02-06 11:43:36 UTC
Oh, I've never tried that.


(freebsd11 </root>) 0 # dc3dd wipe=/dev/md0 

dc3dd 7.2.641 started at 2017-02-06 12:37:44 +0100
compiled options:
command line: dc3dd wipe=/dev/md0
device size: 8388608 sectors (probed),    4,294,967,296 bytes
sector size: 512 bytes (probed)
  4294967296 bytes ( 4 G ) copied ( 100% ),    8 s, 507 M/s                   

input results for pattern `00':
   8388608 sectors in

output results for device `/dev/md0':
   8388608 sectors out

dc3dd completed at 2017-02-06 12:37:52 +0100


You're right, memory performance is still sufficient on XenServer.


This is real hardware:

root@bsd1-build-prod:~ # dc3dd wipe=/dev/md0

dc3dd 7.2.641 started at 2017-02-06 12:40:58 +0100
compiled options:
command line: dc3dd wipe=/dev/md0
device size: 8388608 sectors (probed),    4,294,967,296 bytes
sector size: 512 bytes (probed)
  4294967296 bytes ( 4 G ) copied ( 100% ),    6 s, 656 M/s                   

input results for pattern `00':
   8388608 sectors in

output results for device `/dev/md0':
   8388608 sectors out

dc3dd completed at 2017-02-06 12:41:04 +0100

Though one generation later, so faster RAM, faster CPUs.

I'd be happy with that kind of disk-performance loss in a DomU :-(
Comment 5 Rebecca Cran freebsd_committer 2018-06-24 18:06:13 UTC
This appears to be the same bug report as https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216759 ?