Open gordan-bobic opened 4 months ago
Stumbled across this recently because node_exporter uses 16MB of RAM, which is huge for some small systems. https://github.com/xaionaro/documentation/blob/master/golang/reduce-binary-size.md
Not interested in anything that could increase the memory usage (like upx), but on all the platforms we produce ssm-client for, there will already be libc anyway. So GCCGo and TinyGo could both be options.
Things to investigate:
go build -ldflags "-w -s"
go build -compiler gccgo -gccgoflags "-s -w"
Stumbled across this recently because node_exporter uses 16MB of RAM, which is huge for some small systems. https://github.com/xaionaro/documentation/blob/master/golang/reduce-binary-size.md
Not interested in anything that could increase the memory usage (like upx), but on all the platforms we produce ssm-client for, there will already be libc anyway. So GCCGo and TinyGo could both be options.
Things to investigate: