If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):
From - Fri Sep 15 08:44:34 2000
Path: news.randori.com!newsfeeder.randori.com!newscon06.news.prodigy.com!prodigy.com!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!feeder.via.net!news.he.net!sn-xit-03!supernews.com!sn-inject-01!corp.supernews.com!not-for-mail
From: Jean-David Beyer-valinux <jdbeyer@exit109.com>
Newsgroups: comp.os.linux.misc
Subject: Re: Why Does the EXT2 filesystem not need defragmentation.
Date: Fri, 15 Sep 2000 08:29:56 -0400
Organization: Institute for Regimented Whimsey
Lines: 86
Message-ID: <39C21644.BAB72B83@exit109.com>
References: <39BFE479.446835B2@escape.com> <87r96nzo91.fld@barrow.com> <slrn8s0ibq.1d4.cbbrowne@knuth.brownes.org> <87vgvzxxpr.fld@barrow.com> <8FB06AB90ogo1mynxwowaustcom@203.2.194.51> <87lmwuwgho.fld@barrow.com>
X-Complaints-To: newsabuse@supernews.com
X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.14-5.0.14csmp i686)
X-Accept-Language: en, fr
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Xref: news.randori.com comp.os.linux.misc:228779
X-Mozilla-Status: 8011
X-Mozilla-Status2: 00000000
Floyd Davidson wrote (in part):
> There are some other considerations. Linux buffers disk reads,
> and uses otherwise unused RAM for that purpose. Hence the more
> RAM you have available for disk buffering, the faster your
> programs will generally run.
I suppose so, but it depends a lot on your access patterns. I
suspect that most of the stuff in my buffers and cache are not
useful: I am rummaging around in a large database, running a 2-hour
populate of the database. All the data coming in are new, and I
read precious little of the data that are already there. The
indices are in the cache (I hope), and that can help, but since I
am mostly inserting new records, I imagine that the cache is mostly
full of useless stuff. My disk transfer rate is about 150K
bytes/second, and I have seen the disk system can go as high as
10Megabytes per second on a regular basis, and sometimes a little
higher. Since the two hard drives have 2 Megabyte buffers and are
on an Ultra-2 SCSI, I imagine the upper limit is around 40
Megabytes per second, though I have not seen that.
> Linux will also swap out unused
> processes, making the space in RAM they would otherwise take up
> available for disk buffering. Hence you do want _some_ swap
> space allocated.
>
> I have a system similar to yours, in that it has 256Mb of RAM
> and often is lightly loaded. Here is what free says right now:
>
> total used free shared buffers cached
> Mem: 257972 242560 15412 30872 62268 62000
> -/+ buffers/cache: 118292 139680
> Swap: 315048 15928 299120
>
> Which indicates that 16Mb has been swapped out, and is available
> for disk buffering. (You can also get an idea how much swap I
> might recommend. :-)
Mine is:
total: used: free: shared: buffers:
cached:
Mem: 529330176 526209024 3121152 89923584 207638528 190623744
Swap: 279642112 17080320 262561792
This seems to support my view that no matter what the amount of RAM
(iff there is "enough"), Linux uses about 16 Megabytes of swap
space. ;-)
> The actual virtual memory (RAM + swap) you *must* have amounts
> to "more than the need for virtual memory will ever be". And
> remember that if your vm use exceeds the RAM + swap total, your
> system will crash.
Is this true of Linux? In the old days (around mid 1980s), a
UNIX system would not crash when you ran out of memory. The fork(2)
routine would just give an error return. If a shell got that, it
would just write "cannot fork", but the system would remain up. Of
course, the sysadmin would start looking around for the memory hog.
Somewhere around that time, they reserved a little memory and a
process table slot for the super-user so that something could be
done.
> So the question is, how much vm could your
> box possibly ever use? Since for _you_, swap is free... pick
> some nice large figure that boggles your mind (if you had ever
> bought a computer 15-20 years ago, just idea of having half a
> meg of virtual memory is worth what it is going to cost you!).
>
> (And if you use Netscrape, at some point the amount of vm it
> uses will be all there is, no matter how much you have. In that
> case you want enough that you'll notice it before the crash...)
On my systems, Netscape uses around 24 Megabytes, but it does not
grow unbounded, even when I open multiple windows with it. Others
report memory leaks, but I have never seen any. Does the memory
leak without appearing in the Netscape line of the top command?
--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 73926.
/( )\ Shrewsbury, New Jersey
^^-^^ 8:12am up 37 days, 15:39, 2 users, load average: 3.12, 3.17, 3.13
Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)
| Views for this page | ||||
|---|---|---|---|---|
| Today | This Week | This Month | This Year | Overall |
| 2 | 5 | 27 | 446 | 1,776 |
/Bofcusm/549.html copyright 1997-2004 (various authors) All Rights Reserved
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Add your comments