[R-sig-hpc] parallel and "nicing" on Windows
Russell Pierce
russell.s.pierce at gmail.com
Mon Jun 22 01:27:05 CEST 2015
Maybe you'd already looked this far, but if not, there is almost always a
hackish way to interact with other bits of the system via system/system2
and the right external utility. So, what I offer is not entirely in R, but
it uses what R does easily expose. Specifically, Sys.getpid() in base will
give you the pid of the current session. From there you can use system or
system2 to issue a command to change the priority, e.g.
system(paste0('wmic process where ProcessId=',Sys.getpid(),' CALL
setpriority "Idle"'))
Best,
Russell
On Fri, Jun 19, 2015 at 6:03 AM <r-sig-hpc-request at r-project.org> wrote:
> Send R-sig-hpc mailing list submissions to
> r-sig-hpc at r-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
> or, via email, send a message with subject or body 'help' to
> r-sig-hpc-request at r-project.org
>
> You can reach the person managing the list at
> r-sig-hpc-owner at r-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of R-sig-hpc digest..."
>
>
> Today's Topics:
>
> 1. parallel and "nicing" on Windows (Jonathan Greenberg)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 18 Jun 2015 16:20:28 +0000
> From: Jonathan Greenberg <jgrn at illinois.edu>
> To: "r-sig-hpc at r-project.org" <r-sig-hpc at r-project.org>
> Subject: [R-sig-hpc]
> Message-ID:
> <
> CABG0rfvrRtfmQ7aVBPoJdfyUG6u+fiPRynd5f6yNWCRAvk7iVA at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> R-sig-hpc'ers:
>
> We recently ran into an issue on our Windows application server where a
> researcher spawned more workers than cores via parallel backend + a foreach
> job, and, of course, this made the server more or less unusable to anyone
> else while they were running. We were able to solve this by manually
> changing the priority on the spawned processes to low priority, but this
> brought up a question -- is there a way to set the spawned processes to low
> priority on Windows (or renice them on linux/pc) from within R? Ideally
> this would be when the parallel cluster is launched. Thoughts?
>
> --j
>
> [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
>
> ------------------------------
>
> End of R-sig-hpc Digest, Vol 78, Issue 3
> ****************************************
>
[[alternative HTML version deleted]]
More information about the R-sig-hpc
mailing list