From owner-freebsd-xen@freebsd.org Tue Aug 16 13:29:43 2016 Return-Path: Delivered-To: freebsd-xen@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CE41BBB53A for ; Tue, 16 Aug 2016 13:29:43 +0000 (UTC) (envelope-from prvs=029c3005f=roger.pau@citrix.com) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "DigiCert SHA2 Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D5F2016BE for ; Tue, 16 Aug 2016 13:29:41 +0000 (UTC) (envelope-from prvs=029c3005f=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.28,529,1464652800"; d="scan'208";a="380399941" Date: Tue, 16 Aug 2016 15:29:38 +0200 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: CC: Subject: Re: Is it me or is FreeBSD slower on Xen than Linux? Message-ID: <20160816132938.d2i4u2y3scpzi2et@mac> References: <20160816085455.46a5slqsbgauod5t@mac> <2a0a5ae2821551935de329b8665834be@ultra-secure.de> <20160816100605.la63x2ju5bmtdqhl@mac> <20160816110759.6xlvxikw3tziahfd@mac> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.6.2-neo (2016-06-11) X-DLP: MIA1 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2016 13:29:43 -0000 On Tue, Aug 16, 2016 at 03:14:05PM +0200, rainer@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.