TX Queue len ,CPU governor 설정으로 인한 TPS 향상


# 1. 높은 트래픽이 발생할 때 VM 과 연결된 Tap 인터페이스에서 TX(송신) 패킷 일부가 Drop 되는 현상 발견 아래 TX 부분을 보면 3029307 패킷이 dropped 된 것을 알 수 있음 ``` ubuntu@node5:~$ ip -s link show tap8bd3b202-68 37: tap8bd3b202-68: mtu 1442 qdisc noqueue master ovs-system state UNKNOWN mode DEFAULT group default qlen 10000 link/ether fe:16:3e:9d:fe:59 brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped missed mcast 177475151438 220065795 0 0 0 0 TX: bytes packets errors dropped carrier collsns 165953857281 247271170 0 3029307 0 0 ``` 해결 방법으로는 TX Queue 사이즈를 늘리는 것 `/sbin/ip link set tap8bd3b202-68 txqueuelen 10000` 참조 링크: (https://docs.redhat.com/en/documentation/red_hat_openstack_platform/13/html/ovs-dpdk_end_to_end_troubleshooting_guide/high_packet_loss_in_the_tx_queue_of_the_instance_s_tap_interface#high_packet_loss_in_the_tx_queue_of_the_instance_s_tap_interface) # 2. CPU governor 가 schedutil 으로 설정되어 있으면 CPU의 freq를 동적으로 조정하기 때문에 TPS가 낮게 나옴 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor 에 CPU들이 `schedutil`로 설정되어 있는게 원인 sudo sh -c "echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor" 로 변경하면 에러 해결 권장되는 해결 방법인지는 잘 모르겠음 참고: https://askubuntu.com/questions/1021748/set-cpu-governor-to-performance-in-18-04 #### 튜닝 전 TPS: 8,000 대

#### 튜닝 후 TPS: 11,000 대

되돌아가기 수정