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);
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:
ceil(max fd/max_client_handles).
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.
libc
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.
0
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |