From 5cb7366c582689201efe3c2fff5dc3c801332075 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 18 Oct 2021 09:54:11 -0700 Subject: [PATCH 1/2] Up per-product memory usage to 30 GB Reduce multiproduct_kati parallelism by upping required memory per product to 30 GB. Bug: 201671935 Test: builds Change-Id: Ia756f309459d28e22a49f190a5227a139b356a1f --- cmd/multiproduct_kati/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/multiproduct_kati/main.go b/cmd/multiproduct_kati/main.go index 3c9cac190..07b1e3fc4 100644 --- a/cmd/multiproduct_kati/main.go +++ b/cmd/multiproduct_kati/main.go @@ -301,7 +301,7 @@ func main() { jobs = runtime.NumCPU() / 4 ramGb := int(detectTotalRAM() / (1024 * 1024 * 1024)) - if ramJobs := ramGb / 25; ramGb > 0 && jobs > ramJobs { + if ramJobs := ramGb / 30; ramGb > 0 && jobs > ramJobs { jobs = ramJobs } From 93fa5ef99daf3ac3d32bdf8c0caaf21569aef34d Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 18 Oct 2021 10:19:03 -0700 Subject: [PATCH 2/2] Reduce commands per shard for java protos `m platformprotos` with a long OUT_DIR can trigger E2BIG errors in posixspawn, reduce the commands per shard. Test: OUT_DIR=$PWD/really-long-out-directory m platformprotos Change-Id: Ifa4594eac7ba0e1091df0ef75e4dfc3ff366939b --- java/proto.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/proto.go b/java/proto.go index 8731822c3..2fa22b626 100644 --- a/java/proto.go +++ b/java/proto.go @@ -24,7 +24,7 @@ import ( func genProto(ctx android.ModuleContext, protoFiles android.Paths, flags android.ProtoFlags) android.Paths { // Shard proto files into groups of 100 to avoid having to recompile all of them if one changes and to avoid // hitting command line length limits. - shards := android.ShardPaths(protoFiles, 100) + shards := android.ShardPaths(protoFiles, 50) srcJarFiles := make(android.Paths, 0, len(shards))