Date: Fri, 3 Aug 2001 13:01:44 -0500 From: Alfred Perlstein <bright@mu.org> To: ":: Patrick Tracanelli ::" <eeviac@fatectq.com.br> Cc: freebsd-current@FreeBSD.ORG Subject: Re: Keeping User Database loaded in Mem Message-ID: <20010803130144.B85642@elvis.mu.org> In-Reply-To: <5.1.0.14.0.20010803053447.00a10560@200.210.2.10>; from eeviac@fatectq.com.br on Fri, Aug 03, 2001 at 05:54:56AM -0300 References: <5.1.0.14.0.20010803053447.00a10560@200.210.2.10>
next in thread | previous in thread | raw e-mail | index | archive | help
* :: Patrick Tracanelli :: <eeviac@fatectq.com.br> [010803 10:51] wrote: > > > Hello you all; > I want to know if there is a working way to keep FreeBSD's user database > loaded in memory. The reason's for that is very clear, if i keep my spwd.db > loaded the access to it won't be a disk access, so this will speedup any > forms of authentication... > > The reason is that i want to avoid SQL databases in some cases where the > system database works better to me. I have calculated that a database > amount of 3000 (+/-) users would need about 7.6MB of memory, what sounds > very good to me... > > If there isn't a way to it, yet, that is something i would love to see when > -CURRENT becomes -RELEASE... it's an idea :) The filesystem cache should keep the database in memory as long as there is no pressure on the cache, otherwise it may evict the file. If you _really_ want to keep it in memory what I would suggest is writing a daemon that monitors the size of the file and keeps it both mmap(2)'s and mlocked(2), this would be trivial to do and would force the system to keep the file in memory. -- -Alfred Perlstein [alfred@freebsd.org] Ok, who wrote this damn function called '??'? And why do my programs keep crashing in it? 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?20010803130144.B85642>