[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: commit: ldap/servers/slapd entry.c proto-slap.h slap.h zn_malloc.c





--On Wednesday, December 15, 2004 11:07 AM -0500 Jong-Hyuk <jongchoi@watson.ibm.com> wrote:

Looks cool. Can you please remind me what this is doing? You detect when
physical memory is exhausted by noticing increased swap space usage? I
suppose one might get a similar effect by just setting the memoryuse
limit before running slapd, except that we would have to change the
behavior of ch_malloc and its callers.

The main goal of the adaptive caching is to make slapd's performance robust to physical memory shortage as well as to make it benefit from the low latency of the application-level entry caching. It enables autonomic management of the degree of entry caching which can dynamically adapt to changing availability of memory in the system. In addition, because of the zone-based memory allocator, the performance behavior upon swapping (incl. ones caused by other apps or underlying system) will be improved by much. Look at http://www.openldap.org/conf/odd-sandiego-2004/Jonghyuk.pdf for performance implication and early evaluation results. The resource limit approach can be considered as a static approach whereas the adaptive caching can be considered as a more dynamic management of entry caching which can adapt to the changing system condition. In addition, with the conventional malloc and resource limit approach, it does not seem feasible to decrease the footprint of the entry cache without writing them back to the swap device. With the zone-based memory allocator, it is possible to yank the memory pages in the victim zone upon memory shortage. The entry cache entries which were contained in those pages can be reconstructed from the database when they are accessed later.

Great... I've been doing some benchmarking where I'd love to see if this made a difference.


--Quanah


-- Quanah Gibson-Mount Principal Software Developer ITSS/Shared Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html