Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Aug 2016 15:29:38 +0200
From:      Roger Pau =?iso-8859-1?Q?Monn=E9?= <roger.pau@citrix.com>
To:        <rainer@ultra-secure.de>
Cc:        <freebsd-xen@freebsd.org>
Subject:   Re: Is it me or is FreeBSD slower on Xen than Linux?
Message-ID:  <20160816132938.d2i4u2y3scpzi2et@mac>
In-Reply-To: <c3a3a7da26cd1a6a114c03e823926272@ultra-secure.de>
References:  <b0fdde5d7abf905ca6dfd176f028332e@ultra-secure.de> <20160816085455.46a5slqsbgauod5t@mac> <2a0a5ae2821551935de329b8665834be@ultra-secure.de> <20160816100605.la63x2ju5bmtdqhl@mac> <e62d4e94ec36fa859783ddc0aeb1aa28@ultra-secure.de> <20160816110759.6xlvxikw3tziahfd@mac> <c3a3a7da26cd1a6a114c03e823926272@ultra-secure.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160816132938.d2i4u2y3scpzi2et>