Setting the cfct_config File
You can use the cfct_config file to flexibly configure the resources used by the video stream cloud phone to achieve optimal performance. Before starting a cloud phone, ensure that the cfct_config file is stored in the startup path and the configurations in the file are correct. The cloud phone container uses the configurations in this file.
The configuration items in the cfct_config file and the configuration method are as follows:
- Extract the cfct_config file and grant permissions on the file. Ensure that the file owner has the read and write permissions while users in the owner group and other users have only the read permission.
1 2 3
cd /home/kbox_video/ tar -xvf DemoVideoEngine.tar.gz cfct_config chmod 644 cfct_config
- Change map configurations such as GPU, CPU, ENC, and USERDATA of the corresponding channel to select the GPU, CPU, NETINT encoding card, and path to the data volume used by the container of this channel.
- The nodes of the NETINT encoding card vary according to the server. You need to change the value of NETINT in the cfct_config file based on your environment to ensure that the performance is not affected due to cross-chip encoding.
- To enable hardware decoding of the Quadra/T432 encoding card, set T432_QUADRA_DECODE_ENABLE to 1 in the cfct_config file.
- If only one GPU is used in your environment, change the value of VIDEO_CPU_MAP_{total_CPU_core_number}CORE_MODE{CPU_BIND_MODE} in the cfct_config file. You can query the NUMA to which a NETINT card chip belongs based on Querying the NUMA to Which a NETINT Card Chip Belongs.
Take VIDEO_CPU_MAP_128CORE_MODE0 as an example. Retain the configuration of the CPU bound to the GPU and delete other configurations. If the GPU is inserted into CPU 0, delete all references related to MODE0_CPUS2 and MODE0_CPUS3. If the GPU is inserted into CPU 1, delete all references related to MODE0_CPUS0 and MODE0_CPUS1.
- If only one encoding card is used in your environment, change the value of VIDEO_ENC_MAP_CORE in the cfct_config file.
- If the encoding card is inserted into CPU 0, delete "${NETINT1}". If the encoding card is inserted into CPU 1, delete "${NETINT0}".
- To enable the WebRTC feature, set ENABLE_WEBRTC_CONNECTION to 1 in cfct_config. If the CPU is used for software encoding of video frames, set CPU_BIND_MODE to 1 in cfct_config to prevent frame freezing.
Querying the NUMA to Which a NETINT Card Chip Belongs
- Run the nvme list command to view the nodes of the codec card chips.
1nvme listThe following command output is an example of the NVMe nodes of the NETINT card chips.
1 2 3 4
Node SN Model Namespace Usage Format FW Rev ------------- -------------------- ---------------- --------- ------------------------ ---------------- -------- /dev/nvme0n1 Q2A325A11DC082-0454A QuadraT2A 1 8.59 TB / 8.59 TB 4 KiB + 0 B 4866rKr1 /dev/nvme1n1 Q2A325A11DC082-0454B QuadraT2A 1 8.59 TB / 8.59 TB 4 KiB + 0 B 4866rKr1
- Check the mapping between NVMe nodes and PCIe bus numbers.{index} indicates the NVMe node number returned in 1. For example, in /dev/nvme1n1, the value of {index} is 1.
1find /sys/devices/ -name nvme{index}
In the following command output, 0000:05:00.0 indicates the bus number of the device.
1 2
/sys/devices/pci0000:00/0000:00:0e.0/0000:05:00.0/nvme/nvme1 /sys/devices/virtual/nvme-subsystem/nvme-subsys1/nvme1
- Check the mapping between the node and NUMA based on the bus number.{busID} indicates the bus number obtained in the previous step. For example, in the command output for nvme1, {busID} is 0000:05:00.0.
1lspci -vvvs {busID} | grep NUMA
The command output is as follows:
1NUMA node: 0
- Change the value of NETINT in cfct_config based on the NUMA information corresponding to the NVMe node of the encoding card.
For servers powered by Kunpeng 920 7265F or 7260 processors: Write NVMe nodes belonging to NUMA 0 and NUMA 1 in the NETINT0 field, and NVMe nodes belonging to NUMA 2 and NUMA 3 in the NETINT1 field.
Two nodes need to be added for each device in a field. For example, for NVMe device 2, you need to add nodes /dev/nvme2 and /dev/nvme2n1.
# Nodes of NETINT encoding card devices NETINT0="/dev/nvme0,/dev/nvme0n1,/dev/nvme1,/dev/nvme1n1" NETINT1="/dev/nvme2,/dev/nvme2n1,/dev/nvme3,/dev/nvme3n1"