less theoretical and more realistic Database Stuff

Albert P Tobey albert.tobey at priority-health.com
Fri Oct 5 12:58:24 CDT 2001


> - Server:  Linux or Solaris-Running x86's, two of them, each
> with dual processors and RAID 5.  Not true clustering, the
> 2nd one just "mirrors" the first and routinely backs up
> transactions to tape.  This costs no downtime.  In the event
> of server 1 failure, we switch over to server two, swap some
> hard drives around, restore, and re-run.  Operational downtime
> of about 3 minutes in the event of  a failure, with general uptime
> of, say, 99.9% or so.
Really, on x86, Linux will smoke Solaris in both performance and
reliability.  Linux's filesystem(s) are much faster and Linux is
actually _native_ to the ix86 platform instead of a port from SPARC.  
Both can do RAID5, but Linux pulls ahead when you want to do failover
for cheap.  There is a filesystem for linux called GFS developed by
Sistina (www.sistina.com) that would eliminate the need for disk swaps
and make the whole thing automatable.  GFS will allow you to have two
servers with full access to the same physical disks (one read, one
read/write) so that in the event of a failure, you can bring up the
database on the other server with little hassle.  I haven't used this,
but it's there for your perusal.   There are also some more primitive
versions of mirrored filesystems out there, but they won't perform as
well and aren't as reliable.  For either Linux or Solaris, you'll want
to check out the linux-ha (www.linux-ha.org) project for
high-availability software that is free and can handle what you're going
to need.
 
>   We'd pay the extra $ for the hardware that scales and doesn't
> fail, and a tape backup that can run while the database is running.
> (Question: Can PostGreSQL and Lunix handle this?  I think we might
> need solaris for it's transactioning file system.)
  The word you're thinking of is "journaling" filesystem.  Solaris has
vxfs (veritas) which is journaling, but Linux has a plethora of
journaling filesystems such as reiserfs, ext3, jfs, and xfs.  All four
are considered stable and production ready.  xfs and jfs have some neat
features that may interest you further such as ACLs.  Remember,
journaling filesystems only provide additional data security in the
event of hardware failures (such as loss of power) and faster boot times
once the problem has been resolved (fsck).  
  Buying an HP NetServer or a Penguin Computing
(www.penguincomputing.com) machine will provide all of the fault
tolerance and scalability you'll need with support and great
performance.  The price difference for a SPARC system is staggering and
probably won't buy you much reliability as far as I've seen (I used to
work in a Sun shop).
  Both PostgreSQL and MySQL support hot backups of various sorts.  The
fun part of each is that TMTOWTDI.  Both have a command for dumping the
database to flat SQL text, and both have hot-backup facilities, although
I think you have to buy it for MySQL.  The underlying OS has nothing to
do with the database's ability to be backed up hot or cold. 
> 
>   My thought was that we didn't need the extra "guarentees"
> (system mirroring) if we had tape backup and raid 5,
> but my partner is a team leader at Meijer and insists that 1 hour
> of downtime will most more than just buying an extra system and
> mirroring it.  Which begs the questions:
> 
> 1) Can we do tape backup in Linux in real-time with PostGreSQL and
> 2) What do you think of the scheme above?
1. If PostgreSQL can do it, either OS can do the tape backup.  The OS
really makes no difference whatsoever in this regard.
2. Looks good.  I could add a ton of stuff for making it more
highly-available (esp. on Linux), but the failover scheme looks good for
minimizing downtime.  With Linux + GFS + linux-ha, I'd say could get
your downtime to quickly approach 0, but you'll be paying more for a
disk array that supports GFS and more time to set it all up, but it
might be worth it in the long run.

Really, if PostgreSQL fulfills your needs, it makes no difference which
operating system you use.  I, of course, would recommend Linux over
Solaris because it will likely perform better on the x86 platform and
there is more high-availability software available in the public
domain.  Another option you might want to check out is RedHat's RedHat
Database which is a derivative of PostgreSQL.  I don't know much about
it, but they can certainly offer you support and maybe even some
features above and beyond what the OSS version can.  Also, think about
using SuSE Linux if you want jounaling filesystem out of the box
(reiserfs).  RedHat 7.1 can support reiserfs and 7.2 will come with
ext3.  Debian likely supports any of the filesytems I mentioned earlier
in this message, although you'll have to apt-get them after install.  I
could go on all day about how to set up a Linux machine for
production/HA, but I'll leave that for when you're ready ;P

-Al

-- 
 "Open source" means that anyone can get a copy of the source code.
Developers can find security weaknesses very easily with Linux.
The same is not true with Microsoft Windows.

Microsoft, "What Every Retailer Should Know", February 2001



********************************************************************
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity
to whom they are addressed.  If you have received this 
email in error please notify the Priority Health Information
Services Department at (616) 942-0954.
********************************************************************



More information about the grand-rapids-pm-list mailing list