Problem

Two to three weeks after initial installation, you might notice that eDirectory keeps stopping/restarting itself, depending on monitoring and configuration, under a heavy load – for no apparent reason. You might also get a -150 INSUFFICIENT MEMORY error when you try to back up with dsbk or eMBox. This might be because you did not set a hard cache limit, so edirectory uses a dynamic cache, which causes a memory fillup – and ndsd ends up shutting down.

It’s very important to set a hard limit for the eDirectory Cache on Linux, especially if you’re running Identity Manager engine and drivers. Although I’ve used this solution with Linux, I’m guessing it would apply to all other operating systems, such as UNIX distributions.

Solution

How you would set such a limit? One way is to use iMonitor. Or, you can simply create a _ndsdb.ini file in the DIB directory (where nds.01 resides) with content like this:

cache=1024000000
preallocatecache=true

This sets a hard cache limit of 1 GB and preallocates a limited cache at the beginning of the start process for better performance and lesser fragmentation.

It’s also a good idea to modify /etc/init.d/ndsd to set DHOST_JVM_MAX_HEAP to something greater than 64 MB (default), such as ~ 400 MB (DHOST_JVM_MAX_HEAP=400000000). This is helpful if you’re running the Identity Manager engine and drivers, so that the drivers have more memory to work with.

WARNING: This documents explains how to set values. You should check documentations, run tests and consult related people to find out proper values for your system.

Note that you need to restart ndsd to reflect the changes.

(Visited 1 times, 1 visits today)
Tags: ,
Category: Enterprise Linux, Technical Solutions
This entry was posted Wednesday, 20 February, 2008 at 10:42 am
You can follow any responses to this entry via RSS.

Comments

  • rkoushik says:

    We can set this either through iMonitor or by creating a _ndsdb.ini file , The cool solution says iManager that needs a correction , We can set this value through iManager.

    Regards,
    Koushik
    rkoushik@novell.com

  • oasik says:

    You’re right. It’s iMonitor. Corrected. Thanks.

  • mtsjej says:

    This article is very misleading. 1gb of cache on linux is way too much. On NetWare, this is ok, on linux you should not go over 500mg on large dibs.

    Additionally the default java heap is 64mg, not 256mg.

  • oasik says:

    Thanks for your comment. The article does not say “set hard cache limit to 1 GB”, it says it’s good to set a hard cache limit. My server has 8 GB of RAM, and it’s running under heavy load, so it’s set to 1 GB by Novell Technical Support recommendation. They say it’s the upper limit for the hard cache on linux, and setting it to 2 GB,for example, could kill the server.

    Again, NTS told me java heap size is 256 MB by default.

  • mtsjej says:

    Whoever you talked to at NTS is dead wrong. The default heap in IDM,,even the 3.6 version is 64mg. It is easy to prove but making some java calls in an null driver to gather the stats.

    a 400mg heap for IDM is crazy, unless you are dealing with some insane nodesets.

    I stand by my comment that 1gb of dib cache in linux is way too much. I would never ever go over 512mg in linux. In fact all my linux boxes use only a 64mb dib cache–I let the file system do the rest of the cache work for me.

    Whoever you talked to at NTS clearly does not understand the differences between how netware and linux cache edir, nor the idm product very well.

  • oasik says:

    You’re right about default heap size, i’m correcting that. About other comments; our system is a heavily customized non-standard one, and these values are set after running tests and trying other values, as everyone should do. So although i respect your opinions and they can show the way to some other people at least about the first values they should try, for me they are just opinions, not the fact.

  • geoffc says:

    as noted by Jeff, default heap is really 64 Megs. And you will be surprised how memory efficient IDM can be, as you see how many drivers you can run in the real world and not use up all that heap!

    What is nice, is it is really easy to see both what the current heap is set to, and how much is free, as you can see in this article: reading-and-displaying-value-java-heap-identity-manager-rules.

    However, as you grow in complexity of your drivers, and do dumb things like my Toolkit rules series:
    http://www.novell.com/communities/node/6308/toolkit-rules-identity-manager-part-1
    http://www.novell.com/communities/node/6310/toolkit-rules-identity-manager-part-2
    http://www.novell.com/communities/node/6316/toolkit-rules-identity-manager-part-3
    http://www.novell.com/communities/node/6440/toolkit-rules-identity-manager-part-4
    http://www.novell.com/communities/node/6441/example-use-toolkit-rule-identity-manager
    http://www.novell.com/communities/node/6514/another-toolkit-rule-use-example-bad-attribute-value-cleanup

    You are basically guaranteed to overrun the 64 Meg default.

    As of IDM 3.6 it is pretty trivial to change the heap value! It is a setting on the Driver set, which is you goof up, you are in for pain to fix. Ask Jeff and I about it!
    10

  • Leave a Reply

    Your email address will not be published. Required fields are marked *