Recommended setup with large cache memory

Attila Nagy bra at fsn.hu
Fri Sep 9 11:17:05 UTC 2005


Brad Knowles wrote:
>>  It seems that it works, at least the memory usage doesn't grow besides a
>>  limit and the cache still operates.
>     You should take a look at the internal operations of the program, 
> and see what it is really doing inside.  If you did that, I imagine that 
> you would not like the results.
I guess I won't understand the code in the next ten minutes, so could 
you please help understanding the situation?

As far as I can see, this is not documented, at least not in the 
administrator's manual.

>>  - dropping the old, unused, etc entried dynamically, to make space for
>>  the new ones
>     How do you know where they are?  How can you make sure that you drop 
> just the old expired entries, if you have no time to search the 
> in-memory database to find them and expire them?
Very valid question. :)

Some thoughts, but these are may be bad:
- if a query happens and it's in the cache, but it has been expired, 
remove it (it seems you know the code, is it currently implemented this 
way?). This could give some level of auto cleaning.
- if the memory is full, simply drop, or overwrite the "older" entries. 
For example if you have 1000 "slots" if the number of entries reach 
1000, the first will be the next available slot.
- somehow make the expire process adaptive or "rate limited". It seems a 
little bit odd, to have very degraded performance while the expire runs.

I will try threading enabled to see whether it improves this situation 
or not.

>>  If the second, I guess even a very simple random drop  would be better.
>     I am not at all convinced that a simple random drop of any record 
> would actually be a better solution.
And what do you think about the cyclic reuse of slots?

Of course two slots can be very different in size, but I think this, 
combined with the remove during the query if the record has been expired 
could give better overall performance than doing cleaning at regular 
intervals.

>     You have to take a shower or a bath every so often, right?  Even if 
> there are multiple people in your office that can do your job, even you 
> can only go so long before you have to get clean, right?
>     Why should you expect that this is any different for computer programs?
I think this two cannot be compared.
Do you think that this is the best method?

-- 
Attila Nagy                                   e-mail: Attila.Nagy at fsn.hu
Adopt a directory on our free software   phone @work: +361 371 3536
server! http://www.fsn.hu/?f=brick             cell.: +3630 306 6758



More information about the bind-users mailing list