pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeremy Buchmann <jeremy@wellsgaming.com>
To: pdg@stratos.net
Cc: pgsql-admin@postgresql.org
Subject: Re: Hardware needed for 15,000,000 record DB?
Date: Mon, 22 Apr 2002 15:17:26 -0700
Message-ID: <3CC48BF6.8080006@wellsgaming.com> (raw)
References: <018e01c1e98b$c65771b0$0a00000a@windowsbox>

pdg@stratos.net wrote:
> Hello,  :-)
> 
> Can someone help me spec out the hardware needed for a simple web-based
> database app?
> 
> Basically, that application needs to lookup a single row by its primary key.
> This would be fairly straightforward, except that the table needs to contain
> up to 15 million records.  Each row will contain approximately 25  variable
> length CHAR fields with perhaps a total of 3 to 4 kilobytes of data per row.
> 
> Updates will be done nightly via some sort of a batch process.
> 
> What kind of hardware would be needed for this sort of application? The
> queries are not complex, it's just a lot of data.

Databases are I/O bound...if your I/O is slow, your database will be slow.
So your goal is to minimize the amount of I/O needed and the time it takes
to do the I/O.  You minimize the amount of I/O by getting things with big
caches.  You minimize the amount of time the I/O takes by using fast
storage devices.

This means SCSI.  If you have limited funds, spend them on fast SCSI disks
with big caches and a good controller instead the latest and greatest
processor.

If you have the funds, look into getting a RAID card with a big cache on it.
A RAID 1 or 5 also helps out if a disk crashes.

> Would a midrange Celeron processor with 256 MB RAM be sufficient? How would
> backups work for a database this large?

I would not use the Celeron.  The Celeron lacks cache, and you want all the
cache you can afford.  One user posted benchmarks to this list showing the
Celeron to be twice as slow as a PIII at the same clock speed.

Buy a lot of memory.  And make sure the motherboard you get can support a lot
of memory (i.e., it has 4 or more slots for RAM).

Backups: DDS3/4 tape is a good, but expensive choice.  It's one of the few backup
technologies that has cheap media and is vendor-neutral.  Stay away from
"Big floppies" like Jaz drives.  They're too flaky.

> Is PostgreSQL even the best database engine for this app? Perhaps MySQL? Or
> maybe a Microsoft solution?

MySQL is traditionally faster at pumping out web pages with pure speed, but
PostgreSQL has been catching up very quickly.  Also, PostgreSQL has
traditionally been able to handle many more concurrent users, but I think
MySQL has been getting better there, too.  I haven't seen any banchmarks
with recent versions of either database.  They're both free, so try some
tests with both of them (but don't forget to tune them properly).

If you care anything about cost or flexibility, I wouldn't go for a Microsoft
"solution".


--Jeremy




view thread (10+ messages)  latest in thread

Message-ID: <3CC48BF6.8080006@wellsgaming.com>
Permalink:  ../3CC48BF6.8080006@wellsgaming.com/
Also on:    postgresql.org/message-id/3CC48BF6.8080006@wellsgaming.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jeremy@wellsgaming.com, pdg@stratos.net
  Subject: Re: Hardware needed for 15,000,000 record DB?
  In-Reply-To: <3CC48BF6.8080006@wellsgaming.com>
  References: <018e01c1e98b$c65771b0$0a00000a@windowsbox> <3CC48BF6.8080006@wellsgaming.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox