I'm running 12.2 and 13.0 on KVM using virtio and zfs. I am not having disk I/O issues. Jeff Love On 4/24/21 5:25 AM, dashdruid via freebsd-stable wrote:> Hello List, > > I hope some other folks out there running FreeBSD on KVM as well. I set up a base VM while doing so I noticed that the disk operations are very slow. Many times I edit a file in vim or try to run a command there is a huge lag. > > I use UFS as the root filesystem. To have something to compare it with I have tested it against an OpenBSD 6.6 VM on the same host, same hardware. both have 1 vCPU and 1GB of ram, 20GB virtual disk (they are exactly on the same physical disk no raid or anything to have a fair comparison). > > Here is an example simple file search time for a non-existent file: > > FreeBSD 13 > > time find / -name cacert.pem > > real 0m30.656s > user 0m0.516s > sys 0m3.938s > > Second run even worse > > real 2m38.618s > user 0m0.711s > sys 0m6.882s > > While on the OpenBSD VM I get > > time find / -name cacert.pem > > real 0m2.258s > user 0m0.290s > sys 0m1.970s > > The amount of data is about the same on both systems but I would not consider this a "slight" performance degradation. If the base system is so slow then imagine putting Apache and other servers on top of it. Did anyone run into this? > > Unless there is a definitive solution I will opt out to using other BSD variants. > _______________________________________________ > freebsd-stable at freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org" >-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Hello, I have reinstalled it with GPT/ZFS and your right it's much better. Same search taking 3-6 seconds so I have deleted now all my old UFS based FreeBSD images. I wonder how I didn't notice this earlier because I had 12.0, 12.2 base images and now that I retested them they had the exact same issues. I guess after the stuff is loaded into memory it doesn't matter anymore. This must be something related to the virtual disk access. I was not thinking on using ZFS due to the higher memory recommendations, some of these VMs I using them for tiny tasks like DNS server and I don't give them more than 256, 512MB of ram. Also I don't take advantage of snapshotting either since it's a VM and it's either snapshotted or I just have base images and copy them when creating new VMs. Well UFS is on it's way out anyway. ??????? Original Message ??????? On Saturday, April 24, 2021 3:03 PM, Jeff Love jl at burgh.net wrote:> I'm running 12.2 and 13.0 on KVM using virtio and zfs. I am not having > disk I/O issues. > Jeff Love > On 4/24/21 5:25 AM, dashdruid via freebsd-stable wrote: > >> Hello List, >> I hope some other folks out there running FreeBSD on KVM as well. I set up a base VM while doing so I noticed that the disk operations are very slow. Many times I edit a file in vim or try to run a command there is a huge lag. >> I use UFS as the root filesystem. To have something to compare it with I have tested it against an OpenBSD 6.6 VM on the same host, same hardware. both have 1 vCPU and 1GB of ram, 20GB virtual disk (they are exactly on the same physical disk no raid or anything to have a fair comparison). >> Here is an example simple file search time for a non-existent file: >> FreeBSD 13 >> time find / -name cacert.pem >> real 0m30.656s >> user 0m0.516s >> sys 0m3.938s >> Second run even worse >> real 2m38.618s >> user 0m0.711s >> sys 0m6.882s >> While on the OpenBSD VM I get >> time find / -name cacert.pem >> real 0m2.258s >> user 0m0.290s >> sys 0m1.970s >> The amount of data is about the same on both systems but I would not consider this a "slight" performance degradation. If the base system is so slow then imagine putting Apache and other servers on top of it. Did anyone run into this? >> Unless there is a definitive solution I will opt out to using other BSD variants. >> freebsd-stable at freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-stable >> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org" > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > freebsd-stable at freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
> Am 24.04.2021 um 15:03 schrieb Jeff Love <jl at burgh.net>: > > I'm running 12.2 and 13.0 on KVM using virtio and zfs. I am not having disk I/O issues.UFS or ZFS does not make a difference for me. ZFS is faster on read due to compression - that?s why back in the XenServer days I didn?t even realize it until somebody complained. It?s just a tad laggy in idle or normal conditions, but any kind of IO brings the system down to a crawl - and that is noticeable.
On 25.04.21 11:15, dashdruid via freebsd-stable wrote:> Hello, > > I have reinstalled it with GPT/ZFS and your right it's much better. Same search taking 3-6 seconds so I have deleted now all my old UFS based FreeBSD images.If the partitioning alone changed something it was probably an alignment problem. These are things you can try: * Create a VM with two virtual disks. * Install a UFS system on the first disk. * Create and mount a UFS on the unpartitioned second disk. * Copy the whole system with tar to the second disk. * Reboot the VM. * Compare performance on both file disks. Maybe your virtual disk backend is is just terrible with unaligned accesses.