Resource Pool Management
A number of files with NI prefix names are created (e.g. in folder /dev/shm on Linux) during resource initialization running either init_rsrc or ni_rsrc_mon for the very first time after system reboot. They are used by libxcoder and the ni_rsrc_mon utility to identify all Quadra cards in the system.
The host resource pool management starts with utility program (init_rsrc, or ni_rsrc_mon) scanning the available NETINT transcoder cards on the host. It collects NVMe devices by looking at /dev/nvmeX device files and issuing NVMe identify requests. It checks the response and identifies NETINT devices by matching with NETINT vendor ID 0x1D82. It further identifies transcoder cards by checking the vendor specific data section for a flag named xcoder_support. T4xx card sets this value to 1, and Quadra card 2. All other NVMe devices with this value set to 0 would be considered a non NETINT transcoder device and ignored.
When the NETINT Quadra cards are identified, their information including character device file name (/dev/nvmeX), block device file name (/dev/nvmeXnY) and capabilities numbers are retrieved, records and locks (referred to as host resource pool files) are created and saved at /dev/shm on Linux – a temporary file storage file system that uses RAM for the backing store, and functions as a shared memory for applications to access for transcode resource allocation. On Windows and Android systems the host resource pool files will be generated similarly though the actual file location and mechanism may be different.
A utility program ni_rsrc_list can be run to display the information of cards available on that host. An additional command line argument, -a, when specified, displays general information about cards that were not initialized by init_rsrc.
A utility program ni_rsrc_mon is usually run to print out the status of cards on a host such as load, number of active instance and memory usage. A continued running of this program also keeps updating the host resource pool files in the background, that is cards pulled from or inserted into the system will be detected by this program and host resource records will be updated accordingly.
When an application needs to run a transcoding task, it can either explicitly designate a card to use by its index or its block device name, as presented by ni_rsrc_list, or leave it to the resource management to automatically pick a card with the least load to accomplish load balancing on a host. This is done in the transcode session opening.