T.R | Title | User | Personal Name | Date | Lines |
---|
203.1 | close but not perfect | CHRLIE::HUSTON | | Tue Mar 10 1992 14:59 | 71 |
|
Terry,
Close, real close:
>I am trying to understand the relationship between the following server
>attributes
>
>Drawer Cache
This is the number of buckets in the drawer hash table. In other words
the hash table size.
>Max # of Drawers
THis is the number of drawers that will be open AFTER the garbage
collection is done. What happens is that we open say X drawers where
X is the value of max # of drawers. As time goes we will open more
drawers as they are accessed. Periodically (settable via set server
calls) A garbage collection thread runs to reclaim memory. One of its
jobs is to close unused drawers. After the garbage collection is
finished only X drawers will be open.
>Drawer Collisions
This is a server statistic. Each drawer that is open is stored in
a hash table. When a new one is added if a collision occurs in the
hash table this counter is incremented. As you mentioned a high value
means your hash table is to small. Just FYI collisions are resolved via
chaining from the appropriate hash bucket. the chains are stored in
alphabetical order by device id.
>The Max # Drawers determines the size of the Drawer Hash Table and is the
>target number of open drawers for garbage collection (drawers open in excess
>of this number will be closed by garbage collection)
You combined drawer cache size with max drawers. See the above
>A Drawer Collision occurs when the same drawer hash table entry is used for
>more than one drawer at once. A large number indicates that the drawer hash
>table is too small.
Yup.
>I know that drawer information is cached (e.g. the allowed access is cached
>and only periodically refreshed) but the default size of Drawer Cache is much
>smaller than the Max # of Drawers and so the Drawer Cache can not hold all
>the open drawers.
If the drawer hash table is smaller than the max drawers it is ok.
Drawer collisions are resolved by chaining so it is possible to have
many more open drawers (hash entries) than buckets in the hash table.
>I can speculate that the Drawer Cache holds allowed access information on the
>n most frequently used drawers, is this correct or is there some other
>answer?
It is not quite that simple. All drawers are added to the cache when
opened. The only time a drawer is removed from the cache is when the
garbage collection is done. The decision on which drawers to close is
based on LFU selection. So after garbage collection is done the drawers
remaining open will be the ones that were most frequently used during
the time from the last garbage colleciton run.
Clear??
--Bob
|
203.2 | Just one thing ... | AIMTEC::PORTER_T | Terry Porter, ALL-IN-1 Support, Atlanta CSC | Tue Mar 10 1992 15:36 | 18 |
| Bob,
Thanks for the explanation, I had got the idea in my head that the
Max # of Drawers determined the hash table size, and that lead to my confusion
(BTW The ALL-IN-1 Manager's Guide documents Max # of Drawers in section 9.15
incorrectly as the max no of drawers that can be open).
Just one further clarification,
You say the Drawer Cache is a number of buckets, I thought a bucket was a
variable quantity defined for each RMS file. How big is a bucket in this case
and how do you translate from that to the maximum number of open drawers.
(which, presumably, is ultimately the limitation that this attribute is
defining).
Thanks,
Terry
|
203.3 | Hash table bucket, not RMS bucket | CHRLIE::HUSTON | | Tue Mar 10 1992 19:16 | 22 |
|
Terry,
>You say the Drawer Cache is a number of buckets, I thought a bucket was a
>variable quantity defined for each RMS file. How big is a bucket in this case
>and how do you translate from that to the maximum number of open drawers.
>(which, presumably, is ultimately the limitation that this attribute is
>defining).
You are confusing an RMS bucket with a hash table bucket. A hash table
bucket, which is what I am talking about, is simply a term that is
used for a hash table entry. A hash table is usually an array and each
entry in the array is called a bucket. Hence if the Drawer Cache size
is set to 256, then there are 256 entries in the array or hash table
buckets. Each bucket contains a pointer to all the drawers that have
hashed to the value for that bucket (this is called collision
resolution by chaining).
Hows that?
--Bob
|
203.4 | A bucket of hash! | AIMTEC::PORTER_T | Terry Porter, ALL-IN-1 Support, Atlanta CSC | Wed Mar 11 1992 21:38 | 13 |
| Bob,
I had never seen the term bucket aplied to applied to a hash table
before, I guess I need to get out more :-)
If I have got it straight, the Drawer Cache attribute determines the
size of the drawer hash table and there is no limit on the number of open
drawers other than the fact that garbage collection will reduce the
number of open drawers to Max # of Drawers, and that there must be VM
avalable (which should never be a problem except under very extreem
circumstances).
Terry
|
203.5 | I think he's got it... | CHRLIE::HUSTON | | Thu Mar 12 1992 13:53 | 16 |
|
Terry,
>If I have got it straight, the Drawer Cache attribute determines the
>size of the drawer hash table and there is no limit on the number of open
>drawers other than the fact that garbage collection will reduce the
>number of open drawers to Max # of Drawers, and that there must be VM
>avalable (which should never be a problem except under very extreem
>circumstances).
Yup, the only limit is the number of drawers on the system and
memory. If we ever try to allocate memory and fail we imediately
run the garbage collector to free up memory.
--Bob
|