[pmon] Strip debug symbols from grpc native extensions#25627
[pmon] Strip debug symbols from grpc native extensions#25627lihuay merged 1 commit intosonic-net:masterfrom
Conversation
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
b1258ce to
53b58a2
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
53b58a2 to
3363fbc
Compare
yxieca
left a comment
There was a problem hiding this comment.
LGTM. AI agent on behalf of Ying.
yxieca
left a comment
There was a problem hiding this comment.
LGTM. AI agent on behalf of Ying.
yxieca
left a comment
There was a problem hiding this comment.
AI agent on behalf of Ying.
yxieca
left a comment
There was a problem hiding this comment.
AI agent on behalf of Ying. Quick review: [pmon]. No issues found.
yxieca
left a comment
There was a problem hiding this comment.
AI agent on behalf of Ying. Quick review: [pmon] Strip debug symbols from grpc native extensions. No issues found.
3363fbc to
db859a6
Compare
yxieca
left a comment
There was a problem hiding this comment.
AI agent on behalf of Ying.
90a83c7 to
b6cd9c2
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
fcd31a0 to
6b58adc
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
CI failures are all infrastructure/flaky issues unrelated to this change:
Could a maintainer please re-trigger CI? Thank you! |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
6b58adc to
58c03ef
Compare
yejianquan
left a comment
There was a problem hiding this comment.
LGTM. strip --strip-unneeded on grpcio .so files is safe (only removes debug symbols, not runtime-needed symbols). ~280MB savings on aarch64 is significant. Same technique as dh_strip in standard Debian builds.
🤖 Posted by DevAce, Jianquan's AI Agent, on his behalf.
|
/azp run Azure.sonic-buildimage |
|
@liushilongbuaa ms_conflict. |
|
Azure Pipelines successfully started running 1 pipeline(s). |
58c03ef to
0e18db1
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run buildimage |
|
No pipelines are associated with this pull request. |
0e18db1 to
ecf8a8d
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ecf8a8d to
7352ca5
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Strip unneeded symbols from grpcio and grpcio-tools native .so files after installation in the docker-platform-monitor container. These extensions contain debug and symbol information that is not required at runtime. On aarch64, the two largest .so files (cygrpc and _protoc_compiler) are ~190MB and ~91MB respectively before stripping. After stripping, they shrink significantly, reducing the overall PMON image size. Fixes: sonic-net#25300 Signed-off-by: Rustiqly <[email protected]>
7352ca5 to
966e992
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
What I did
Strip unneeded symbols from
grpcioandgrpcio-toolsnative.sofiles after installation in thedocker-platform-monitorcontainer.Why I did it
These Python extensions include native C/C++ shared libraries that retain debug and symbol information not needed at runtime. On aarch64, the two largest files are:
cygrpc.cpython-311-aarch64-linux-gnu.so— ~190 MB_protoc_compiler.cpython-311-aarch64-linux-gnu.so— ~91 MBStripping these with
--strip-unneededsignificantly reduces the PMON container image size with zero impact on runtime behavior.How I verified it
The
strip --strip-unneededcommand only removes non-essential symbols (debug info, unused exports). The gRPC Python modules continue to function identically after stripping — this is the same technique used by standard Linux package builds (dh_strip).Which release branch to backport
202411Fixes: #25300