Thread: Processors vs Memory

Processors vs Memory

From
Hilary Forbes
Date:
If I have a fixed amount of money to spend as a general rule is it better to buy one processor and lots of memory or
twoprocessors and less memory for a system which is transactional based (in this case it's handling reservations).  I
realisethe answer will be a generalised one but all the performance bits I've read seem to talk about adjusting memory
allocation. The client has received the general advice from their hardware supplier that 2 Xeon processors and less
memoryis better but for postgresql I'm thinking they might be better off with a single processor and loads of memory.
TheOS is Red Hat Linux. 

How long is a piece of string  I guess but all comments welcome!

TAI
Hilary


Hilary Forbes
-------------
DMR Computer Limited:   http://www.dmr.co.uk/
Direct line:  01689 889950
Switchboard:  (44) 1689 860000  Fax: (44) 1689 860330
E-mail:  hforbes@dmr.co.uk

**********************************************************


Re: Processors vs Memory

From
Shridhar Daithankar
Date:
Hilary Forbes wrote:

> If I have a fixed amount of money to spend as a general rule
 >is it better to buy one processor and lots of memory or two
 >processors and less memory for a system which is transactional
 >based (in this case it's handling reservations).  I realise the
 >answer will be a generalised one but all the performance bits
 >I've read seem to talk about adjusting memory allocation.
 >The client has received the general advice from their hardware
 >supplier that 2 Xeon processors and less memory is better but
 >for postgresql I'm thinking they might be better off with a single
 >processor and loads of memory.  The OS is Red Hat Linux.

Well it depends. If your projected database size is say 2 gigs, then you should
buy 2Gigsof RAM and spend rest of the money on processor.

But if your database size(max of currrent and projected) is 100GB, obviously you
can not buy 100GB of memory that cheaply. So you should look for fast storage.

The order of priority is IO, memory and CPU. If database is just big enough to
fit in a gig or two, you should get RAM first.

Processor is hardly ever a concern w.r.t database unless you are doing a lot in
database business logic.

HTH

  Shridhar


Re: Processors vs Memory

From
"scott.marlowe"
Date:
On Wed, 22 Oct 2003, Hilary Forbes wrote:

> If I have a fixed amount of money to spend as a general rule is it
> better to buy one processor and lots of memory or two processors and
> less memory for a system which is transactional based (in this case
> it's handling reservations).  I realise the answer will be a generalised
> one but all the performance bits I've read seem to talk about adjusting
> memory allocation.  The client has received the general advice from
> their hardware supplier that 2 Xeon processors and less memory is better
> but for postgresql I'm thinking they might be better off with a single
> processor and loads of memory.  The OS is Red Hat Linux.

My opinion is that two CPUs is optimal because it allows the OS to operate
in parallel to the database.  After the second CPU, the only advantage is
if you are doing a lot of parallel access.

Go for fast I/O first, a RAID1+0 setup is optimal for smaller numbers of
drives (works on 4 or 6 drives nicely) and RAID5 is optimal for a larger
number of drives (works well on 10 or more drives).  Always use hardware
RAID with battery backed cache for a heavily updated database.  For a
reports database software RAID is quite acceptable.

There's a limit to how much memory you can throw at the problem if you're
on 32 bit hardware, and that limit is about 2 to 4 gig.  While you can
install more, it usually makes little or no difference.

Lastly, don't forget to tune your database and server once you have it up
and running:

http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html