BackupPC-users

Re: [BackupPC-users] On/off again Internal Server Error 500

2011-11-17 20:11:25
Subject: Re: [BackupPC-users] On/off again Internal Server Error 500
From: Holger Parplies <wbppc AT parplies DOT de>
To: higuita <higuita AT GMX DOT net>
Date: Fri, 18 Nov 2011 02:08:02 +0100
Hi,

higuita wrote on 2011-11-17 03:26:24 +0000 [Re: [BackupPC-users] *** GMX 
Spamverdacht *** Re: On/off again Internal Server Error 500]:
>       Just to clean things out, as i see many times people saying that
> they dont need swap in modern machines... and this "talk" might push
> more people in to thinking about that (not that you are really saying
> this)
> [...]
>       so... please dont shrink your swap too much, even
> if you have enough RAM and dont see swap usage... it is
> still useful!

I'm not sure I agree with all your reasoning, but then again, I don't really
have experience with/knowledge about all the OSes where it might apply. In
any case, I wanted to make the same point as you: *having* swap *doesn't* hurt
- *using* it to hold *parts of the working set* at any point does.

There is a clear tendency of modern operating systems to have ever more crap
"running" which might, for some users, at some distant point in time, be
needed to deliver a comfortable experience. My notebook has bluetooth
hardware? Sure, go ahead and start up all daemons that might ever be needed
for any exotic usage conceivable. Right, I won't *ever* actually *use* any of
it (then again, who knows?), but I can neither rip out the bluetooth hardware,
nor does it make sense to override all the dependencies of my OS's packaging
system, so there the processes are, consuming memory without ever doing
anything useful.

What *does* make sense is for all this unused cruft to be swapped out by the
OS. Likewise, I won't mind if the login processes running on tty[1-6] reside
in swap. If they turn out to be needed, they'll be swapped back in fast enough,
and that's fine. (And it's just an every-day example. Not that six login
processes will in general make much difference.)

There are even times when it might be of advantage to swap out my 2 GB browser
process (with many open tabs) in order to be able to complete some other task.
I might not need my browser for hours at a time and still be unwilling to
close it. And no, even though RAM is cheap, I can't just add another 8 GB to
my notebook (and the same is true for many mainboards in normal computers,
be it due to lack of free DIMM slots, stability considerations, BIOS or
hardware limitations, or unavailability of reasonably priced SDR-DIMMs ;-).
Even if I can, I might not want to, if it's just peak memory usage I'm dealing
with and using swap doesn't hurt performance. Once it does (regularly, in a
noticeable fashion), I'll find a solution (new notebook with more RAM, new
mainboard, new software, distribution over more computers, whatever), but
upgrading hardware just because there *might* be a problem at some point in
the future (or because there's a *possibly* related problem in the present)
doesn't make sense to me.

It's absolutely true that I won't *ever* want to run my 2 GB browser process
on hardware with less than 4 GB of RAM. I'm not arguing that point. But that
does not mean that none of my browser's memory must ever be swapped to disk.

As for server systems, the matter is a little different. Servers typically
deliver services, and it's typically somewhat unpredictable when these
services will be requested. Still, it could conceivably be beneficial to swap
out unused services for the sake of having more disk cache available for used
services. The thing to keep in mind is that swapping 2 GB to disk (or back
into memory - which will, in general, require swapping something else out
first) will take time - something like 20 seconds in the best case even with
fast disks. This sort of latency might be ok when starting a backup or between
backup and link phase (just for the sake of an example; not that this would
happen, of course :), but not when you need to swap back in your web server
process and the connected database engine to service a HTTP request, and
particularly not when you would need to repeatedly swap in and out two
concurrently running backup processes because only one of them fits into
memory at a time.

All of that said, swap space can - in some situations - also be a method to
test out whether more RAM (and how much of it) would solve the problems you
are having. Swapping back in your web server process may take unacceptably
long, but without the swap space, it (or the backup) would not have started,
and you wouldn't have been able to see how much additional RAM would have been
needed.

Regards,
Holger

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/