userdb cache expiry
Tim Dijkstra
newsuser at famdijkstra.org
Tue Sep 19 15:05:31 PDT 2006
On Mon, 18 Sep 2006 16:05:08 -0400
Havoc Pennington <hp at redhat.com> wrote:
> Tim Dijkstra wrote:
> >
> > Why doesn't dbus just rely on the OS to do the caching? On linux,
> > nscd exist for this purpose for example ...
> >
>
> It was just too slow, I forget why but there were a *lot* of lookups.
> Maybe the real issue was just when running the test suite.
>
> This is something that should be fixed, I agree. As a first pass you
> could try hacking the cache so it never caches anything and see what
> difference it makes in time to run "make check" - probably better to
> develop a simple real-world benchmark, though.
FWIW, I commented out the part that gets the user from the cache
(AFAICS there is only one function that directly access the cache). Not
the part that puts it in, because that would create a memleak, which
would abort the test (I didn't feel like investigating it further). So
the test is even a bit unfair, in addition to looking up the user the
nocache case also tries to add the user all time.
Despite all this there doesn't seem to be significant difference
between the to cases;
With cache
real 1m36.253s
user 0m17.533s
sys 0m6.684s
real 1m39.846s
user 0m17.945s
sys 0m7.036s
real 1m27.192s
user 0m17.685s
sys 0m6.864s
real 1m15.803s
user 0m17.053s
sys 0m6.692s
real 1m11.619s
user 0m18.337s
sys 0m7.272s
No Cache
real 1m53.428s
user 0m19.329s
sys 0m9.225s
real 1m55.809s
user 0m20.713s
sys 0m8.449s
real 1m16.380s
user 0m18.481s
sys 0m7.364s
real 1m25.100s
user 0m18.393s
sys 0m7.668s
real 1m11.619s
user 0m18.337s
sys 0m7.272s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20060920/e8c14b26/signature.pgp
More information about the dbus
mailing list