Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jul 2015 14:21:59 -0700
From:      Charles Swiger <cswiger@mac.com>
To:        Mario Lobo <lobo@bsd.com.br>
Cc:        FreeBSD - <freebsd-questions@freebsd.org>
Subject:   Re: Gmirror/graid or hardware raid?
Message-ID:  <917A821C-02F8-4F96-88DA-071E3431C335@mac.com>
In-Reply-To: <CA%2ByoEx-T5V3Rchxugke3%2BoUno6SwXHW1%2Bx466kWtb8VNYb%2BBbg@mail.gmail.com>
References:  <CA%2ByoEx-T5V3Rchxugke3%2BoUno6SwXHW1%2Bx466kWtb8VNYb%2BBbg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 8, 2015, at 12:49 PM, Mario Lobo <lobo@bsd.com.br> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?917A821C-02F8-4F96-88DA-071E3431C335>