Skip to content

Conversation

@Junchao-Mellanox
Copy link
Collaborator

@Junchao-Mellanox Junchao-Mellanox commented Oct 11, 2025

Description

Change thermal monitor from sub-process to a thread to reduce memory consumption

Motivation and Context

Reduce memory consumption to gain better performance

How Has This Been Tested?

  1. Existing unit test
  2. Manual test to check the performance

Additional Information (Optional)

# before the change
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                     
   8461 root      20   0  125.4m  36.3m  17.3m S   0.0   0.5   0:00.64 python3 /usr/local/bin/thermalctld                                                                                                          
   8462 root      20   0   52.4m  25.8m   7.9m S   0.0   0.3   0:00.15 python3 /usr/local/bin/thermalctld  

# after the change
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                     
   8397 root      20   0  197.3m  36.5m  17.3m S   0.0   0.5   0:02.62 python3 /usr/local/bin/thermalctld  

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

keboliu
keboliu previously approved these changes Oct 11, 2025
Copy link
Collaborator

@prgeor prgeor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@judyjoseph review?

roy-sror pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Oct 27, 2025
qiluo-msft
qiluo-msft previously approved these changes Oct 30, 2025
@qiluo-msft
Copy link
Contributor

Could you resolve the conflict?

@Junchao-Mellanox Junchao-Mellanox dismissed stale reviews from qiluo-msft and keboliu via 725e67c October 30, 2025 05:53
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft
Copy link
Contributor

qiluo-msft commented Oct 30, 2025

could you share the memory usage numbers in PR description by running below command:

top -c -p `pgrep -f thermalctld | tr "\\n" "," | sed 's/,$//'`

And press "e" key to show MB?

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft qiluo-msft requested a review from judyjoseph October 31, 2025 06:52
@qiluo-msft qiluo-msft merged commit 011d949 into sonic-net:master Nov 1, 2025
5 checks passed
@Junchao-Mellanox Junchao-Mellanox deleted the master-mult-thread-thermalctld branch November 3, 2025 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants