Add save/restore state management to fasterdata-tuning.sh#60
Merged
ShawnMcKee merged 2 commits intomasterfrom Dec 10, 2025
Merged
Add save/restore state management to fasterdata-tuning.sh#60ShawnMcKee merged 2 commits intomasterfrom
ShawnMcKee merged 2 commits intomasterfrom
Conversation
Implements comprehensive save/restore functionality (v1.2.0) to support performance testing workflows with different tuning configurations. Features: - Save current system state with optional labels - Restore previously saved configurations - List, compare, and delete saved states - Auto-save before applying changes - JSON-based state files with metadata Captured state includes: - Sysctl parameters (TCP buffers, congestion control, etc.) - Per-interface settings (txqueuelen, MTU, ring buffers, offload features, qdisc) - Configuration files (/etc/sysctl.d/90-fasterdata.conf, systemd services) - CPU governor and SMT state - Tuned profile State files stored in /var/lib/fasterdata-tuning/saved-states/ New command-line options: --save-state Save current configuration --label LABEL Add label to saved state --restore-state FILE Restore saved configuration --list-states List all saved states --diff-state FILE Compare current vs saved state --delete-state FILE Delete saved state --auto-save-before Auto-save before apply mode Documentation: - Added comprehensive State Management section to fasterdata-tuning.md - Included example performance testing workflow - Updated README.md with quick reference - Added SAVE_RESTORE_DESIGN.md with technical design details Safety features: - Validation and pre-flight checks - Backup files before modification - Interactive confirmation prompts (bypass with --yes) - Warnings for hardware-dependent settings - Clear limitation documentation Use case: Save baseline -> Run tests -> Apply tuning -> Run tests -> Restore baseline -> Try different tuning -> Compare results
- SC2155: Separate declaration and assignment for date command variables - SC2015: Replace A && B || C pattern with proper if-then-else blocks All shellcheck warnings now resolved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements comprehensive save/restore functionality (v1.2.0) to support performance testing workflows with different tuning configurations.
Features:
Captured state includes:
State files stored in /var/lib/fasterdata-tuning/saved-states/
New command-line options:
--save-state Save current configuration
--label LABEL Add label to saved state
--restore-state FILE Restore saved configuration
--list-states List all saved states
--diff-state FILE Compare current vs saved state
--delete-state FILE Delete saved state
--auto-save-before Auto-save before apply mode
Documentation:
Safety features:
Use case:
Save baseline -> Run tests -> Apply tuning -> Run tests -> Restore baseline -> Try different tuning -> Compare results