I have had Machine Learning Service installed on SQL Server to be able to run R scripts (called from Stored Procedures).
There are now several of these Stored Procedures as part of a script to populate date into Power BI. Because we run these stored procedures from Power BI Service refresh, it appears that they are running in parallel and consuming large amounts of CPU whilst they run. This is slowing down the server for other (more critical) processes. In Task Manager there are often as many as 10 instances of RTerm.exe running at the same time when the refresh is invoked.
When a single one of these stored procedures is run, sometimes one instance, but often multiple instances of RTerm.exe start running on the server.
Is there a way to limit ML Services / R so that it has access to only a proportion of the CPUs or resources available and we can ensure that it does not consume more resources than a prescribed maximum? Are there any other strategies that people have deployed to resolve this issue?