From owner-freebsd-xen@freebsd.org Tue Aug 16 08:56:09 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 5A315BBA4E2 for ; Tue, 16 Aug 2016 08:56:09 +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 0F20A1979 for ; Tue, 16 Aug 2016 08:56:08 +0000 (UTC) (envelope-from prvs=029c3005f=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.28,529,1464652800"; d="scan'208";a="380349603" Date: Tue, 16 Aug 2016 10:54:55 +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: <20160816085455.46a5slqsbgauod5t@mac> References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2-neo (2016-06-11) X-DLP: MIA2 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 08:56:09 -0000 On Mon, Aug 15, 2016 at 05:54:52PM +0200, rainer@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.