Skip to content
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

[chassis][psud] Move the PSU parent information generation to the loop run function from the initialization function #576

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

yejianquan
Copy link
Contributor

Description

Move the PSU parent information generation to the loop run function from the initialization function

Motivation and Context

Fixes #575

How Has This Been Tested?

Tested on Cisco chassis, the PHYSICAL_ENTITY_INFO|PSU * can be re-inserted after thermalctld restart.
And monitored the stated db for memory for hours, works well:

admin@x-sup-2:~$ date && sudo ip netns exec asic0 /usr/bin/redis-cli INFO memory
Mon Dec 16 12:54:24 AM UTC 2024
# Memory
used_memory:3102440
used_memory_human:2.96M
used_memory_rss:19279872
used_memory_rss_human:18.39M
used_memory_peak:6644264
used_memory_peak_human:6.34M
used_memory_peak_perc:46.69%
used_memory_overhead:1595144
used_memory_startup:914032
used_memory_dataset:1507296
used_memory_dataset_perc:68.88%
allocator_allocated:3591336
allocator_active:4112384
allocator_resident:7749632
total_system_memory:32826040320
total_system_memory_human:30.57G
used_memory_lua:34816
used_memory_vm_eval:34816
used_memory_lua_human:34.00K
used_memory_scripts_eval:632
number_of_cached_scripts:1
number_of_functions:0
number_of_libraries:0
used_memory_vm_functions:32768
used_memory_vm_total:67584
used_memory_vm_total_human:66.00K
used_memory_functions:200
used_memory_scripts:832
used_memory_scripts_human:832B
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
allocator_frag_ratio:1.15
allocator_frag_bytes:521048
allocator_rss_ratio:1.88
allocator_rss_bytes:3637248
rss_overhead_ratio:2.49
rss_overhead_bytes:11530240
mem_fragmentation_ratio:6.29
mem_fragmentation_bytes:16215752
mem_not_counted_for_evict:0
mem_replication_backlog:0
mem_total_replication_buffers:0
mem_clients_slaves:0
mem_clients_normal:554040
mem_cluster_links:0
mem_aof_buffer:0
mem_allocator:jemalloc-5.3.0
active_defrag_running:0
lazyfree_pending_objects:0
lazyfreed_objects:0

admin@x-sup-2:~$ date && sudo ip netns exec asic0 /usr/bin/redis-cli INFO memory
Mon Dec 16 03:05:14 AM UTC 2024
# Memory
used_memory:3182072
used_memory_human:3.03M
used_memory_rss:19447808
used_memory_rss_human:18.55M
used_memory_peak:6644264
used_memory_peak_human:6.34M
used_memory_peak_perc:47.89%
used_memory_overhead:1694744
used_memory_startup:914032
used_memory_dataset:1487328
used_memory_dataset_perc:65.58%
allocator_allocated:3607320
allocator_active:4112384
allocator_resident:7954432
total_system_memory:32826040320
total_system_memory_human:30.57G
used_memory_lua:34816
used_memory_vm_eval:34816
used_memory_lua_human:34.00K
used_memory_scripts_eval:632
number_of_cached_scripts:1
number_of_functions:0
number_of_libraries:0
used_memory_vm_functions:32768
used_memory_vm_total:67584
used_memory_vm_total_human:66.00K
used_memory_functions:200
used_memory_scripts:832
used_memory_scripts_human:832B
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
allocator_frag_ratio:1.14
allocator_frag_bytes:505064
allocator_rss_ratio:1.93
allocator_rss_bytes:3842048
rss_overhead_ratio:2.44
rss_overhead_bytes:11493376
mem_fragmentation_ratio:6.19
mem_fragmentation_bytes:16304072
mem_not_counted_for_evict:0
mem_replication_backlog:0
mem_total_replication_buffers:0
mem_clients_slaves:0
mem_clients_normal:654600
mem_cluster_links:0
mem_aof_buffer:0
mem_allocator:jemalloc-5.3.0
active_defrag_running:0
lazyfree_pending_objects:0
lazyfreed_objects:0

Additional Information (Optional)

…p run function from the initialization function
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yejianquan
Copy link
Contributor Author

@abdosi @sdszhang @cyw233 @vperumal @anamehra for viz

@abdosi
Copy link
Contributor

abdosi commented Dec 16, 2024

@mlok-nokia @arlakshm : please check if their is any other impact of this change,

@yxieca yxieca merged commit 0d79916 into sonic-net:master Dec 17, 2024
5 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-platform-daemons that referenced this pull request Dec 18, 2024
…p run function from the initialization function (sonic-net#576)

Description
Move the PSU parent information generation to the loop run function from the initialization function

Motivation and Context
Fixes sonic-net#575

How Has This Been Tested?
Tested on Cisco chassis, the PHYSICAL_ENTITY_INFO|PSU * can be re-inserted after thermalctld restart.
And monitored the stated db for memory for hours, works well:
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #578

mssonicbld pushed a commit that referenced this pull request Dec 18, 2024
…p run function from the initialization function (#576)

Description
Move the PSU parent information generation to the loop run function from the initialization function

Motivation and Context
Fixes #575

How Has This Been Tested?
Tested on Cisco chassis, the PHYSICAL_ENTITY_INFO|PSU * can be re-inserted after thermalctld restart.
And monitored the stated db for memory for hours, works well:
vvolam pushed a commit to vvolam/sonic-platform-daemons that referenced this pull request Jan 3, 2025
…p run function from the initialization function (sonic-net#576)

Description
Move the PSU parent information generation to the loop run function from the initialization function

Motivation and Context
Fixes sonic-net#575

How Has This Been Tested?
Tested on Cisco chassis, the PHYSICAL_ENTITY_INFO|PSU * can be re-inserted after thermalctld restart.
And monitored the stated db for memory for hours, works well:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Done
Development

Successfully merging this pull request may close these issues.

[chassis] PSU keys(generated by psud) got removed by the restart of thermalctld and won't auto recover.
4 participants