This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
informatique:linux:reseau [2020/12/06 19:33] pteu Activer le TCP BBR |
informatique:linux:reseau [2021/01/31 16:40] (current) pteu Diagnostique |
||
---|---|---|---|
Line 190: | Line 190: | ||
* [[https://www.kernel.org/doc/Documentation/networking/bonding.txt|Linux Ethernet Bonding Driver HOWTO]] sur kernel.org | * [[https://www.kernel.org/doc/Documentation/networking/bonding.txt|Linux Ethernet Bonding Driver HOWTO]] sur kernel.org | ||
* [[https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-using_channel_bonding|Using Channel Bonding]] (Redhat.com) | * [[https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-using_channel_bonding|Using Channel Bonding]] (Redhat.com) | ||
+ | |||
+ | =====Diagnostique===== | ||
+ | |||
+ | Afficher les infos gloables de la carte réseau: | ||
+ | <code bash> | ||
+ | ifconfig eno0 | ||
+ | eno0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 | ||
+ | inet 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.254 | ||
+ | inet6 fe80::1 prefixlen 64 scopeid 0x20<link> | ||
+ | ether 00:11:22:33:44:55 txqueuelen 1000 (Ethernet) | ||
+ | RX packets 145863345 bytes 51112594452 (47.6 GiB) | ||
+ | RX errors 0 dropped 101954 overruns 0 frame 0 | ||
+ | TX packets 172043044 bytes 222388343673 (207.1 GiB) | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | device interrupt 16 memory 0x80400000-80420000 | ||
+ | </code> | ||
+ | Ici on voit un problème de paquets supprimés (dropped). | ||
+ | |||
+ | Afficher les statistiques de la carte (les compteurs plus précis) : | ||
+ | <code bash> | ||
+ | ethtool -S eth0 | ||
+ | NIC statistics: | ||
+ | rx_packets: 145743003 | ||
+ | tx_packets: 171911063 | ||
+ | rx_bytes: 51104241565 | ||
+ | tx_bytes: 222190909954 | ||
+ | rx_broadcast: 9278170 | ||
+ | tx_broadcast: 50 | ||
+ | rx_multicast: 3348219 | ||
+ | tx_multicast: 8 | ||
+ | rx_errors: 0 | ||
+ | tx_errors: 0 | ||
+ | tx_dropped: 0 | ||
+ | multicast: 3348219 | ||
+ | collisions: 0 | ||
+ | rx_length_errors: 0 | ||
+ | rx_over_errors: 0 | ||
+ | rx_crc_errors: 0 | ||
+ | rx_frame_errors: 0 | ||
+ | rx_no_buffer_count: 708691 | ||
+ | rx_missed_errors: 101954 | ||
+ | tx_aborted_errors: 0 | ||
+ | tx_carrier_errors: 0 | ||
+ | tx_fifo_errors: 0 | ||
+ | tx_heartbeat_errors: 0 | ||
+ | tx_window_errors: 0 | ||
+ | tx_abort_late_coll: 0 | ||
+ | tx_deferred_ok: 0 | ||
+ | tx_single_coll_ok: 0 | ||
+ | tx_multi_coll_ok: 0 | ||
+ | tx_timeout_count: 0 | ||
+ | tx_restart_queue: 0 | ||
+ | rx_long_length_errors: 0 | ||
+ | rx_short_length_errors: 0 | ||
+ | rx_align_errors: 0 | ||
+ | tx_tcp_seg_good: 0 | ||
+ | tx_tcp_seg_failed: 0 | ||
+ | rx_flow_control_xon: 0 | ||
+ | rx_flow_control_xoff: 0 | ||
+ | tx_flow_control_xon: 0 | ||
+ | tx_flow_control_xoff: 0 | ||
+ | rx_csum_offload_good: 132050209 | ||
+ | rx_csum_offload_errors: 284 | ||
+ | rx_header_split: 0 | ||
+ | alloc_rx_buff_failed: 0 | ||
+ | tx_smbus: 0 | ||
+ | rx_smbus: 0 | ||
+ | dropped_smbus: 0 | ||
+ | rx_dma_failed: 0 | ||
+ | tx_dma_failed: 0 | ||
+ | rx_hwtstamp_cleared: 0 | ||
+ | uncorr_ecc_errors: 0 | ||
+ | corr_ecc_errors: 0 | ||
+ | tx_hwtstamp_timeouts: 0 | ||
+ | tx_hwtstamp_skipped: 0 | ||
+ | </code> | ||
+ | Le compteur rx_missed_errors indique des paquets perdus ; la cause est souvent le tampon réseau qui est saturé, car trop de paquets reçus en même temps (à cause de burst, voir contrôle de flux), ou CPU trop lente/chargée pour les traiter. | ||
+ | |||
+ | Il peut être utile d'augmenter la taille des buffers et de faire des tests ; en gardant à l'esprit que cela augmente aussi la latence : | ||
+ | <code bash> | ||
+ | # afficher les paramètres actuels et les max admis | ||
+ | ethtool -g eno0 | ||
+ | Ring parameters for eno0: | ||
+ | Pre-set maximums: | ||
+ | RX: 4096 | ||
+ | RX Mini: 0 | ||
+ | RX Jumbo: 0 | ||
+ | TX: 4096 | ||
+ | Current hardware settings: | ||
+ | RX: 256 | ||
+ | RX Mini: 0 | ||
+ | RX Jumbo: 0 | ||
+ | TX: 256 | ||
+ | |||
+ | # augmenter les buffers rx/tx | ||
+ | ethtool -G eno0 rx 4096 tx 4096 | ||
+ | </code> | ||
=====Tips===== | =====Tips===== |