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

Re: proxycache memory allocation

Pierangelo Masarati wrote:
Not sure about it (it might have already been discussed), but I believe
pcache should "understand" "proxycache-" prefixed directives, and pass
those it doesn't recognize to the private database it uses to store cached
objects. So "proxycache-index" __should__ be recognized as soon as the
private database recognizes it (e.g. back-bdb). If this feature is not
implemented, I think it should, otherwise there would be no means to
separate directives for the underlying database from those for the private
one. Note that this is not usually the case when proxycache is stacked on
a proxy database and stores data locally, but in any case databases
potentially share a number of directives.

I don't think that's the problem at hand. In the example below, the proxycache-directory directive was specified before the proxycache directive, therefore no private DB was known yet.

Once again, people really need to pay attention to the fact that Ordering matters in the config file.This is also another good reason to deprecate the slapd.conf file and just use back-config, which forces related directives to be collected into their own LDAP entries, thus eliminating this confusion.

"Dieter Kluenter" <dieter@dkluenter.de> writes:

I'm testing 2.3.24 back-ldap with proxycache on Linux-2.6.11-x86_64
installed in VMware-Server-1.0, with 512MB Ram, 1GB swap and 10GB disk
space. The host is a x86_64, 2GB RAM, same kernel version.
I just wonder how much memory pcache is allocating, as the kernel runs
out of memory and kills slapd. While running slapd with back-ldap and
rewrite engine only, all is fine. Any hints?
Just for the records. I have found the reason. Manual slapo-pcashe(5)

"config  directives that are specific to the proxycache overlay can
be prefixed by proxycache-, to avoid conflicts with directives specific
to  the  underlying database or to other stacked overlays."

Which I did in my slapd.conf.

| proxycache-directory /var/lib/ldap/cache
| proxycache bdb 5000 1 100 90
| proxycachequeries 10000
| proxyattrset 0 mail telephonenumber
| proxytemplate (|(sn=)(cn=)) 0 3600 3600
| response-callback tail
| proxycache-index objectclass eq
| proxycache-index queryid eq
| proxycache-index sn,cn eq,sub
The statements 'proxycache-directory' and 'proxycache-index' were
unknown to slapd, but now error was submittted.
I just tested successfully with HEAD, which showed the errors.


Dieter Klünter | Systemberatung

 -- Howard Chu
 Chief Architect, Symas Corp.  http://www.symas.com
 Director, Highland Sun        http://highlandsun.com/hyc
 OpenLDAP Core Team            http://www.openldap.org/project/