Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Mar 1995 22:21:44 -0800 (PST)
From:      Poul-Henning Kamp <phk@ref.tfs.com>
To:        current@FreeBSD.org
Subject:   the chatterbug categorized
Message-ID:  <199503070721.XAA24911@ref.tfs.com>

next in thread | raw e-mail | index | archive | help

I belive that David and I have understood the chatterbug, now we just
need to find it and fix it.

What happens is that some vnodes are not properly freed when the vm_object
is freed, this has two effects:  one is that the list of free vnodes are
too short to make the name-cache efficient (the chatter) and the other
is that the system will continue to allocate more vnodes, (the gradual
loss of available memory)

Now to isolate it, we need to know when it happens, I can reproduce it here
with:
	cd /usr/src/release
	make release CHROOTDIR=<500Mb space>

but it takes long time.
If any of you have any idea about any specific action or program that
makes this happen, we'd like to know.

Here is a small piece of C-source, compile it with -lkvm and run as
root.  It will print a line like
	desired 1874 vnodes, have 5594 vnodes
If you find a way to get the "have" number to increase consistenly above
the "desired" number, please tell us.

Thanks for your time,

Poul-Henning

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <kvm.h>

struct nlist namelist[] = {
        { "_numvnodes" }, { "_desiredvnodes" }, { NULL } };

kvm_t   *kv;
main()
{
        int i;
        u_long l1;

        kv = kvm_open(NULL,NULL,NULL,O_RDWR,"dnc");
        if (!kv) {perror("kvm_open"); exit(1); }
        i = kvm_nlist(kv,namelist);
        if (i) {perror("kvm_nlist"); exit(1); }
        kvm_read(kv,namelist[1].n_value,&l1,sizeof l1);
        printf("desired %u vnodes, ",l1);
        kvm_read(kv,namelist[0].n_value,&l1,sizeof l1);
        printf("have %u vnodes\n",l1);

        return 0;
}

-- 
Poul-Henning Kamp <phk@login.dknet.dk>
TRW Financial Systems, Inc.
I am Pentium Of Borg. Division is Futile. You WILL be approximated.




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