-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests parallelizes with all available CPU cores #56
Comments
away from my machine so will have to dig in later. Yes, one test does use
future.apply to check parallel reads, but doesn’t set the number of cores.
Some tests may be using duckdb now, which is threaded by default. Do you
have a writeup on your rant? You are familiar with ‘nice’ or containers /
linux jails to control cpu use? Usually I find ram is the issue on shared
machines…
…---
Carl Boettiger
http://carlboettiger.info/
On Thu, Dec 21, 2023 at 1:18 PM Henrik Bengtsson ***@***.***> wrote:
When running revdep checks on *future*, I noticed that the unit tests of
*arkdb* end up spawning N parallel processes, where N = all CPU cores on
the machine. For example, here is what I observe when I run on a host with
48 cores;
Screenshot.from.2023-12-21.13-09-09.png (view on web)
<https://github.com/ropensci/arkdb/assets/1616850/4885374c-13a5-4e3d-a751-5187eb64d359>
Here's what I managed to grab using pstree:
|-sh /wynton/home/cbi/shared/software/CBI/_rocky8/R-4.3.2-gcc10/lib64/R/bin/Rcmd check arkdb_0.0.16.tar.gz --no-manual -o /wynton/home/cbi/hb/repositories/future/revdep/checks/arkdb/old
| `-R --no-restore --no-echo --args nextArgarkdb_0.0.16.tar.gznextArg--no-manualnextArg-onextArg/wynton/home/cbi/hb/repositories/future/revdep/checks/arkdb/old | |-sh -c LANGUAGE=en _R_CHECK_INTERNALS2_=1 '/wynton/home/cbi/shared/software/CBI/_rocky8/R-4.3.2-gcc10/lib64/R/bin/R' --vanilla --no-echo < '/scratch/hb/RtmpNYi9Br/file2a35234b2e24d0' | | `-R --vanilla --no-echo
| | `-sh /wynton/home/cbi/shared/software/CBI/_rocky8/R-4.3.2-gcc10/lib64/R/bin/Rcmd BATCH --vanilla testthat.R testthat.Rout | | `-R -f testthat.R --restore --save --no-readline --vanilla
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | |-{R}
| | `-{R} | `-{R}
You probably know my rant by now, but this behavior is problematic when
running on compute systems shared with others. I'm using more CPU resources
than I'm allowed to/requested. I am also risking overusing the CPUs, e.g.
running *revdepcheck*, I am actually ending up running two such instances
at the same time.
Do you know where this N = all CPU cores parallelization comes from? I
know that you depend on *future.apply*, but the Futureverse should
respect the R CMD check --as-cran limitation, i.e. availableCores()
returns at most 2 (two).
—
Reply to this email directly, view it on GitHub
<#56>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABWK6RIG4TDF2OAERGHULDYKSRTDAVCNFSM6AAAAABA666EO2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2TGMBXGAZTGNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hello.
It could be that testthat somehow circumvents
Ah, that could be it. From the
Definitely; https://www.jottr.org/2022/12/05/avoid-detectcores/
Yes; I can technically, protect others against this, and eventually our system will get cgroups2 protection others against this too. That would only protect others from overuse, but I would still overuse, resulting in lost of context switching, and more so the more CPU cores there are. And, in the bigger picture, this won't help anyone else out there. My blog post gives most of my arguments. |
thanks, I agree with all your points that are specific to anyway, thanks for opening an issue and for all you do for the R community! |
When running revdep checks on future, I noticed that the unit tests of arkdb end up spawning N parallel processes, where N = all CPU cores on the machine. For example, here is what I observe when I run on a host with 48 cores;
Here's what I managed to grab using
pstree
:You probably know my rant by now, but this behavior is problematic when running on compute systems shared with others. I'm using more CPU resources than I'm allowed to/requested. I am also risking overusing the CPUs, e.g. running revdepcheck, I am actually ending up running two such instances at the same time.
Do you know where this
N = all CPU cores
parallelization comes from? I know that you depend on future.apply, but the Futureverse should respect theR CMD check --as-cran
limitation, i.e.availableCores()
returns at most 2 (two).The text was updated successfully, but these errors were encountered: