From owner-freebsd-questions@freebsd.org Wed Jul 8 21:22:06 2015 Return-Path: Delivered-To: freebsd-questions@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 70D4F997CA7 for ; Wed, 8 Jul 2015 21:22:06 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-in5.apple.com (mail-out5.apple.com [17.151.62.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CC4C116D for ; Wed, 8 Jul 2015 21:22:05 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay7.apple.com (relay7.apple.com [17.128.113.101]) by mail-in5.apple.com (Apple Secure Mail Relay) with SMTP id 73.E0.12430.7749D955; Wed, 8 Jul 2015 14:21:59 -0700 (PDT) X-AuditID: 11973e13-f79d56d00000308e-7f-559d94776354 Received: from [17.149.227.84] (Unknown_Domain [17.149.227.84]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by relay7.apple.com (Apple SCV relay) with SMTP id E8.17.29728.7749D955; Wed, 8 Jul 2015 14:21:59 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: Gmirror/graid or hardware raid? From: Charles Swiger In-Reply-To: Date: Wed, 8 Jul 2015 14:21:59 -0700 Cc: FreeBSD - Content-Transfer-Encoding: quoted-printable Message-Id: <917A821C-02F8-4F96-88DA-071E3431C335@mac.com> References: To: Mario Lobo X-Mailer: Apple Mail (2.2102) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLLMWRmVeSWpSXmKPExsUi2FCYqlszZW6oQU+zpcXLr5tYLD6vX8Ho wOSxdfofVo8Zn+azBDBFcdmkpOZklqUW6dslcGXM2XWeqeCEVMWP9x8YGxgniHYxcnJICJhI PPq3mxHCFp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zt6g pB25H04eN/7xXUhG96/jnZPv9aauOv02QNGh7lztoxep5j+YxXdmvN29+Z/XyfNuAhNmfryw b9227FPb9766IvXB+2XvjPZYKXnvu86XLC25DH/O+O6v8P20g2VLypamdb5r9Dc9cr14VtPu xrm41S0exn/K7pezSs/wVr2jcmLXDTYlluKMREMt5qLiRACiFvK8MwIAAA== X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2015 21:22:06 -0000 On Jul 8, 2015, at 12:49 PM, Mario Lobo wrote: > Hi; >=20 > I'm building a server that is going to host VMs for a small e-commerce > site. It's mainly going to be used for testing new solutions/improving = the > current site (on the cloud at this moment) but in the medium to long = run, > the idea is to hold the production site in it. >=20 > Since I don't have any experience in running VMs for e-commerce, I = don't > know for sure if my plan is correct or even feasible. OK. If it matters, I've been doing e-commerce sites since ~1993, which = more than likely means I have well-entrenched habits about things like HTML = validation rather than in "social media integration" or "cloud-related buzzwords". = :-) > I want to use FBSD 10 as the host OS and the VMs will run under = Virtual Box. >=20 > It should be a Dell 430 server (or IBM equivalent) CPU Xeon E5-2630 = with 4 > 2T SATA HDs/16 G Ram/ RAID PERC H730 controller (supported by mrsas). That's fine for development or QA/testing environments. PROD sites should never consist of a single machine, especially one = without much in the way of high-availability features. > All VMs will run FBSD also with usual Apache/php/Mysql combination. Apache is fine. You're (almost?) always bottlenecked by network = bandwidth, but for some purposes nginx + fastcgi is a more suitable choice. PHP-based e-commerce solutions tend to exhibit the same continuous = security flaws that every other PHP-based system (Wordpress, Joomla, MediaWiki, etc) = runs into. I'd bet that if you talk to your payment processor and see what they = recommend, it'd be Java and not PHP. Just a guess, but I'm pretty familiar with = everyone from CyberSource, ClearCommerce, AliPay, WorldPay, SagePay, PayPal = Payflow/Express, etc to the smaller regional/country processors like BarclayCard, Garanti, = .... MySQL can be adequate for very low-volume sites, but for read-mostly = stuff a no-SQL database like Mongo or Cassandra are likely to be more performant and = for transactional data something like Postgres or Oracle would be better choices. > I really would welcome suggestions/opinions on what would be the most > efficient way to set up those HDs to hold these virtual disks. You normally shouldn't need to care about disk I/O performance for the = app-layer side, only for the database(s). Provision your databases on bare metal = going by what the DB recommends for # of spindles to enable separation of = tablespace, temp space, and transaction logs. Most of the PROD databases I know of working from local storage have = heaps of RAID-1 mirrors, and sometimes larger volumes created as RAID-10 or = RAID-50. Higher volume shops use dedicated SAN filers via redundant Fibre Channel = mesh or similar for their database storage needs. > I thought about zfs but I won't have lots of RAM avaliable ZFS wants to be run against bare metal. I've never seen anyone setup = ZFS within a VM; it consumes far too much memory and it really wants to talk = directly to the hardware for accurate error detection. > Should I use the controller raid? Gmirror/Graid? What raid level? Level is easy: a 4-disk machine is suited for either a pair of RAID-1s, = a 4-disk RAID-10 volume, or a 4-disk RAID-5 volume. Regards, --=20 -Chuck