File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,18 @@ else
118118 end
119119end
120120
121+ # Always set the max rss so that if tests add large global variables (which they do) we don't make the GC's life too hard
122+ if Sys. WORD_SIZE == 64
123+ const JULIA_TEST_MAXRSS_MB = 3800
124+ else
125+ # Assume that we only have 3.5GB available to a single process, and that a single
126+ # test can take up to 2GB of RSS. This means that we should instruct the test
127+ # framework to restart any worker that comes into a test set with 1.5GB of RSS.
128+ const JULIA_TEST_MAXRSS_MB = 1536
129+ end
130+
131+ const max_worker_rss = JULIA_TEST_MAXRSS_MB * 2 ^ 20
132+
121133# determine parallelism
122134if ! set_jobs
123135 jobs = Sys. CPU_THREADS
298310 p = recycle_worker (p)
299311 else
300312 print_testworker_stats (test, wrkr, resp)
313+ if resp[end ] > max_worker_rss
314+ # the worker has reached the max-rss limit, recycle it
315+ # so future tests start with a smaller working set
316+ p = recycle_worker (p)
317+ end
301318 end
302319 end
303320
You can’t perform that action at this time.
0 commit comments