-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move /var/log to RAM for Mellanox SN2700, Nokia 7215 and Dell S6100 #15077
Conversation
@@ -1 +1,2 @@ | |||
VAR_LOG_SIZE=4096 | |||
extra_cmdline_linux="logs_inram=on" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am worries on this platform, it doesn't have too much mem either. Do you have a standard to judge if we need loginram for a platform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Blueve 7215 has around 3GB of total memory. So /var/log size on tmpfs will be max 10% of total memory which comes to around 300MB. Currently it has 2.2GB free:-
root@str-2-7215-acs-4:~# free -h
total used free shared buff/cache available
Mem: 3.0Gi 580Mi 1.9Gi 57Mi 500Mi 2.2Gi
Swap: 0B 0B 0B
root@str-2-7215-acs-4:~#
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But var log size was set to 4GB... you can refer to LN1: VAR_LOG_SIZE=4096
, 300M log size is too small and might easy to trigger rotate issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Blueve checked with Guohan...seems fine. We need to live with this limitation of less memory but cannot use disk for too much writes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Blueve , what rotation issue?
2475ec1
to
03e79bd
Compare
@prgeor , i cannot find where 300MB are set? can you point out? |
@lguohan the calculation is in this set_tmpfs_log_partition_size() |
@yxieca please cherry pick to 202205. |
@StormLiangMS please cherry pick to 202305 |
…onic-net#15077) * add ONIE_PLATFORM_EXTRA_CMDLINE_LINUX to kernel bootparam
Cherry-pick PR to 202205: #15804 |
@qiluo-msft could you cherry pick to 202012? |
Fix the tests failing on newly addded platforms where logs are moved to tmpfs. Related PR: sonic-net/sonic-buildimage#15077 Fixes: sonic-net/sonic-buildimage#15895 This change updates the check from hwsku match to platform match
@prgeor PR conflicts with 202012 branch |
@prgeor, this PR has conflict with 202012, please create manual cherry-pick PR. |
…l S6100 ### Why I did it The commit by prgeor that was merged to master had conflict with 202012 branch and needed to be manually cherrypicked. ##### Work item tracking - Microsoft ADO **(number only)**: 25086124 #### How I did it Manually cherrypicked changes from PR #15077 #### How to verify it Built image with these changes and checked the filesystem: **Mellanox-SN2700** ``` admin@str-msn2700-02:~$ show ver | grep -i "sonic software version" SONiC Software Version: SONiC.202012-16544.362113-6980ffe77 admin@str-msn2700-02:~$ admin@str-msn2700-02:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 3.9G 0 3.9G 0% /dev tmpfs 793M 8.4M 785M 2% /run root-overlay 15G 6.4G 7.9G 45% / /dev/sda3 15G 6.4G 7.9G 45% /host tmpfs 792M 4.7M 788M 1% /var/log tmpfs 3.9G 104M 3.8G 3% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup admin@str-msn2700-02:~$ free -h total used free shared buff/cache available Mem: 7.7Gi 2.5Gi 3.9Gi 120Mi 1.4Gi 4.9Gi Swap: 0B 0B 0B ``` **Nokia-M0-7215** ``` SONiC Software Version: SONiC.202012-16544.362113-6980ffe77 Platform: armhf-nokia_ixs7215_52x-r0 HwSKU: Nokia-M0-7215 ASIC: marvell admin@str2-7215-acs-1:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 1.5G 0 1.5G 0% /dev tmpfs 304M 7.3M 296M 3% /run root-overlay 15G 5.0G 9.5G 35% / /dev/sda2 15G 5.0G 9.5G 35% /host tmpfs 303M 728K 303M 1% /var/log tmpfs 1.5G 0 1.5G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup admin@str2-7215-acs-1:~$ free -h total used free shared buff/cache available Mem: 3.0Gi 632Mi 1.6Gi 9.0Mi 772Mi 2.3Gi Swap: 0B 0B 0B ``` **Dell S6100** ``` SONiC Software Version: SONiC.202012-16544.362113-00aac5392 Platform: x86_64-dell_s6100_c2538-r0 HwSKU: Force10-S6100 ASIC: broadcom ASIC Count: 1 Uptime: 19:50:04 up 2 min, 1 user, load average: 3.38, 1.66, 0.65 admin@str-s6100-acs-4:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 3.9G 0 3.9G 0% /dev tmpfs 797M 7.8M 789M 1% /run root-overlay 14G 4.7G 8.8G 35% / /dev/sda4 14G 4.7G 8.8G 35% /host tmpfs 796M 6.7M 790M 1% /var/log tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup admin@str-s6100-acs-4:~$ free -h total used free shared buff/cache available Mem: 7.8Gi 1.6Gi 4.9Gi 14Mi 1.3Gi 5.9Gi Swap: 0B 0B 0B admin@str-s6100-acs-4:~$ ``` ### Tested branch (Please provide the tested image version) - [x] SONiC.202012-16544.362113-6980ffe77 #### Description for the changelog Move /var/log to RAM for Mellanox SN2700, Nokia 7215 and Dell S6100 for the 202012 image.
…onic-net#15077) * add ONIE_PLATFORM_EXTRA_CMDLINE_LINUX to kernel bootparam
… S6100 (sonic-net#15077)" This reverts commit 05f326e.
… S6100 (sonic-net#15077)" (sonic-net#16775) This reverts commit 05f326e. Microsoft ADO 25355843:
… S6100 (sonic-net#15077)" (sonic-net#16775) This reverts commit 05f326e. Microsoft ADO 25355843:
…et#9094) Fix the tests failing on newly addded platforms where logs are moved to tmpfs. Related PR: sonic-net/sonic-buildimage#15077 Fixes: sonic-net/sonic-buildimage#15895 This change updates the check from hwsku match to platform match
Highlight change, the DHCP config removed from master branch. files/image_config/resolv-config/resolv.conf Related work items: sonic-net#49, sonic-net#2598, sonic-net#11862, sonic-net#12530, sonic-net#14000, sonic-net#14549, sonic-net#14814, sonic-net#15077, sonic-net#15252, sonic-net#15253, sonic-net#15357, sonic-net#15384, sonic-net#15394, sonic-net#15399, sonic-net#15405, sonic-net#15566, sonic-net#15591, sonic-net#15592, sonic-net#15593, sonic-net#15602, sonic-net#15604, sonic-net#15611, sonic-net#15621, sonic-net#15625, sonic-net#15634, sonic-net#15635
Merge code from master to internal Related work items: sonic-net#32, sonic-net#49, sonic-net#376, sonic-net#2598, sonic-net#11862, sonic-net#12530, sonic-net#14000, sonic-net#14547, sonic-net#14549, sonic-net#14814, sonic-net#15077, sonic-net#15239, sonic-net#15252, sonic-net#15253, sonic-net#15298, sonic-net#15357, sonic-net#15384, sonic-net#15394, sonic-net#15399, sonic-net#15405, sonic-net#15511, sonic-net#15566, sonic-net#15583, sonic-net#15591, sonic-net#15592, sonic-net#15593, sonic-net#15602, sonic-net#15604, sonic-net#15611, sonic-net#15621, sonic-net#15625, sonic-net#15634, sonic-net#15635, sonic-net#15645, sonic-net#15646, sonic-net#15647, sonic-net#15657, sonic-net#15658, sonic-net#15697, sonic-net#15699
…and Dell S6100 (sonic-net#15077)" (sonic-net#16775)" This reverts commit 61683d9. Signed-off-by: Stephen Sun <[email protected]>
Why I did it
Move the /var/log on RAM. This is to prevent too many disk write on /var/log when mounted on disk.
Work item tracking
Microsoft ADO (number only): 17955517
How I did it
Pass kernel cmdline option "log_inram=on"
How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)