Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 1998 00:40:18 -0500 (EST)
From:      "John S. Dyson" <dyson@FreeBSD.ORG>
To:        peter@netplex.com.au (Peter Wemm)
Cc:        dyson@FreeBSD.ORG, dima@xyzzy.machaon.ru, peter@FreeBSD.ORG, current@FreeBSD.ORG, dima@bog.msu.su
Subject:   Re: cvs commit: src/sys/nfs nfs.h nfs_node.c nfs_nqlease.c nfs_subs.c nfs_vfsops.c
Message-ID:  <199805250540.AAA02151@dyson.iquest.net>
In-Reply-To: <199805250511.NAA19722@spinner.netplex.com.au> from Peter Wemm at "May 25, 98 01:11:41 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Wemm said:
> 
> Perhaps we should do some sort of periodic reclaim of unused zone pages? I
> was planning on moving some of the other nfs structs to zones as well,
> especially those that are allocated and freed by the tens or hundreds of
> thousands of times per "busy" session (eg: doing a cvs update over nfs).
> The 'never freed' bit worrys me a little since these can be busty and
      ^^^^^^^^^^^^^
> temporarily larger than usual.  The speed of zone based allocation will be
> nice here, since one one machine that's been running with some nfs activity
> over a day or two has clocked up 300K requests for a 64 byte object, and
> yet the high water mark is only 1KB.  I'd be happy to trade an entire page
> to supercharge that. :-)
> 
Malloc doesn't free things effectively either.  Making zone "free"
pages on the fly would require a significant increase in the amount
of logic.  To make it do a "garbage collection-style" operation
would be easier, and I am not adverse to it.  As it is today, it
won't be much worse (if any) than malloc is.  (Once a piece of
memory is committed to a certain size, it is going to be that
size forever in malloc.  The zone allocator commits a piece of
memory to a "type" instead of a size.  In both cases, the memory
will remain wired for the lifetime of the system.)

At one time, a long time ago, I taught malloc to free memory back
to the system, and it didn't help much.  Maybe sometime in the future,
we can add a zone attribute to try to free memory when it seems to
be a good thing to do (as you suggest) (perhaps when the pageout
daemon decides to.)

-- 
John                  | Never try to teach a pig to sing,
dyson@freebsd.org     | it just makes you look stupid,
jdyson@nc.com         | and it irritates the pig.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805250540.AAA02151>