Is it me or is FreeBSD slower on Xen than Linux?

Roger Pau Monné roger.pau at citrix.com
Wed Aug 17 10:15:26 UTC 2016


On Wed, Aug 17, 2016 at 11:29:17AM +0200, rainer at ultra-secure.de wrote:
> Am 2016-08-17 11:12, schrieb Roger Pau Monné:
> 
> > No, I don't think so, this is what I get using a slow USB 2.0 disk as
> > the
> > backend: (on Dom0 I get something between 70-80M/s, so there isn't much
> > difference).
> > 
> > # dc3dd wipe=/dev/ada1
> > 
> > dc3dd 7.2.641 started at 2016-08-17 09:03:26 +0000
> > compiled options:
> > command line: dc3dd wipe=/dev/ada1
> > device size: 2097152 sectors (probed),    1,073,741,824 bytes
> > sector size: 512 bytes (probed)
> >   1073741824 bytes ( 1 G ) copied ( 100% ),   16 s, 65 M/s
> > 
> > input results for pattern `00':
> >    2097152 sectors in
> > 
> > output results for device `/dev/ada1':
> >    2097152 sectors out
> > 
> > dc3dd completed at 2016-08-17 09:03:42 +0000
> > 
> > > What may I be doing wrong?
> > 
> > TBH it's hard to tell, I don't know of any option that could cause this
> > disk
> > performance degradation. Do you also have ada* devices apart from the
> > xbd*
> > ones? I don't think it's going to make any difference, but could you try
> > with the ada* block devices instead?
> 
> 
> Strange thing is, I have ada devices for the the other disks, but this one
> didn't show up as ada-device.

The fact that it shows up as ada or xbd depends on what you specify in the 
guest config file (hd* will show up as ada, while xvd* will show up as 
xbd*). I don't know how/if XenServer allows you to specify the vdev in the 
guest configuration.

> On my FreeBSD11 Test VM, the disk didn't show up until I rebooted, even
> though I (believe to) have the xen-guest stuff installed:
> 
> (freebsd11 </root>) 0 # ps ax |grep xe-d
>  694 v0- I    0:00.00 /bin/sh /usr/local/sbin/xe-daemon -p
> /var/run/xe-daemon.pid
> 2202  0  R+   0:00.00 grep xe-d
> (freebsd11 </root>) 0 # pkg info|grep xe-
> xe-guest-utilities-6.2.0_2     FreeBSD VM tools for Citrix XenServer and XCP
> (freebsd11 </root>) 0 # pkg info|grep xen
> xen-guest-tools-4.6.1          Xen tools within FreeBSD domU
> 
> I have an ada device there and I got about 10MB/s on wipe. At least in the
> beginning.

Hm, so performance is more or less the same. Having the xen-guest stuff 
should not make a difference regarding disks, this is IIRC only used when 
migrating a VM.

