mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Harkes <jaharkes@cs.cmu.edu>
To: Josh Grebe <squash@primary.net>
Cc: linux-kernel@vger.kernel.org,
	Manfred Spraul <manfred@colorfullife.com>,
	Rik van Riel <riel@conectiva.com.br>
Subject: Re: Question about memory usage in 2.4 vs 2.2
Date: Wed, 21 Mar 2001 14:16:26 -0500	[thread overview]
Message-ID: <20010321141626.A3621@cs.cmu.edu> (raw)
In-Reply-To: <001401c0b1ef$cb22f5e0$5517fea9@local> <Pine.LNX.4.32.0103211127510.2260-100000@scarface.primary.net> <20010320183238.B1508@unthought.net> <Pine.LNX.4.21.0103201156070.2405-100000@scarface.primary.net>
In-Reply-To: <Pine.LNX.4.21.0103201156070.2405-100000@scarface.primary.net>; from squash@primary.net on Tue, Mar 20, 2001 at 02:29:47PM -0600

On Wed, Mar 21, 2001 at 11:42:08AM -0600, Josh Grebe wrote:
> This is what I'm afraid of, in my case we have millions of files that are
> dealt with in no real order, and if cache fragmentation will keep the
> memory from being freed, we're in for problems. This reading was taken
> with the machine having been up for only 5 days. Currently, I show:

You shouldn't worry too much about fragmentation within the slabcache.
It actually is designed to limit the amount of fragmentation. And the
next 100000 dentry/inode allocations will come at no cost ;)

The fact that your icache/dcache slabs are not 100% used indicates that
shrink_i/dcache_memory actually was triggered a couple of times due to
free memory shortage. In contrast, on my machine, the available and
allocated numbers are pretty much always identical. I'm probably not
putting enough VM pressure on the machine so the normal aging/pageout
mechanisms manage to free up just enough memory to avoid dentry/inode
pruning.

> I've had to put my SMTP box back to 2.2 as it was up to 90% memory used,
> where the others were around 18%. I'm keeping the pop/imap server at 2.4
> as 44% is standable, while not exactly desirable. I'm

Did the SMTP box become unusable? Although the VM ends up working with
only the memory that is not locked up in slabs, it does a pretty good
job, as you reported yourself.

On Tue, Mar 20, 2001 at 02:29:47PM -0600, Josh Grebe wrote:
> As far as performance goes, I can only say that my max load is slightly
> lower on the 2.4 box then on the 2.2 boxes. Our average load for yesterday
> on 2.4 was .23, with a max of 1.11. In comparison, my averages for the
> other machines are .27, .27, .23, and .23. The maxes are 1.85, 1.33, 2.06,
> 1.47.
> 
> As far as speed goes, I am not able to measure any real difference (only
> testing pop3) between 2.2 and 2.4. I would blame this on the NAS device, a
> NetApp Filer F760 being only able to push about 110mbit sustained on the
> gig-e network.

Doing an (intuitive) cost/benefit analysis, throwing out an inode does
not guarantee to free up any memory. While throwing out clean pages from
the pagecache will free up some memory and they do not necessarily have
to be read back in at all (otherwise they would have been 'active').

I've been thinking about this a bit and one possible solution would be
to significantly lower the cost of prune_icache by removing the
sync_all_inodes and only let it prune inodes that do not have any
mappings associated with them. Then it might become possible to call it
more frequently, like every time we hit do_try_free_pages.

If there is enough memory available in the system, the inodes will have
mappings and won't be removed. Once memory pressure builds up the
mappings are cleaned and pruned, by the VM system and removing the
remains of the inode should be relatively inexpensive. There is probably
something that I missed, so I should just shut up now and write the code.

Jan


  reply	other threads:[~2001-03-21 19:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-19  2:07 /proc/cpuinfo for Intel P4 D850GB asenec
2001-03-19  2:33 ` davej
2001-03-19  3:14 ` 2.4.3-pre4: Unable to handle kernel NULL pointer dereference at virtual address 000000fb Shawn Starr
2001-03-19 12:02 ` /proc/cpuinfo for Intel P4 D850GB David Weinehall
2001-03-19 21:58 ` 2.4.3-pre4: Unable to handle kernel NULL pointer dereference at virtual address 000000fb Shawn Starr
2001-03-20 17:01 ` Question about memory usage in 2.4 vs 2.2 Josh Grebe
2001-03-20 17:32   ` Jakob Østergaard
2001-03-20 20:29     ` Josh Grebe
2001-03-21 19:16       ` Jan Harkes [this message]
2001-03-21 19:54         ` Rik van Riel
2001-03-20 18:54   ` Jan Harkes
2001-03-20 20:29     ` Josh Grebe
2001-03-20 22:18       ` Rik van Riel
2001-03-20 22:29         ` Juha Saarinen
2001-03-21  9:28         ` Zou Min
2001-03-21  9:51           ` Andreas Dilger
2001-03-21 10:56             ` Zou Min
2001-03-21 10:14 Manfred Spraul
2001-03-21 17:42 ` Josh Grebe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010321141626.A3621@cs.cmu.edu \
    --to=jaharkes@cs.cmu.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=riel@conectiva.com.br \
    --cc=squash@primary.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®