Re: Is it me or is FreeBSD slower on Xen than Linux?
Am 2016-08-17 12:15, schrieb Roger Pau Monné: 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/ OK, registered there and I can't login. Resetting my password they say I'm either in an embargoed country or on a sanctioned party list. Yeah, I'm in Switzerland. "Please note: If you have just created a new account and received this message, please try to log in again in 6 hours before contacting Customer service." Well, if it helps to curb spammers, I'm all for it. Thanks for your support. Rainer ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
> On 17 Aug 2016, at 12:17, rai...@ultra-secure.de wrote: > > I played a bit with the "OS-Type". > If I switch to "Other PV", I can get a bit more throughput (10MB/s). > > Still too slow :-( Can it be a problem with the sync cache commands? Just wondering what could be so different with Linux vs FreeBSD. At least in the past the Linux crowd has chosen to be lousy with committing data do disk and relying on fsck. FreeBSD does the opposite. Borja. ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
I played a bit with the "OS-Type". If I switch to "Other PV", I can get a bit more throughput (10MB/s). Still too slow :-( ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
On Wed, Aug 17, 2016 at 11:29:17AM +0200, rai...@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 + > > 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 + > > > > > 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 ) 0 # ps ax |grep xe-d > 694 v0- I0: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 ) 0 # pkg info|grep xe- > xe-guest-utilities-6.2.0_2 FreeBSD VM tools for Citrix XenServer and XCP > (freebsd11 ) 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 ) 0 # sysctl -a |grep xen > kern.vm_guest: xen > devicexenpci > 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=0x01 > 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: 184467440737095
Re: Is it me or is FreeBSD slower on Xen than Linux?
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 + 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 + 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. 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 ) 0 # ps ax |grep xe-d 694 v0- I0: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 ) 0 # pkg info|grep xe- xe-guest-utilities-6.2.0_2 FreeBSD VM tools for Citrix XenServer and XCP (freebsd11 ) 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. (freebsd11 ) 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=0x01 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 Do you know what I could check on the dom0 side to make sure it's configured right? ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
On Wed, Aug 17, 2016 at 10:19:05AM +0200, rai...@ultra-secure.de wrote: > Am 2016-08-16 16:24, schrieb rai...@ultra-secure.de: > > Am 2016-08-16 16:18, schrieb Roger Pau Monné: > > > > > I'm not saying it's not possible, but are you sure this slowdown is > > > caused > > > by the disk? It's certainly a possibility, but I would like to make > > > sure > > > it's caused by that before jumping into conclusions. > > > > > > Can you load the full database in RAM and perform the same test. > > > TBH, I > > > don't use MariaDB, so I'm not sure what's the best way to achieve > > > this, but > > > a quick search on google shows there are multiple ways. In any case, > > > make > > > sure with iostat that the database is not read from the disk. > > > > I'll try to do some disk-benchmarks, when I can attach some bigger > > disks. > > on Ubuntu 14 with HVM: > > dc3dd wipe=/dev/xvdc > > dc3dd 7.1.614 started at 2016-08-17 09:38:17 +0200 > compiled options: > command line: dc3dd wipe=/dev/xvdc > device size: 104857600 sectors (probed) > sector size: 512 bytes (probed) > 53687091200 bytes (50 G) copied (100%), 464.642 s, 110 M/s > > input results for pattern `00': >104857600 sectors in > > output results for device `/dev/xvdc': >104857600 sectors out > > dc3dd completed at 2016-08-17 09:46:01 +0200 > > > On FreeBSD 10.3-RELEASE-p6 with HVM: > > Aug 17 09:57:52 bla-prod kernel: xbd4: 51200MB at > device/vbd/51776 on xenbusb_front0 > Aug 17 09:57:52 bla-prod kernel: xbd4: features: write_barrier > Aug 17 09:57:52 bla-prod kernel: xbd4: synchronize cache commands enabled. > > dc3dd wipe=/dev/xbd4 > > and it's showing 8.something MB/s > > Is this normal? 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 + 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 + > 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? Roger. ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
Am 2016-08-16 16:24, schrieb rai...@ultra-secure.de: Am 2016-08-16 16:18, schrieb Roger Pau Monné: I'm not saying it's not possible, but are you sure this slowdown is caused by the disk? It's certainly a possibility, but I would like to make sure it's caused by that before jumping into conclusions. Can you load the full database in RAM and perform the same test. TBH, I don't use MariaDB, so I'm not sure what's the best way to achieve this, but a quick search on google shows there are multiple ways. In any case, make sure with iostat that the database is not read from the disk. I'll try to do some disk-benchmarks, when I can attach some bigger disks. on Ubuntu 14 with HVM: dc3dd wipe=/dev/xvdc dc3dd 7.1.614 started at 2016-08-17 09:38:17 +0200 compiled options: command line: dc3dd wipe=/dev/xvdc device size: 104857600 sectors (probed) sector size: 512 bytes (probed) 53687091200 bytes (50 G) copied (100%), 464.642 s, 110 M/s input results for pattern `00': 104857600 sectors in output results for device `/dev/xvdc': 104857600 sectors out dc3dd completed at 2016-08-17 09:46:01 +0200 On FreeBSD 10.3-RELEASE-p6 with HVM: Aug 17 09:57:52 bla-prod kernel: xbd4: 51200MB at device/vbd/51776 on xenbusb_front0 Aug 17 09:57:52 bla-prod kernel: xbd4: features: write_barrier Aug 17 09:57:52 bla-prod kernel: xbd4: synchronize cache commands enabled. dc3dd wipe=/dev/xbd4 and it's showing 8.something MB/s Is this normal? What may I be doing wrong? Rainer ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
Am 2016-08-16 16:18, schrieb Roger Pau Monné: I'm not saying it's not possible, but are you sure this slowdown is caused by the disk? It's certainly a possibility, but I would like to make sure it's caused by that before jumping into conclusions. Can you load the full database in RAM and perform the same test. TBH, I don't use MariaDB, so I'm not sure what's the best way to achieve this, but a quick search on google shows there are multiple ways. In any case, make sure with iostat that the database is not read from the disk. I'll try to do some disk-benchmarks, when I can attach some bigger disks. ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
On Tue, Aug 16, 2016 at 04:05:30PM +0200, rai...@ultra-secure.de wrote: > Am 2016-08-16 15:48, schrieb Borja Marcos: > > > On 16 Aug 2016, at 15:41, rai...@ultra-secure.de wrote: > > > > > > Am 2016-08-16 15:38, schrieb Borja Marcos: > > > > > > > > Maybe this is too obvious, my apologies in that case. But, how have > > > > the filesystems been > > > > created and mounted? Asynchronous? Synchronous? Journalling? > > > > Softupdates in the case of > > > > FreeBSD UFS? It can make quite a difference. > > > > > > > > > FreeBSD > > > > > > /dev/ada2p1 on /home/db (ufs, local, soft-updates) > > > > > > > > > > > > Linux: > > > /dev/mapper/system-lvm--home /home ext4defaults > > > 0 2 > > > > > > > > > What does "defaults" mean, BTW? > > > > That’s the mother of the lamb, we use to say in Spain ;) > > > > I guess it depends on the particular distribution, not just on being > > ext4. Is there a tool similar to > > dumpfs on Linux? > > > Apparently, it's in > cat /proc/mounts > > /dev/mapper/system-lvm--tmp /tmp ext4 rw,relatime,data=ordered 0 0 > /dev/mapper/system-lvm--var /var ext4 rw,relatime,data=ordered 0 0 > /dev/mapper/system-lvm--home /home ext4 rw,relatime,data=ordered 0 0 > /dev/mapper/system-lvm--varlog /var/log ext4 rw,relatime,data=ordered 0 0 > > > > > > You can also experiment with the FreeBSD options, maybe it will be a > > quicker route. Try to mount as asynchronous. > > In case it makes a big difference, you got it. > > But I don't really want to mount it asyncronous. > Would it help to have journaling? > > Or is soft-updates already the "optimum"? I'm not saying it's not possible, but are you sure this slowdown is caused by the disk? It's certainly a possibility, but I would like to make sure it's caused by that before jumping into conclusions. Can you load the full database in RAM and perform the same test. TBH, I don't use MariaDB, so I'm not sure what's the best way to achieve this, but a quick search on google shows there are multiple ways. In any case, make sure with iostat that the database is not read from the disk. Roger. ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
Am 2016-08-16 15:48, schrieb Borja Marcos: On 16 Aug 2016, at 15:41, rai...@ultra-secure.de wrote: Am 2016-08-16 15:38, schrieb Borja Marcos: Maybe this is too obvious, my apologies in that case. But, how have the filesystems been created and mounted? Asynchronous? Synchronous? Journalling? Softupdates in the case of FreeBSD UFS? It can make quite a difference. FreeBSD /dev/ada2p1 on /home/db (ufs, local, soft-updates) Linux: /dev/mapper/system-lvm--home /home ext4defaults0 2 What does "defaults" mean, BTW? That’s the mother of the lamb, we use to say in Spain ;) I guess it depends on the particular distribution, not just on being ext4. Is there a tool similar to dumpfs on Linux? Apparently, it's in cat /proc/mounts /dev/mapper/system-lvm--tmp /tmp ext4 rw,relatime,data=ordered 0 0 /dev/mapper/system-lvm--var /var ext4 rw,relatime,data=ordered 0 0 /dev/mapper/system-lvm--home /home ext4 rw,relatime,data=ordered 0 0 /dev/mapper/system-lvm--varlog /var/log ext4 rw,relatime,data=ordered 0 0 You can also experiment with the FreeBSD options, maybe it will be a quicker route. Try to mount as asynchronous. In case it makes a big difference, you got it. But I don't really want to mount it asyncronous. Would it help to have journaling? Or is soft-updates already the "optimum"? https://www.freebsd.org/doc/handbook/configtuning-disk.html ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
> On 16 Aug 2016, at 15:41, rai...@ultra-secure.de wrote: > > Am 2016-08-16 15:38, schrieb Borja Marcos: >> >> Maybe this is too obvious, my apologies in that case. But, how have >> the filesystems been >> created and mounted? Asynchronous? Synchronous? Journalling? >> Softupdates in the case of >> FreeBSD UFS? It can make quite a difference. > > > FreeBSD > > /dev/ada2p1 on /home/db (ufs, local, soft-updates) > > > > Linux: > /dev/mapper/system-lvm--home /home ext4defaults0 2 > > > What does "defaults" mean, BTW? That’s the mother of the lamb, we use to say in Spain ;) I guess it depends on the particular distribution, not just on being ext4. Is there a tool similar to dumpfs on Linux? You can also experiment with the FreeBSD options, maybe it will be a quicker route. Try to mount as asynchronous. In case it makes a big difference, you got it. Borja. ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
Am 2016-08-16 15:38, schrieb Borja Marcos: On 16 Aug 2016, at 15:29, Roger Pau Monné wrote: Could this really be an UFS vs. ext4 thing? Hm, maybe. There are a lot of moving pieces here that make it quite hard to diagnose the issue properly. Could you try to run something like UnixBench (or any other general benchmarking tool) inside of the Linux VM, the FreeBSD VM and a bare metal FreeBSD install? This way we might be able to spot what's causing this slowdown. Maybe this is too obvious, my apologies in that case. But, how have the filesystems been created and mounted? Asynchronous? Synchronous? Journalling? Softupdates in the case of FreeBSD UFS? It can make quite a difference. FreeBSD /dev/ada2p1 on /home/db (ufs, local, soft-updates) Linux: /dev/mapper/system-lvm--home /home ext4defaults0 2 What does "defaults" mean, BTW? ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
> On 16 Aug 2016, at 15:29, Roger Pau Monné wrote: > >> Could this really be an UFS vs. ext4 thing? > > Hm, maybe. There are a lot of moving pieces here that make it quite hard to > diagnose the issue properly. > > Could you try to run something like UnixBench (or any other general > benchmarking tool) inside of the Linux VM, the FreeBSD VM and a bare metal > FreeBSD install? This way we might be able to spot what's causing this > slowdown. Maybe this is too obvious, my apologies in that case. But, how have the filesystems been created and mounted? Asynchronous? Synchronous? Journalling? Softupdates in the case of FreeBSD UFS? It can make quite a difference. Borja. ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
Am 2016-08-16 15:29, schrieb Roger Pau Monné: Could you try to run something like UnixBench (or any other general benchmarking tool) inside of the Linux VM, the FreeBSD VM and a bare metal FreeBSD install? This way we might be able to spot what's causing this slowdown. I'll have to attach new disks first. Because the FreeBSD VM currently has 16GB RAM, bonnie wants to create a 32GB file... The MySQL Benchmark-differences are in line with what I get from my curl-requests to the servers. I'll look into running benchmarks. Previously, I had to find out the running MyISAM on ZFS on Xen is absolutely killing performance. It's not great on physical hardware either, but on Xen it's really noticeable. ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
On Tue, Aug 16, 2016 at 03:14:05PM +0200, rai...@ultra-secure.de wrote: > Am 2016-08-16 13:08, schrieb Roger Pau Monné: > > > And FreeBSD on bare metal is equally fast as Linux then? (ie: the > > slowdown > > is only noticeable when running FreeBSD on Xen) > > > Yes. > > I should clarify a bit more. > The task involves 12000 (simple) MySQL-Queries, where the script basically > selects the numbers 1...4000 from a table (it's stupid, I know) and then > proceeds to run a for i in ... loop 4000 times which consists of three other > sql-queries, where the WHERE-clause is constrained by the value from above. > > We've now found that indeed MariaDB is much faster on Xen-Linux than > Xen-FreeBSD. > > The tables all use innodb and the DB is sitting on UFS (in the > FreeBSD-on-Xen case, the FreeBSD-on-bare-metal has ZFS). > Linux is using ext4. Hm, the fact that FreeBSD on bare metal is using ZFS could also make a difference. The ZFS memory caching is quite aggressive, and I expect it should speed up database queries (unless the database itself is fully loaded into RAM, in which case it doesn't matter much). > Could this really be an UFS vs. ext4 thing? Hm, maybe. There are a lot of moving pieces here that make it quite hard to diagnose the issue properly. Could you try to run something like UnixBench (or any other general benchmarking tool) inside of the Linux VM, the FreeBSD VM and a bare metal FreeBSD install? This way we might be able to spot what's causing this slowdown. Roger. ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
Am 2016-08-16 13:08, schrieb Roger Pau Monné: And FreeBSD on bare metal is equally fast as Linux then? (ie: the slowdown is only noticeable when running FreeBSD on Xen) Yes. I should clarify a bit more. The task involves 12000 (simple) MySQL-Queries, where the script basically selects the numbers 1...4000 from a table (it's stupid, I know) and then proceeds to run a for i in ... loop 4000 times which consists of three other sql-queries, where the WHERE-clause is constrained by the value from above. We've now found that indeed MariaDB is much faster on Xen-Linux than Xen-FreeBSD. The tables all use innodb and the DB is sitting on UFS (in the FreeBSD-on-Xen case, the FreeBSD-on-bare-metal has ZFS). Linux is using ext4. Could this really be an UFS vs. ext4 thing? I assume that optimizations in MariaDB 10.1 lead to less disk-activity. I haven't had a chance to try MariaDB on Linux on bare-metal (we don't really have one where I could test this ATM). If you can provide me with some way to synthesize this workload that doesn't involve setting up the full stack plus your app I can try to reproduce it locally and analyze it in order to find the bottlenecks. It's a bit of a pain to setup (mariadb, php-fpm, nginx). Also, you need some files from another framework (apparently) ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
On Tue, Aug 16, 2016 at 12:13:55PM +0200, rai...@ultra-secure.de wrote: > Am 2016-08-16 12:06, schrieb Roger Pau Monné: > > On Tue, Aug 16, 2016 at 11:29:43AM +0200, rai...@ultra-secure.de wrote: > > > Am 2016-08-16 10:54, schrieb Roger Pau Monné: > > > > On Mon, Aug 15, 2016 at 05:54:52PM +0200, rai...@ultra-secure.de wrote: > > > > > Hi, > > > > > > > > > > I've got a problem. > > > > > > > > > > > > > Hello, > > > > > > > > > > > > > > For a customer, I run a VM in Xen that should perform a certain task > > > > > in PHP > > > > > (written using the ZendFrameWork). > > > > > > > > > > That task takes about 18-20 seconds on FreeBSD 10.3 amd64, MariaDB > > > > > 5.5.0, > > > > > php 5.5.37 in a VM that has 8 vCPUs and 16GB of memory > > > > > The "reference" server that the customer uses is somewhere else and > > > > > manages > > > > > to perform the same task in 3s. > > > > > > > > > > I've tried this with FreeBSD 10.3, PHP7.0 and MariaDB 10.1 and it > > > > > takes > > > > > about 9s. > > > > > > > > In the sentence above, are you running it in a Xen VM or on bare metal? > > > > > > > > > > This is both Xen. > > > I think the customer is also running it on some sort of > > > virtualization. > > > > Hm, so a given workload on Xen takes ~9s, and it also takes ~9s when run > > on > > bare metal FreeBSD, is that right? > > > It only takes 9s with Linux as a Xen-guest. > With all things equal (PHP-version, MariaDB-version), FreeBSD is essentially > only half as fast as Linux as a Xen-guest. > Sorry for the confusion. > And FreeBSD on bare metal is equally fast as Linux then? (ie: the slowdown is only noticeable when running FreeBSD on Xen) > > > > > hw.xen.disable_pv_disks=1 > > > > hw.xen.disable_pv_nics=1 > > > > > > OK, can I still boot the VM with this or will NICs and disks show up > > > as > > > different devices then? > > > > NIC will show up as "re", disks as "ada" (which is what you already > > have). > > I tried this with the FreeBSD 11 VM mentioned in my other mail and it only > gets a bit slower. > Between 5% and 10%, I'd say. If you can provide me with some way to synthesize this workload that doesn't involve setting up the full stack plus your app I can try to reproduce it locally and analyze it in order to find the bottlenecks. Roger. ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
Am 2016-08-16 12:06, schrieb Roger Pau Monné: On Tue, Aug 16, 2016 at 11:29:43AM +0200, rai...@ultra-secure.de wrote: Am 2016-08-16 10:54, schrieb Roger Pau Monné: > On Mon, Aug 15, 2016 at 05:54:52PM +0200, rai...@ultra-secure.de wrote: > > Hi, > > > > I've got a problem. > > > > Hello, > > > > > For a customer, I run a VM in Xen that should perform a certain task > > in PHP > > (written using the ZendFrameWork). > > > > That task takes about 18-20 seconds on FreeBSD 10.3 amd64, MariaDB > > 5.5.0, > > php 5.5.37 in a VM that has 8 vCPUs and 16GB of memory > > The "reference" server that the customer uses is somewhere else and > > manages > > to perform the same task in 3s. > > > > I've tried this with FreeBSD 10.3, PHP7.0 and MariaDB 10.1 and it > > takes > > about 9s. > > In the sentence above, are you running it in a Xen VM or on bare metal? > This is both Xen. I think the customer is also running it on some sort of virtualization. Hm, so a given workload on Xen takes ~9s, and it also takes ~9s when run on bare metal FreeBSD, is that right? It only takes 9s with Linux as a Xen-guest. With all things equal (PHP-version, MariaDB-version), FreeBSD is essentially only half as fast as Linux as a Xen-guest. Sorry for the confusion. > hw.xen.disable_pv_disks=1 > hw.xen.disable_pv_nics=1 OK, can I still boot the VM with this or will NICs and disks show up as different devices then? NIC will show up as "re", disks as "ada" (which is what you already have). I tried this with the FreeBSD 11 VM mentioned in my other mail and it only gets a bit slower. Between 5% and 10%, I'd say. ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
On Tue, Aug 16, 2016 at 11:29:43AM +0200, rai...@ultra-secure.de wrote: > Am 2016-08-16 10:54, schrieb Roger Pau Monné: > > On Mon, Aug 15, 2016 at 05:54:52PM +0200, rai...@ultra-secure.de wrote: > > > Hi, > > > > > > I've got a problem. > > > > > > > Hello, > > > > > > > > For a customer, I run a VM in Xen that should perform a certain task > > > in PHP > > > (written using the ZendFrameWork). > > > > > > That task takes about 18-20 seconds on FreeBSD 10.3 amd64, MariaDB > > > 5.5.0, > > > php 5.5.37 in a VM that has 8 vCPUs and 16GB of memory > > > The "reference" server that the customer uses is somewhere else and > > > manages > > > to perform the same task in 3s. > > > > > > I've tried this with FreeBSD 10.3, PHP7.0 and MariaDB 10.1 and it > > > takes > > > about 9s. > > > > In the sentence above, are you running it in a Xen VM or on bare metal? > > > > This is both Xen. > I think the customer is also running it on some sort of virtualization. Hm, so a given workload on Xen takes ~9s, and it also takes ~9s when run on bare metal FreeBSD, is that right? > > > > I've tried it on physical hardware with 10.3, PHP5.5, MariaDB 5.5 > > > and it > > > also takes about 9s (that machine hosts a load of other sites but > > > has lot of > > > cores and memory available). > > > > > > > > > Then, I've installed an Ubuntu 14 VM in XenServer. It comes with > > > PHP5.5 and > > > MariaDB 5.5 by default. It's VM with 2vCPUs and 8GB RAM. > > > > > > There, the script take about 9s, too (just as if it was running on > > > physical > > > FreeBSD). > > > > I'm not sure I understood your problem right, is it that FreeBSD on Xen > > always takes 18-20s to perform a task while on bare metal it only takes > > ~9s? > > > Well, that in itself is not the problem. > The problem is that Linux on Xen is as fast as my bare metal (incidentally, > both the physical Xen host (Dom0) and the physical server I ran the script > for comparison are the same hardware). But from your description above I take that you get the same performance when running FreeBSD on Xen or when running FreeBSD on bare metal, in which case I'm not sure if this problem is related to Xen at all. > > > If that's the case, I would recommend that you first try to disable PV > > disks > > and nics, by adding the following to your /boot/loader.conf: > > > > hw.xen.disable_pv_disks=1 > > hw.xen.disable_pv_nics=1 > > OK, can I still boot the VM with this or will NICs and disks show up as > different devices then? NIC will show up as "re", disks as "ada" (which is what you already have). > > > If that still yelds the same performance (or worse), then you could > > still > > try to disable all Xen code, by removing: > > > > options XENHVM > > device xenpci > > > > From you kernel config and recompiling the kernel. > > I'm using stock FreeBSD 10.3. > I was under the assumption that this is the "optimal" configuration. It should be, I'm just trying to figure out if there's something there that's hampering performance. But please read above because it's still not clear to me that this is related to Xen. Roger. ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
Just a little update. Using FreeBSD 11.0-RC1 (amd64) on a 2vCPU 8GB VM, I can complete the task in 12s. However, using PHP 5.6 and MySQL 5.6 from FreeBSD's pkg-repo. I don't have packages for FreeBSD 11, yet, and the default versions in the official packages are different than mine - my poudriere is still on FreeBSD 10.1. So, it's unclear if FreeBSD 11 is actually faster. ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
Am 2016-08-16 10:54, schrieb Roger Pau Monné: On Mon, Aug 15, 2016 at 05:54:52PM +0200, rai...@ultra-secure.de wrote: Hi, I've got a problem. Hello, For a customer, I run a VM in Xen that should perform a certain task in PHP (written using the ZendFrameWork). That task takes about 18-20 seconds on FreeBSD 10.3 amd64, MariaDB 5.5.0, php 5.5.37 in a VM that has 8 vCPUs and 16GB of memory The "reference" server that the customer uses is somewhere else and manages to perform the same task in 3s. I've tried this with FreeBSD 10.3, PHP7.0 and MariaDB 10.1 and it takes about 9s. In the sentence above, are you running it in a Xen VM or on bare metal? This is both Xen. I think the customer is also running it on some sort of virtualization. I've tried it on physical hardware with 10.3, PHP5.5, MariaDB 5.5 and it also takes about 9s (that machine hosts a load of other sites but has lot of cores and memory available). Then, I've installed an Ubuntu 14 VM in XenServer. It comes with PHP5.5 and MariaDB 5.5 by default. It's VM with 2vCPUs and 8GB RAM. There, the script take about 9s, too (just as if it was running on physical FreeBSD). I'm not sure I understood your problem right, is it that FreeBSD on Xen always takes 18-20s to perform a task while on bare metal it only takes ~9s? Well, that in itself is not the problem. The problem is that Linux on Xen is as fast as my bare metal (incidentally, both the physical Xen host (Dom0) and the physical server I ran the script for comparison are the same hardware). If that's the case, I would recommend that you first try to disable PV disks and nics, by adding the following to your /boot/loader.conf: hw.xen.disable_pv_disks=1 hw.xen.disable_pv_nics=1 OK, can I still boot the VM with this or will NICs and disks show up as different devices then? If that still yelds the same performance (or worse), then you could still try to disable all Xen code, by removing: options XENHVM device xenpci From you kernel config and recompiling the kernel. I'm using stock FreeBSD 10.3. I was under the assumption that this is the "optimal" configuration. Regards Rainer ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
Re: Is it me or is FreeBSD slower on Xen than Linux?
On Mon, Aug 15, 2016 at 05:54:52PM +0200, rai...@ultra-secure.de wrote: > Hi, > > I've got a problem. > Hello, > > For a customer, I run a VM in Xen that should perform a certain task in PHP > (written using the ZendFrameWork). > > That task takes about 18-20 seconds on FreeBSD 10.3 amd64, MariaDB 5.5.0, > php 5.5.37 in a VM that has 8 vCPUs and 16GB of memory > The "reference" server that the customer uses is somewhere else and manages > to perform the same task in 3s. > > I've tried this with FreeBSD 10.3, PHP7.0 and MariaDB 10.1 and it takes > about 9s. In the sentence above, are you running it in a Xen VM or on bare metal? > I've tried it on physical hardware with 10.3, PHP5.5, MariaDB 5.5 and it > also takes about 9s (that machine hosts a load of other sites but has lot of > cores and memory available). > > > Then, I've installed an Ubuntu 14 VM in XenServer. It comes with PHP5.5 and > MariaDB 5.5 by default. It's VM with 2vCPUs and 8GB RAM. > > There, the script take about 9s, too (just as if it was running on physical > FreeBSD). I'm not sure I understood your problem right, is it that FreeBSD on Xen always takes 18-20s to perform a task while on bare metal it only takes ~9s? If that's the case, I would recommend that you first try to disable PV disks and nics, by adding the following to your /boot/loader.conf: hw.xen.disable_pv_disks=1 hw.xen.disable_pv_nics=1 If that still yelds the same performance (or worse), then you could still try to disable all Xen code, by removing: options XENHVM device xenpci >From you kernel config and recompiling the kernel. Roger. ___ freebsd-xen@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"