shatteredsilicon / ssm-submodules

GNU Affero General Public License v3.0
0 stars 2 forks source link

Investigate possibilities for reducing binary size and memory usage of ssm-client (and possibly other) binaries #232

Open gordan-bobic opened 4 months ago

gordan-bobic commented 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"