@@ -30,7 +30,7 @@ sudo curl -L -o /usr/local/bin/fasterdata-tuning.sh https://osg-htc.org/networki
3030sudo chmod +x /usr/local/bin/fasterdata-tuning.sh
3131```
3232
33- ## Verify the Checksum (Optional )
33+ ## Verify the checksum (optional )
3434
3535To verify script integrity, compare the downloaded file with the provided SHA256 checksum:
3636
@@ -84,7 +84,7 @@ tc qdisc show dev <iface>
8484cat /proc/cmdline | grep -E "iommu=pt|intel_iommu=on|amd_iommu=on"
8585```
8686
87- ## Security & Safety
87+ ## Security & safety
8888
8989- Always test in a staging environment first. Use ` --mode audit ` to review before applying.
9090
@@ -141,10 +141,32 @@ sudo /usr/local/bin/fasterdata-tuning.sh --mode apply --apply-iommu --dry-run
141141sudo /usr/local/bin/fasterdata-tuning.sh --mode apply --apply-iommu --iommu-args " intel_iommu=on iommu=pt" --yes
142142```
143143
144- ## State Management : Save & Restore Configurations
144+ ## State management : Save and restore configurationsns
145145
146146** NEW in v1.2.0** : The script now supports saving and restoring system state for testing different tuning configurations.
147147
148+ ### Quick testing workflow
149+
150+ ** TL;DR** : Save baseline → Apply tuning → Test → Restore → Compare
151+
152+ ``` bash
153+ # Save baseline state
154+ sudo /usr/local/bin/fasterdata-tuning.sh --save-state --label baseline
155+
156+ # Apply tuning
157+ sudo /usr/local/bin/fasterdata-tuning.sh --mode apply --target measurement --yes
158+
159+ # Run your performance tests here (iperf3, perfSONAR tests, etc.)
160+
161+ # Restore baseline
162+ sudo /usr/local/bin/fasterdata-tuning.sh --restore-state baseline --yes
163+
164+ # Compare configurations
165+ /usr/local/bin/fasterdata-tuning.sh --diff-state baseline
166+ ```
167+
168+ ** For detailed step-by-step workflow with multiple tuning profiles, see [ Example Performance Testing Workflow] ( #example-performance-testing-workflow ) below.**
169+
148170### Why use save/restore?
149171
150172When testing performance with different tuning configurations, you need to:
@@ -299,33 +321,32 @@ sudo /usr/local/bin/fasterdata-tuning.sh --restore-state baseline --yes
299321/usr/local/bin/fasterdata-tuning.sh --mode audit
300322```
301323
302- ### State Management Caveats
303-
304- ** What IS saved/restored:**
305-
306- - ✅ Sysctl parameters (runtime values)
307- - ✅ Configuration files (` /etc/sysctl.d/90-fasterdata.conf ` , systemd service)
308- - ✅ Per-interface settings (txqueuelen, MTU, ring buffers, offload features, qdisc)
309- - ✅ CPU governor (runtime)
310- - ✅ SMT state (runtime)
311- - ✅ Tuned profile
324+ ### State management caveats
312325
313- ** What is NOT saved/restored:**
326+ ** What is and is not saved/restored:**
314327
315- - ❌ GRUB kernel command-line parameters (IOMMU, persistent nosmt) - requires reboot
316- - ❌ Kernel module parameters
317- - ❌ Firewall rules
318- - ❌ Network interface creation/deletion
328+ | Component | Saved/Restored | Notes |
329+ | -----------| ----------------| -------|
330+ | Sysctl parameters | ✅ Yes | Runtime values (TCP buffers, congestion control, etc.) |
331+ | Configuration files | ✅ Yes | ` /etc/sysctl.d/90-fasterdata.conf ` , systemd services |
332+ | Per-interface settings | ✅ Yes | txqueuelen, MTU, ring buffers, offload features, qdisc |
333+ | CPU governor | ✅ Yes | Runtime setting |
334+ | SMT state | ✅ Yes | Runtime setting |
335+ | Tuned profile | ✅ Yes | Active profile |
336+ | GRUB kernel cmdline | ❌ No | Requires reboot (IOMMU, persistent nosmt); not suitable for testing cycles |
337+ | Kernel module parameters | ❌ No | Out of scope |
338+ | Firewall rules | ❌ No | Not modified by this script |
339+ | Network interfaces | ❌ No | Interface creation/deletion not supported |
319340
320- ** Limitations :**
341+ ** Important limitations :**
321342
3223431 . ** Hardware-dependent** : Ring buffer sizes are limited by NIC hardware; restoration may fail if hardware doesn't support saved values
3233442 . ** Hostname-specific** : Restoring a state from a different hostname will trigger a warning but proceed
3243453 . ** NetworkManager** : Connection modifications may cause brief network interruptions
3253464 . ** Side effects** : Changing tuned profile may modify additional sysctls not tracked by this script
3263475 . ** Requires python3** : State save/restore operations require python3 for JSON processing
327348
328- ### State File Format
349+ ### State file format
329350
330351State files are stored as JSON in ` /var/lib/fasterdata-tuning/saved-states/ ` with the following structure:
331352
0 commit comments