[nflug] AMD64 Debian 'Etch' Stability

Brad Bartram brad.bartram at gmail.com
Wed Jun 11 09:26:48 EDT 2008


Just to chime in on the swap issue, I'd like to give kudos to Ken for
identifying the biggest factor in both configuring swap as well as
configuring the general system - know that the system will be doing.

At the basic level, Linux is very easy to set up a basic workable
server using system defaults and the aforementioned rule of thumb
about doubling the size of the ram.  With a decent sized system - or
even not so decent sized system today - one can push a lot of bits for
quite a while.  The challenge always comes when doing performance
tuning. (This really isn't so much for Pete, but more for some of the
really young current or aspiring sysadmins)

Basic web servers tend to be pretty easy if they are only running
apache and serving some static - or not so static content.  They scale
to a great number of connections and perform well.  Add java and
tomcat on top and things change real quick.  Add serious php functions
for a business app or similar and things change quick.  But even then,
the conventional wisdom is a pretty close benchmark for 90% of the
situations.  For the other 10%, when you need to get away from it,
you'll know.

The big bit of fun is generally database servers.  Not the little ones
ranging from a couple megabytes to a few gigs, but the largish ones
that fall from about 10GB into the TB range.  (The really big ones are
well beyond the scope of our discussions here.)  You will be adjusting
swap space to an optimal size - by using intelligent guestimates based
on the db software, the operating system, and an almost unnatural
knowledge of your hardware.  Of course, swap will be only one of the
many system internals you will be playing with and tuning at this
point, in addition to the engine configs.

With the type of systems I run now, I generally configure my non-db
servers with between 1GB and 2GB of swap.  These are on systems with
about 4GB of Ram.  This is much different that when I setup servers
with 20GB hard drives (or less) and 128MB of Ram.  Disk space is no
longer an issue, so I try not to skimp with swap, but since I have
minor swap activity during normal activity, I can't justify creating
8GB swap partitions without a compelling reason.  Linux tends to be
pretty efficient about managing memory and swap.

So, now I've said my piece - not for any particular reason except
adding my $.02.  Enjoy!

brad

On Wed, Jun 11, 2008 at 8:52 AM, Cyber Source <peter at thecybersource.com> wrote:
> No problem Ken, thanks for the input. I knew a guy that quotes Dr Seuss in
> his signature couldn't be too bad.....
>
> Ken Smith wrote:
>>
>> On Wed, 2008-06-11 at 07:21 -0400, Cyber Source wrote:
>>
>>>
>>> I was wondering if the swap usage is related to the swap size in general,
>>> not necessarily the ram size.
>>>
>>
>> No, swap is used only when something needs to be paged out of physical
>> memory (and that thing can't be paged back in from some other file on
>> the system - executable machine code for example won't be put into swap
>> because it can be reloaded from the executable file).  How much swap
>> space you have allocated won't play any factor in if/when that occurs at
>> all.
>>
>> As you would know but mentioning for the sake of others, obviously the
>> more ram you have the less likely you will be of reaching the point
>> you're forced to start paging stuff out.  So in that sense swap usage is
>> related to ram size but that's the only sense they're related at all,
>> and how much swap space you have allocated won't play a factor in
>> that.
>> There are only two things that will be effected by the amount of swap
>> space you allocate.  The first is the obvious one I'm sure you know but
>> I'm not quite sure if you know the second because I've run into some
>> quite advanced sys-admins who hadn't realized this one (depends heavily
>> on your specific experience).  If the machine crashes it can be told to
>> create a crash dump which in turn can be used by a kernel programmer to
>> try and debug why it crashed.  A crash dump is done by copying the
>> entire contents of physical memory into the swap space as the machine is
>> going down, and then copying it out of swap space into files (those
>> files usually in /var/crash) during the reboot.  So if you don't have as
>> much swap space as you have physical memory the machine can't do a crash
>> dump.
>>
>> And again sorry about the previous message.  Next time I'll try to stick
>> strictly to answering your question and not wander off into a
>> description of stuff I think you might already know but others on the
>> list might not. [ That's not intended as a flame either, but it might
>> have contributed to what annoyed you along with the admittedly flippant
>> comment I'd made about being a young sys-admin.  I have a bad habit of
>> "talking to the list" instead of "talking to the originator" when
>> replying sometimes. ]
>>
>>
>
> _______________________________________________
> nflug mailing list
> nflug at nflug.org
> http://www.nflug.org/mailman/listinfo/nflug
>


More information about the nflug mailing list