[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

203.0. "FCS Drawer Cache" by AIMTEC::PORTER_T (Terry Porter, ALL-IN-1 Support, Atlanta CSC) Mon Mar 09 1992 22:57

What does the FCS use it's Drawer Cache for? My first thought was that it stored
the open drawers, but there is a seperate hash table for that, or are the two
inter-related?

I am trying to understand the relationship between the following server
attributes

Drawer Cache
Max # of Drawers
Drawer Collisions

Here's what I know so far ..

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)

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.

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.

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?

Thanks for any help,

Terry
T.RTitleUserPersonal
Name
DateLines
203.1close but not perfectCHRLIE::HUSTONTue Mar 10 1992 14:5971
    
    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.2Just one thing ...AIMTEC::PORTER_TTerry Porter, ALL-IN-1 Support, Atlanta CSCTue Mar 10 1992 15:3618
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.3Hash table bucket, not RMS bucketCHRLIE::HUSTONTue Mar 10 1992 19:1622
    
    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.4A bucket of hash!AIMTEC::PORTER_TTerry Porter, ALL-IN-1 Support, Atlanta CSCWed Mar 11 1992 21:3813
    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.5I think he's got it...CHRLIE::HUSTONThu Mar 12 1992 13:5316
    
    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