在Debian编译Golang时遇到内存不足,可从代码优化、编译优化、系统级调整三方面解决:
pprof
sync.Pool
-ldflags="-s -w"
-parallel
GOCACHE
fallocate
mkswap
swapon
vm.swappiness