Re: Getting Slink compatible with Linux-2.2.0
On Wed, Jan 27, 1999 at 08:13:30PM -0600, Marcelo E. Magallon wrote:
> >> Steve McIntyre <email@example.com> writes:
> > Don't think so small. Some of us run quite big machines on Debian; my
> > workstation/server at work has ~300MB of swap configured from ~25GB of
> > disk. >128 MB of swap is _not_ very big...
> I'm NOT thinking small. I'm thinking efficiency. You are talking 6
> full orders of magnitude in terms of access time. If you have the
> money to pay for 25 GB of hard disk, I'm sure you have the money to
> afford a motherboard that can take over 1 GB of RAM. Even if 1 GB of
> RAM is way more expensive than 25 GB of HD, it's not 6 orders of
> magnitude more expensive.
Six orders of magnitude?? In the unlikely event that my 100 MHz SDRAM can
really handle 32 bits (4 bytes) per cycle, then it can transfer 400
megabytes per second. It's not REALLY that fast, but I'll give it the
benefit of the doubt.
Meanwhile, a relatively lame IDE hard drive can sustain about 6 megs/sec.
So if you swap to that drive, then our 400 megs/sec main memory is about 66
times faster (between 1 and 2 orders of magnitude, speaking in powers of 10).
That's a bunch faster, but not as much as you claim. Plus, almost all the
memory that ends up in swap doesn't get accessed very much. The more memory
you have, the more true this becomes. I regularly take my 64-meg Linux
system about 50 megs into swap (yay for StarOffice), and it still flies
This works because of two things: first, Linux's swapping code has been
getting a LOT better (probably better than anyone else's) in the recent past;
lately, instead of churning constantly, the drive sits idle a lot, even when
I'm heavily into swap. Secondly, most programs only have a relatively small
portion of memory that they access *A LOT*. The rest is low-bandwidth stuff
that's kept in memory for simplicity more than anything. For example,
netscape has a big cache of graphics and scripts, and StarOffice keeps lots
of mostly-unused shared libraries and gigantic documents all in memory.
That means that on tiny-memory systems (say, 8 megs or less) swapping will
still thrash because even the often-used parts don't all fit in memory at
once. As memory gets larger, though, swapping becomes less painful.
Try it sometime. It actually isn't so bad. (And at about $0.04 CDN per
megabyte on a hard drive versus $2.19 in real memory, swap space is an AWFUL
Now, the inefficient programmers that burped out StarOffice and Netscape in
the first place are still pretty hard to explain.