Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ParallelTestRunner"
uuid = "d3525ed8-44d0-4b2c-a655-542cee43accc"
version = "2.8.1"
version = "2.8.2"
authors = ["Valentin Churavy <v.churavy@gmail.com>"]

[deps]
Expand Down
19 changes: 17 additions & 2 deletions src/ParallelTestRunner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,27 @@ worker_id(wrkr::PTRWorker) = wrkr.id
Malt.isrunning(wrkr::PTRWorker) = Malt.isrunning(wrkr.w)
Malt.stop(wrkr::PTRWorker) = Malt.stop(wrkr.w)

#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
# 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. Apple's memory
# management makes setting this value more complicated than it should
function get_max_worker_rss()
mb = if haskey(ENV, "JULIA_TEST_MAXRSS_MB")
parse(Int, ENV["JULIA_TEST_MAXRSS_MB"])
elseif Sys.WORD_SIZE == 64
Sys.total_memory() > 8*Int64(2)^30 ? 3800 : 3000
totalmem = Sys.total_memory()
if Sys.isapple()
if totalmem <= 8*Int64(2)^30
2000
elseif totalmem <= 16*Int64(2)^30
2500
else
3800
end
elseif totalmem > 8*Int64(2)^30
3800
else # Low memory not on macOS
3000
end
else
# Assume that we only have 3.5GB available to a single process, and that a single
# test can take up to 2GB of RSS. This means that we should instruct the test
Expand Down