Skip to content

Commit

Permalink
Deactivate GRO to fix performance issues (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertvolkmann authored Nov 15, 2024
1 parent b888b75 commit ba5ac45
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
3 changes: 0 additions & 3 deletions images/sonic/config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
"mgmt-framework": {
"state": "disabled"
},
"pmon": {
"state": "disabled"
},
"snmp": {
"state": "disabled"
},
Expand Down
2 changes: 2 additions & 0 deletions images/sonic/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def initial_configuration(g: GuestFS) -> None:
g.ln_s(linkname=systemd_system + 'tacacs-config.timer', target='/dev/null') # After boot Host configuration
# Started by featured
g.ln_s(linkname=sonic_target_wants + 'lldp.service', target='/lib/systemd/system/lldp.service')
g.ln_s(linkname=systemd_system + 'pmon.service', target='/lib/systemd/system/pmon.service')
g.ln_s(linkname=sonic_target_wants + 'pmon.service', target='/lib/systemd/system/pmon.service')

# Workaround: Only useful for BackEndToRRouter
g.ln_s(linkname=systemd_system + 'backend-acl.service', target='/dev/null')
Expand Down
16 changes: 16 additions & 0 deletions roles/sonic/tasks/fix-network-performance.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
- name: Collect facts about interfaces
ansible.builtin.setup:
gather_subset:
- '!all'
- '!min'
- interfaces

- name: Gather all network interfaces except eth0
set_fact:
interfaces: "{{ ansible_interfaces | select('match', '^eth[0-9]+$') | reject('equalto', 'eth0') | list }}"

- name: Disable GRO on all network interfaces except eth0
shell: ethtool -K {{ item }} gro off
become: true
with_items: "{{ interfaces }}"
3 changes: 3 additions & 0 deletions roles/sonic/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
- name: Install frr-pythontools
ansible.builtin.import_tasks: frr-reload.yaml

- name: Fix Network Performance
ansible.builtin.import_tasks: fix-network-performance.yaml

- name: Set lldp tx-interval to 10
ansible.builtin.command: lldpcli configure lldp tx-interval 10
retries: 10
Expand Down

0 comments on commit ba5ac45

Please sign in to comment.