2022-5-7 Solution to the problem of kill process in trt model conversion based on Jetson Xavier NX

Solution to the problem of kill process in trt model conversion based on Jetson Xavier NX

1. Cause of the problem

The reason for the kill problem is basically due to insufficient memory space that comes with Jetson. Therefore, to solve this problem, you need to expand swap (i.e., swap partition space).

2.Solution steps

1) Swapfile installation and settings
Reference: https://blog.csdn.net/lwuit/article/details/104070763?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST %7Edefault-1-104070763-blog-108372878.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1-104070763-blog-108372878.pc_relevant_default&utm_ relevant_index=1

git clone https://github.com/JetsonHacksNano/installSwapfile
sudo ./installSwapfile/installSwapfile.sh

Note: Swapfile is generally stored in the /mnt directory.
If the kill problem still occurs when running the program after setting up Swapfile, you can continue to add swap by following the next steps.
2) Increase swap space
. Reference: https://blog.csdn.net /cpywj/article/details/101021606

#切换路径
cd /mnt
#先禁用以前的swapfile
sudo swapoff ./swapfile
 # 修改swap 空间的大小为8G
sudo dd if=/dev/zero of=/swapfile bs=1M count=8192
# 设置文件为“swap file”类型
sudo mkswap /swapfile
# 启用swapfile
sudo swapon /swapfile

At this time, the swap space is further increased. At the same time, you can use the jtop command to view the memory usage of the computing box in real time (the diagram is as follows):
Insert image description here

Guess you like

Origin blog.csdn.net/LJ1120142576/article/details/124633070