Date: Mon, 15 May 2017 18:05:30 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 219124] /var/db/services.db is extremely large for what it does Message-ID: <bug-219124-8-r1yTMYMmGW@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-219124-8@https.bugs.freebsd.org/bugzilla/> References: <bug-219124-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219124 --- Comment #4 from Sean Bruno <sbruno@FreeBSD.org> --- I'm guessing that this is an initialization problem. The hash is being set= up to handle way more elements than is really needed in here. % wc -l /etc/services=20 2495 /etc/services HASHINFO hinfo =3D { .bsize =3D 256, .ffactor =3D 4, .nelem =3D 32768, .cachesize =3D 1024, .hash =3D NULL, .lorder =3D 0 }; If I change the HASHINFO to be slightly less over engineered (and less futu= re proof), I can get the *empty* services file down to 260k, but that's not re= ally a huge improvement for a basically empty file. Should it be that big? I didn't really think I was going to have to go and learn berkley DB this wee= k.=20 :-) Index: services_mkdb.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- services_mkdb.c (revision 318297) +++ services_mkdb.c (working copy) @@ -68,10 +68,10 @@ static void usage(void); HASHINFO hinfo =3D { - .bsize =3D 256, - .ffactor =3D 4, - .nelem =3D 32768, - .cachesize =3D 1024, + .bsize =3D 48, + .ffactor =3D 1, + .nelem =3D 4096, + .cachesize =3D 256, .hash =3D NULL, .lorder =3D 0 }; -rw-r--r-- 1 sbruno sbruno 262720 May 15 12:04 services.db --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-219124-8-r1yTMYMmGW>