> (freebsd11 </root>) 0 # sysctl -a |grep xen
> kern.vm_guest: xen
> device	xenpci
> vfs.pfs.vncache.maxentries: 0
> dev.xenbusb_back.0.%parent: xenstore0
> dev.xenbusb_back.0.%pnpinfo:
> dev.xenbusb_back.0.%location:
> dev.xenbusb_back.0.%driver: xenbusb_back
> dev.xenbusb_back.0.%desc: Xen Backend Devices
> dev.xenbusb_back.%parent:
> dev.xn.0.xenstore_peer_path: /local/domain/0/backend/vif/245/0
> dev.xn.0.xenbus_peer_domid: 0
> dev.xn.0.xenbus_connection_state: Connected
> dev.xn.0.xenbus_dev_type: vif
> dev.xn.0.xenstore_path: device/vif/0
> dev.xn.0.%parent: xenbusb_front0
> dev.xbd.1.xenstore_peer_path: /local/domain/0/backend/vbd3/245/768
> dev.xbd.1.xenbus_peer_domid: 0
> dev.xbd.1.xenbus_connection_state: Connected
> dev.xbd.1.xenbus_dev_type: vbd
> dev.xbd.1.xenstore_path: device/vbd/768
> dev.xbd.1.%parent: xenbusb_front0
> dev.xbd.0.xenstore_peer_path: /local/domain/0/backend/vbd3/245/832
> dev.xbd.0.xenbus_peer_domid: 0
> dev.xbd.0.xenbus_connection_state: Connected
> dev.xbd.0.xenbus_dev_type: vbd
> dev.xbd.0.xenstore_path: device/vbd/832
> dev.xbd.0.%parent: xenbusb_front0
> dev.xenbusb_front.0.%parent: xenstore0
> dev.xenbusb_front.0.%pnpinfo:
> dev.xenbusb_front.0.%location:
> dev.xenbusb_front.0.%driver: xenbusb_front
> dev.xenbusb_front.0.%desc: Xen Frontend Devices
> dev.xenbusb_front.%parent:
> dev.xs_dev.0.%parent: xenstore0
> dev.xctrl.0.%parent: xenstore0
> dev.xenballoon.0.%parent: xenstore0
> dev.xenballoon.0.%pnpinfo:
> dev.xenballoon.0.%location:
> dev.xenballoon.0.%driver: xenballoon
> dev.xenballoon.0.%desc: Xen Balloon Device
> dev.xenballoon.%parent:
> dev.debug.0.%parent: xenpv0
> dev.privcmd.0.%parent: xenpv0
> dev.evtchn.0.%parent: xenpv0
> dev.xenstore.0.%parent: xenpv0
> dev.xenstore.0.%pnpinfo:
> dev.xenstore.0.%location:
> dev.xenstore.0.%driver: xenstore
> dev.xenstore.0.%desc: XenStore
> dev.xenstore.%parent:
> dev.xen_et.0.%parent: xenpv0
> dev.xen_et.0.%pnpinfo:
> dev.xen_et.0.%location:
> dev.xen_et.0.%driver: xen_et
> dev.xen_et.0.%desc: Xen PV Clock
> dev.xen_et.%parent:
> dev.granttable.0.%parent: xenpv0
> dev.xenpv.0.%parent: nexus0
> dev.xenpv.0.%pnpinfo:
> dev.xenpv.0.%location:
> dev.xenpv.0.%driver: xenpv
> dev.xenpv.0.%desc: Xen PV bus
> dev.xenpv.%parent:
> dev.xenpci.0.%parent: pci0
> dev.xenpci.0.%pnpinfo: vendor=0x5853 device=0x0001 subvendor=0x5853
> subdevice=0x0001 class=0x010000
> dev.xenpci.0.%location: slot=3 function=0 dbsf=pci0:0:3:0
> handle=\_SB_.PCI0.S18_
> dev.xenpci.0.%driver: xenpci
> dev.xenpci.0.%desc: Xen Platform Device
> dev.xenpci.%parent:
> dev.xen.xsd_kva: 18446735281894703104
> dev.xen.xsd_port: 3
> dev.xen.balloon.high_mem: 0
> dev.xen.balloon.low_mem: 0
> dev.xen.balloon.hard_limit: 18446744073709551615
> dev.xen.balloon.driver_pages: 0
> dev.xen.balloon.target: 2097152
> dev.xen.balloon.current: 2096128
>

This looks fine AFAICT.
 
> 
> Do you know what I could check on the dom0 side to make sure it's configured
> right?

Sadly XenServer uses a completely different disk backend from the Xen Open 
Source Project (which is what I work with). Could you try to ask on the 
XenServer mailing lists or forums[0]?

I think there's a better chance you will find someone familiar with it 
there. Feel free to Cc me if you need input regarding the FreeBSD blkfront 
internals.

Roger.

[0] http://xenserver.org/


More information about the freebsd-xen mailing list