This discussion is archived
12 Replies Latest reply: Nov 17, 2012 4:14 PM by Marco Milo RSS

Know: used cache dsee

Rodrigo0461 Newbie
Currently Being Moderated
Hi all.

I need to know the cache used *./dsconf help-properties -v | grep cache*

the output

SER db-cache-size rw MEMORY_SIZE (Ex: 3G,2M,200k,10000b) nsslapd-dbcachesize Memory available for all indexes (Default: 32M)
SER import-cache-size rw MEMORY_SIZE (Ex: 3G,2M,200k,10000b) nsslapd-import-cachesize Size of the database cache used in the import process (Default: 64M)
SUF entry-cache-count rw INTEGER | unlimited nsslapd-cachesize Cache size in term of entries(Default: unlimited)
SUF entry-cache-size rw MEMORY_SIZE (Ex: 3G,2M,200k,10000b) nsslapd-cachememsize Cache size in term of memory space(Default: 10M)

but, are default values(size)

I need to know the cache used


please!


Thanks

Edited by: Rodrigo0461 on Nov 5, 2012 11:11 AM
  • 1. Re: Know: used cache dsee
    Marco Milo Journeyer
    Currently Being Moderated
    Hello,

    # ./dsconf get-server-prop -D "cn=Directory Manager" -w <PWD_FILE> -p <PORT> db-cache-size
    db-cache-size : 32M

    # ./dsconf get-server-prop -D "cn=Directory Manager" -w <PWD_FILE> -p <PORT> import-cache-size
    import-cache-size : 64M

    # ./dsconf get-suffix-prop -D "cn=Directory Manager" -w <PWD_FILE> -p <PORT> <SUFFIX> entry-cache-count
    entry-cache-count : unlimited

    # ./dsconf get-suffix-prop -D "cn=Directory Manager" -w <PWD_FILE> -p <PORT> <SUFFIX> entry-cache-size
    entry-cache-size : 10M

    where <SUFFIX> is your suffix (something like "dc=example,dc=com" including double quotes)

    HTH,
    Marco
  • 2. Re: Know: used cache dsee
    Rodrigo0461 Newbie
    Currently Being Moderated
    Thanks marco

    that I know, shows default values.


    but I want to know the cache used.


    thanks
  • 3. Re: Know: used cache dsee
    Marco Milo Journeyer
    Currently Being Moderated
    Hello Rodrigo,
    actually the dsconf command shows you the CURRENT values:

    # ./dsconf get-suffix-prop -D "cn=Directory Manager" -w password -p 40389 "dc=example,dc=com" entry-cache-size
    entry-cache-size : 10M

    if for example you change:

    # ./dsconf set-suffix-prop -D "cn=Directory Manager" -w password -p 40389 "dc=example,dc=com" entry-cache-size:20M

    then at the next query, you'll have:

    # ./dsconf get-suffix-prop -D "cn=Directory Manager" -w password -p 40389 "dc=example,dc=com" entry-cache-size
    entry-cache-size : 20M

    Otherwise, if you would like to have a 'deeper' look, you could 'dare to watch' under the cn=config branch:

    # ldapsearch -D "cn=Directory Manager" -w password -p 40389 -b "cn=config" objectclass=nsBackendInstance
    version: 1
    dn: cn=example,cn=ldbm database,cn=plugins,cn=config
    objectClass: top
    objectClass: extensibleObject
    objectClass: nsBackendInstance
    cn: example
    nsslapd-suffix: dc=example,dc=com
    nsslapd-cachesize: -1
    nsslapd-cachememsize: 20971520
    nsslapd-readonly: off
    nsslapd-require-index: off
    nsslapd-directory: /app/ds11gR1PS1/var/test/db/example


    HTH,
    Marco
  • 4. Re: Know: used cache dsee
    Rodrigo0461 Newbie
    Currently Being Moderated
    but, whats the used cache size?

    this?????


    nsslapd-cachememsize: 10485760
  • 5. Re: Know: used cache dsee
    802907 Journeyer
    Currently Being Moderated
    I think you are looking for the backend monitors. Use the filter "cn=monitor" and the basedn "cn=config". It may not be exactly what you're looking for, but it'll be closer.
  • 6. Re: Know: used cache dsee
    Marco Milo Journeyer
    Currently Being Moderated
    The used cache size for each suffix (besides being monitored with DSCC: Directory Server instance->Server Configuration -> Performance) can be monitored with:

    # ldapsearch -D "cn=Directory Manager" -w <PASSWORD> -h <HOST> -p <PORT> -b "cn=config" cn=monitor currententrycachesize
    version: 1
    dn: cn=monitor,cn=Class of Service,cn=plugins,cn=config

    dn: cn=monitor, cn=ldbm database, cn=plugins, cn=config

    dn: cn=monitor, cn=example, cn=ldbm database, cn=plugins, cn=config
    currententrycachesize: 753928

    HTH,
    Marco
  • 7. Re: Know: used cache dsee
    Rodrigo0461 Newbie
    Currently Being Moderated
    thanks Marco and Chris for your help!!
  • 8. Re: Know: used cache dsee
    Marco Milo Journeyer
    Currently Being Moderated
    so, is this question answered? ;-)
  • 9. Re: Know: used cache dsee
    Rodrigo0461 Newbie
    Currently Being Moderated
    Yes.

    I sought and this I'm interested.

    entrycachehits: 9075
    entrycachetries: 41105
    entrycachehitratio: 22

    I had to run the command for example:

    ldapsearch -D "cn=Directory Manager" -w admin123 -h localhost -p 389 -b "cn=config" cn=monitor | grep entrycachehitratio


    Thanks. see you.

    NOTE: I'm Chilean and my English is poor
  • 10. Re: Know: used cache dsee
    Marco Milo Journeyer
    Currently Being Moderated
    Just a 'quick' one to optimize your scripting and searches... instead of

    # ldapsearch -D "cn=Directory Manager" -w admin123 -h localhost -p 389 -b "cn=config" cn=monitor | grep entrycachehitratio

    If you're using the ldapsearch command shipped with the Directory Server or the one shipped with Solaris O.S., you could adopt the following syntax:

    ldapsearch -D "cn=Directory Manager" -w admin123 -h localhost -p 389 -1 -T -b "cn=example, cn=ldbm database, cn=plugins, cn=config" cn=monitor entrycachehits entrycachetries entrycachehitratio
    dn: cn=monitor, cn=example, cn=ldbm database, cn=plugins, cn=config
    entrycachehits: 44
    entrycachetries: 56
    entrycachehitratio: 78

    The BASE ("cn=example, cn=ldbm database, cn=plugins, cn=config") is the name of your suffix/DB and you could just query the attributes you need (-1 to remove the 'noisy' verson: 1 stamp to specify this is LDIF version 1, and -T to not fold the long lines)

    HTH,
    Marco

    P.S.: I'm Italian, so not a native English speaker as well, but I'd say your English is OK ;-)
    Was just wandering if you'd like to mark this question 'answered' for the records ;-)
  • 11. Re: Know: used cache dsee
    Rodrigo0461 Newbie
    Currently Being Moderated
    Thanks again Marco.


    for monitoring the disk?

    this is correct?

    ldapsearch -h localhost -p 389 -D cn=admin,cn=Administrators,cn=config -w admin123 -b "cn=disk,cn=monitor" "objectclass=*"
  • 12. Re: Know: used cache dsee
    Marco Milo Journeyer
    Currently Being Moderated
    Hello Rodrigo,
    this ldapsearch will report the available free space, a parameter that you may definitely want to monitor as the administrator of your LDAP environment, but there are other very parameters that you would like to monitor just from the OS, such as:

    # iostat -zxXcCT d <INTERVAL>
    # iostat -zxXcCnT d <INTERVAL>

    very important parameter to 'monitor' are the svc_t, wsvc_t, asvc_t (please, refer to the iostat man page for further details); increasing/spikes of these numbers may be a warning that the 'disks' (or more in general the I/O subsystem) may be in 'sufference'. Consistently high svc_t on the filesystems where the DB resides, may lead to high etimes.

    HTH,
    marco

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points