Re: Looking for a cheap upgrade (RAID)

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Looking for a cheap upgrade (RAID)
Date: 2003-05-05 16:38:03
Message-ID: Pine.LNX.4.33.0305051031580.2776-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sat, 3 May 2003, Shridhar Daithankar wrote:

> On Saturday 03 May 2003 02:50, scott.marlowe wrote:
> > Seeing as you'll have 2 gigs of RAM, your swap partition is likely to grow
> > cob webs, so where you put it probably isn't that critical.
> >
> > What I usually do is say take 4 120 Gig drives, allocate 1 gig on each for
> > swap, so you have 4 gigs swap (your swap should be larger than available
> > memory in Linux for performance reasons) and the rest of the drives split
> > so that say, the first 5 or so gigs of each is used to house most of the
> > OS, and the rest for another RAID array hosting the database. Since the
> > root partition can't be on RAID5, you'd have to set up either a single
> > drive or a mirror set to handle that.
>
> Setting swap in linux is a tricky proposition. If there is no swap at all,
> linux has behaved crazily in past. These days situation is much better.
>
> In my experience with single IDE disk, if swap usage goes above 20-30MB due to
> shortage of memory, machine is dead in waters. Linux sometimes does memory
> inversion where swap used is half the free memory but swap is not freed but
> that does not hurt really..
>
> So my advice is, setting swap more tahn 128MB is waste of disk space. OK 256
> in ultra-extreme situations.. but more than that would a be unadvisable
> situation..

Whereas disks are ALL over 20 gigs now, and
whereas the linux kernel will begin killing processes when it runs out of
mem and swap, and
whereas the linux kernel STILL has issues using swap when it's smaller
than memory (those problems have been lessened, but not eliminated), and
whereas the linux kernel will parallelize access to its swap partitions
when it has more than one and they are at the same priority, providing
better swap performance, and
whereas REAL servers always use more memory than you'd ever thought they
would,

be it declared here and now by me that using a small swap file is
penny-wise and pound foolish.

:-)

Seriously, though, having once had a REAL bad experience on a production
server that I was trying to increase swap on (yes, some idiot set it up
with some tiny little 64 Meg swap file (yes, that idiot was me...)) I now
just give every server a few gigs of swap from its three or four 40+ gig
drives. With 4 drives, and each one donating 256 Meg to the cause you can
have a gig of swap space.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2003-05-05 17:59:11 Re: Suggestions wanted for 7.2.4 query
Previous Message scott.marlowe 2003-05-05 16:31:53 Re: Looking for a cheap upgrade (RAID)