Chapter 12. Troubleshoot OVS DPDK PMD CPU Usage with perf and Collect and Send the Troubleshooting Data
- Prerequisites Use the steps in this section to install troubleshooting tools.
Install
perfon the compute node:yum install perf -y
yum install perf -yCopy to Clipboard Copied! Toggle word wrap Toggle overflow Install Open vSwitch debug RPMs:
subscription-manager repos --enable=rhel-7-server-openstack-10-debug-rpms
subscription-manager repos --enable=rhel-7-server-openstack-10-debug-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Install sysstat (needed for the
pidstatcommand):yum install sysstat -y
yum install sysstat -yCopy to Clipboard Copied! Toggle word wrap Toggle overflow
12.1. Diagnosis 링크 복사링크가 클립보드에 복사되었습니다!
Use the steps in this section to troubleshoot and collect data.
12.1.1. PMD Threads 링크 복사링크가 클립보드에 복사되었습니다!
Determine the location of PMD threads:
IFS=$'\n' ; for l in $(ps -T -p `pidof ovs-vswitchd` | grep pmd);do PID=`echo $l | awk '{print $2}'`; PMD=`echo $l | awk '{print $NF}'` ; PCPU=`taskset -c -p $PID | awk '{print $NF}'` ; echo "$PMD with PID $PID in on pCPU $PCPU"; doneIFS=$'\n' ; for l in $(ps -T -p `pidof ovs-vswitchd` | grep pmd);do PID=`echo $l | awk '{print $2}'`; PMD=`echo $l | awk '{print $NF}'` ; PCPU=`taskset -c -p $PID | awk '{print $NF}'` ; echo "$PMD with PID $PID in on pCPU $PCPU"; doneCopy to Clipboard Copied! Toggle word wrap Toggle overflow For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow While reproducing the issue, run perf record and perf report and save the output.
Create the script
gather_perf_data_a.sh:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the script:
chmod +x gather_perf_data_a.sh ./gather_perf_data_a.sh
chmod +x gather_perf_data_a.sh ./gather_perf_data_a.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow
The report can be read using perf report -i ${archive_name}. If this is for a case that was opened with Red Hat support, attach the resulting tar archive to the case.
12.1.2. Additional Data 링크 복사링크가 클립보드에 복사되었습니다!
Create the script
gather_perf_data_b.shto collect additional data:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Execute the script:
chmod +x gather_perf_data_b.sh ./gather_perf_data_b.sh
chmod +x gather_perf_data_b.sh ./gather_perf_data_b.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteMake sure that there is sufficient disk space. The 'perf.data' file can take up several Gigabytes of disk space.
If this is for a Red Hat support ticket, attach the resulting tar archive to the case.
12.1.3. Open vSwitch Logs 링크 복사링크가 클립보드에 복사되었습니다!
Provide all Open vSwitch (OVS) logs. Ensure that
/varhas sufficient disk space. Usedf -hto determine free disk space on /var anddu -sh /var/log/openvswitchto determine the total size of OVS logs.tar -cvzf /var/openvswitch_`hostname`_`date +"%F_%H%M%S"`.tar.gz /var/log/openvswitch
tar -cvzf /var/openvswitch_`hostname`_`date +"%F_%H%M%S"`.tar.gz /var/log/openvswitchCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Attach the resulting file, for example,
/var/openvswitch_overcloud-compute-0_2018-02-27_153713.tar.gz, to the support case for analysis. Generate and provide an sosreport. Ensure that
/varhas sufficient disk space. Usedf -hto determine free disk space on/var.sosreport --batch --all-logs
sosreport --batch --all-logsCopy to Clipboard Copied! Toggle word wrap Toggle overflow