Code optimizations to reduce disk writes on SONiC switches#20640
Merged
yxieca merged 11 commits intosonic-net:masterfrom Dec 5, 2024
Merged
Code optimizations to reduce disk writes on SONiC switches#20640yxieca merged 11 commits intosonic-net:masterfrom
yxieca merged 11 commits intosonic-net:masterfrom
Conversation
saiarcot895
reviewed
Oct 29, 2024
Contributor
Author
|
@keboliu @Junchao-Mellanox @dgsudharsan, please help review this PR, thank you in advance. |
7a94212 to
397263d
Compare
Contributor
|
@assrinivasan build checks failing |
prgeor
reviewed
Nov 5, 2024
prgeor
previously approved these changes
Nov 5, 2024
7f7e65a to
b449304
Compare
saiarcot895
reviewed
Nov 25, 2024
Contributor
Author
|
/azpw ms_conflict |
7b380b4 to
1555847
Compare
added 9 commits
November 28, 2024 01:30
…pervisord change to bookworm
1555847 to
db0a894
Compare
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azpw ms_conflict |
prgeor
reviewed
Dec 2, 2024
prgeor
reviewed
Dec 2, 2024
| mkdir -p ${rootmnt}/host/$image_dir/boot | ||
| mount --bind ${rootmnt}/host/$image_dir/boot ${rootmnt}/boot | ||
|
|
||
| ## Mount the /tmp directory as tmpfs |
Contributor
There was a problem hiding this comment.
@assrinivasan How much memory are we loosing on platform with small RAM? Arista 7050-QX?
Contributor
Author
There was a problem hiding this comment.
We are currently allocating 25% of total RAM towards /tmp directory on all platforms.
saiarcot895
approved these changes
Dec 2, 2024
prgeor
approved these changes
Dec 5, 2024
VladimirKuk
pushed a commit
to Marvell-switching/sonic-buildimage
that referenced
this pull request
Jan 21, 2025
…#20640) Why I did it This PR contains various optimizations to reduce disk writes on SONiC switches as mentioned in the High-level Design. This contributes to the overall reduction in data written to the disk over time, which can help extend the life of the disk and reduce the risk of disk failure. Work item tracking Microsoft ADO (number only): 28300356 How I did it Moved supervisord logs within swss to tmpfs Optimized away repeated disk writes by vtysh in the bgp container Moved monit and logrotate writers to tmpfs How to verify it Flash image with these optimizations onto a sonic switch and check the following: Within swss container, supervisord logs are written to /dev/shm/supervisor/ Within bgp container, verify that ~/.history_frr file is not written into repeatedly with show bgp summary json Verify that monit state file is in /dev/shm/monit Verify that logrotate status file is in /dev/shm/logrotate
Contributor
|
@prgeor @saiarcot895 Could you check and confirm if this is needed for 202411. If so, please create a separate PR to resolve the conflicts and we can push to 202411. |
11 tasks
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.
Why I did it
This PR contains various optimizations to reduce disk writes on SONiC switches as mentioned in the High-level Design.
This contributes to the overall reduction in data written to the disk over time, which can help extend the life of the disk and reduce the risk of disk failure.
Work item tracking
How I did it
How to verify it
Flash image with these optimizations onto a sonic switch and check the following:
show bgp summary jsonWhich release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Code optimizations to reduce disk writes on SONiC switches