Tune aspects of client fd-to-OCB mapping
#include <sys/resmgr.h> int resmgr_handle_tune(int min_handles, int min_clients, int max_client_handles, int *min_handles_old, int *min_clients_old, int *max_client_handles_old);
- To perform the described mapping, the resource manager framework makes use of _resmgr_handle_entry structures. This value describes the minimum number of these structures to keep around. If more than this number are in use, they may be returned to the heap via free() as they're released.
- min_clients, max_client_handles
- To perform the described mapping, the resource
manager framework makes use of hash buckets, one per client.
The min_clients describes the minimum
number of these buckets to keep around. If more than
of clients are in communication with your resource
manager, these buckets may be released back to the
heap via free() as particular clients
close all their fds to your manager.
The max_client_handles describes the size of each of these hash buckets. The maximum number of lookups to find a particular fd-to-OCB mapping is the client's max fd divided by max_client_handles rounded to the nearest integer, i.e. in pseudocode:
If this value changes, the new value takes effect for newly connected clients. Existing clients are unaffected.
If negative values are specified to any of the above three parameters, their current values are left unchanged.
- If any of these are non-NULL, the corresponding value in use by the resource manager layer at the time of the call is returned.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
One of the functions of the resource manager framework is to perform the mapping of client file descriptors to structures local to the resource manager that describe these descriptors. These structures are often Open Control Blocks (OCBs). For details on OCBs, see resmgr_open_bind(). You can use resmgr_handle_tune() to tune certain aspects of this mapping and subsequent lookups of a client's OCBs.
Last modified: 2014-06-24