Golang编译过程中Ubuntu资源占用是否高,取决于项目规模和系统配置:
-ldflags="-s -w"
-gcflags="-m"
建议通过top或htop命令实时监控资源使用情况,针对性优化。
top
htop