Ensure sanity generate projects doesnt eat all available cpu
diff --git a/tools/buildgen/generate_projects.py b/tools/buildgen/generate_projects.py
index 083a978..965dd29 100755
--- a/tools/buildgen/generate_projects.py
+++ b/tools/buildgen/generate_projects.py
@@ -47,6 +47,7 @@
 argp = argparse.ArgumentParser()
 argp.add_argument('json', nargs='+')
 argp.add_argument('--templates', nargs='+', default=[])
+argp.add_argument('--jobs', '-j', default=multiprocessing.cpu_count(), type=int)
 args = argp.parse_args()
 
 json = args.json
@@ -87,7 +88,7 @@
     cmd.append(root + '/' + f)
     jobs.append(jobset.JobSpec(cmd, shortname=out, timeout_seconds=None))
 
-jobset.run(jobs, maxjobs=multiprocessing.cpu_count())
+jobset.run(jobs, maxjobs=args.jobs)
 
 if test is not None:
   for s, g in test.iteritems():
diff --git a/tools/run_tests/sanity_tests.yaml b/tools/run_tests/sanity_tests.yaml
index 160acde..757bcd9 100644
--- a/tools/run_tests/sanity_tests.yaml
+++ b/tools/run_tests/sanity_tests.yaml
@@ -2,8 +2,8 @@
 - script: tools/run_tests/check_sources_and_headers.py
 - script: tools/run_tests/check_submodules.sh
 - script: tools/run_tests/check_cache_mk.sh
-- script: tools/buildgen/generate_projects.sh
-  cpu_cost: 100
+- script: tools/buildgen/generate_projects.sh -j 3
+  cpu_cost: 3
 - script: tools/distrib/check_copyright.py
 - script: tools/distrib/clang_format_code.sh
 - script: tools/distrib/check_trailing_newlines.sh