You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced-analytics/r/configure-and-manage-advanced-analytics-extensions.md
+51-41Lines changed: 51 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,10 @@
2
2
title: "Advanced Configuration Options for Machine Learning Services | Microsoft Docs"
3
3
ms.custom:
4
4
- "SQL2016_New_Updated"
5
-
ms.date: "11/01/2016"
6
-
ms.prod: "sql-server-2016"
5
+
ms.date: "10/31/2017"
6
+
ms.prod:
7
+
- "sql-server-2016"
8
+
- "sql-server-2017"
7
9
ms.reviewer: ""
8
10
ms.suite: ""
9
11
ms.technology:
@@ -17,80 +19,88 @@ ms.author: "jeannt"
17
19
manager: "jhubbard"
18
20
ms.workload: "Inactive"
19
21
---
20
-
# Advanced Configuration Options for Machine Learning Services
22
+
# Advanced configuration options for Machine Learning Services
21
23
22
-
This article describes changes that you can make after setup, to modify the configuration of the R runtime and other services associated with machine learning in SQL Server.
24
+
This article describes changes that you can make after setup, to modify the configuration of the external script runtime and other services associated with machine learning in SQL Server.
23
25
24
-
Applies to: SQL Server 2016 R Services, SQL Server 2017 Machine Learning Services
26
+
**Applies to:** SQL Server 2016 R Services, SQL Server 2017 Machine Learning Services
25
27
26
-
## <aname="bkmk_Provisioning"></a> Provision User Accounts for Machine Learning
28
+
## <aname="bkmk_Provisioning"></a> Provision additional user accounts for machine learning
27
29
28
30
External script processes in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] run in the context of low-privilege local user accounts. Running these processes in individual low-privilege accounts has the following benefits:
29
31
30
32
+ Reduces privileges of the external script runtime processes on the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] computer
31
33
+ Provides isolation between sessions of an external runtime such as R or Python.
32
34
33
-
As part of setup, a new Windows *user account pool* is created that contains the local user accounts required for running the R runtime process. You can modify the number of users if needed to support R. Your database administrator must also give this group permission to connect to any instance where R Services has been enabled. For more information, see [Modify the User Account Pool for SQL Server R Services](../../advanced-analytics/r/modify-the-user-account-pool-for-sql-server-r-services.md).
35
+
As part of setup, a new Windows *user account pool* is created that contains the local user accounts required for running external runtime processes, such as R or Python. You can modify the number of users as needed to support machine learning tasks.
34
36
35
-
However, an access control list (ACL) can be defined for sensitive resources on the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to deny access to this group to prevent the R runtime process from getting access to the resources.
37
+
Additionally, your database administrator must give this group permission to connect to any instance where machine learning has been enabled. For more information, see [Modify the user account pool for SQL Server Machine Learning Services](../../advanced-analytics/r/modify-the-user-account-pool-for-sql-server-r-services.md).
36
38
37
-
+ The user account pool is linked to a specific instance. For each instance on which R script has been enabled, a separate pool of worker accounts are created. Accounts cannot be shared between instances.
39
+
To protext sensitive resources on the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], you can define an access control list (ACL) for this group. By specifying resources that the group is denied access to, you can prevent access by external processes such as the R or Python runtimes.
38
40
39
-
+User account names in the pool are of the format SQLInstanceName*nn*. For example, if you are using the default instance as your R server, the user account pool supports account names such as MSSQLSERVER01, MSSQLSERVER02, and so forth.
41
+
+The user account pool is linked to a specific instance. A separate pool of worker accounts is needed for each instance on which machine learning has been enabled. Accounts cannot be shared between instances.
40
42
41
-
+The size of the user account pool is static and the default value is 20. The number of R runtime sessions that can be launched simultaneously is limited by the size of this user account pool. However, this limit can be changed by an administrator by using SQL Server Configuration Manager.
43
+
+User account names in the pool are of the format SQLInstanceName*nn*. For example, if you are using the default instance for machine learning, the user account pool supports account names such as MSSQLSERVER01, MSSQLSERVER02, and so forth.
42
44
43
-
For more information about how to make changes to the user account pool, see [Modify the User Account Pool for SQL Server R Services](../../advanced-analytics/r/modify-the-user-account-pool-for-sql-server-r-services.md).
45
+
+ The size of the user account pool is static and the default value is 20. The number of external runtime sessions that can be launched simultaneously is limited by the size of this useraccountpool. To change this limit, an administrator should use SQL Server Configuration Manager.
44
46
45
-
## <aname="bkmk_ManagingMemory"></a> Manage Memory Used by External Script Processes
47
+
For more information about how to make changes to the user account pool, see [Modify the user account pool for SQL Server Machine Learning Services](../../advanced-analytics/r/modify-the-user-account-pool-for-sql-server-r-services.md).
46
48
47
-
By default, the R runtime processes associated with [!INCLUDE[rsql_productname](../../includes/rsql-productname-md.md)] are limited to using no more than 20% of total machine memory. However, this limit can be increased by the administrator, if needed.
49
+
## <aname="bkmk_ManagingMemory"></a> Manage memory used by external script processes
48
50
49
-
Generally, this amount will be inadequate for serious R tasks such as training model or predicting on many rows of data. You might need to reduce the amount of memory reserved for [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] (or for other services) and use Resource Governor to define an external resource pool or pools and allocate. For more information, see [Resource Governance for R](../../advanced-analytics/r/resource-governance-for-r-services.md).
51
+
By default, the external script runtimes for machine learning are limited to no more than 20% of total machine memory. It depends on your system, but in general, you might find this limit inadequate for serious machine learning tasks such as training a model or predicting on many rows of data.
50
52
51
-
## <aname="bkmk_ChangingConfig"></a> Change Advanced Service Options using the Configuration File
53
+
To support machine learning, an administrator can increase this limit. When you do so, you might need to reduce the amount of memory reserved for [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] or for other services. You should also consider using Resource Governor to define an external resource pool or pools, so that you can allocate specific resource pools to R or Python jobs.
52
54
53
-
You can control some advanced properties of [!INCLUDE[rsql_productname](../../includes/rsql-productname-md.md)] by editing the [!INCLUDE[rsql_productname](../../includes/rsql-productname-md.md)] configuration file. This file is created during [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] setup and by default is saved as a plain text file in the following location:
55
+
For more information, see [Resource governance for machine learning](../../advanced-analytics/r/resource-governance-for-r-services.md).
54
56
55
-
`<instance path>\binn\rlauncher.config`
56
57
57
-
You must be an administrator on the computer that is running [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to make changes to this file. If you edit the file, we recommend that you make a backup copy before saving changes.
58
+
## <aname="bkmk_Launchpad"></a>Modify the Launchpad service account
58
59
59
-
For example, to use Notepad to open the configuration file for the default instance, you would open a command prompt as administrator, and type the following command:
60
+
A separate [!INCLUDE[rsql_launchpad_md](../../includes/rsql-launchpad-md.md)] service is created for each instance on which you have configured the machine learning services.
By default, the Launchpad is configured to run using the account, NT Service\MSSQLLaunchpad, which is provisioned with all necessary permissions to run R scripts. However, if you change this account, the Launchpad might not be able to start or to access the SQL Server instance where external scripts should be run.
If you modify the service account, be sure to use the **Local Security Policy** application and update the permissions on each service account to include these permissions:
66
65
67
-
The following table lists each of the settings supported for [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)], with the permissible values.
66
+
+ Adjust memory quotas for a process (SeIncreaseQuotaPrivilege)
+ Replace a process-level token (SeAssignPrimaryTokenPrivilege)
68
70
69
-
All settings take the form of a key-value pair, with each setting on a separate line. For example, this property specifies the trace level for RLauncher:
71
+
For more information about permissions required to run SQL Server services, see [Configure Windows Service Accounts and Permissions](https://msdn.microsoft.com/library/ms143504.aspx#Windows).
70
72
71
-
Default: TRACE_LEVEL=4
73
+
## <aname="bkmk_ChangingConfig"></a> Change advanced service options
72
74
75
+
In early versions of SQL Server 2016 R Services, you could change some properties of the service by editing the [!INCLUDE[rsql_productname](../../includes/rsql-productname-md.md)] configuration file.
|JOB_CLEANUP_ON_EXIT|Integer<br /><br /> 0 = Disabled<br /><br /> 1 = Enabled|1<br /><br /> Log files are removed on exit|Specifies whether the temporary working folder created for each R session should be cleaned up after the R session is completed. This setting is useful for debugging.<br /><br /> Note: This is an internal setting only – do not change this value.|
77
-
|TRACE_LEVEL|Integer<br /><br /> 1 = Error<br /><br /> 2 = Performance<br /><br /> 3 = Warning<br /><br /> 4 = Information|1<br /><br /> Output warnings only|Configures the trace verbosity level of the R launcher (MSSQLLAUNCHPAD) for debugging purposes. This setting affects the verbosity of the traces stored in the following trace files, both of which are located in the path specified by the LOG_DIRECTORY setting:<br /><br /> **rlauncher.log**: The trace file generated for R sessions launched by T-SQL queries.<br /><br /> |
77
+
However, this file is no longer used for changing configurations. We recommend that you use SQL Server Configuration Manager to effect changes to service configuration, such as the service account and number of users.
78
78
79
-
## <aname="bkmk_Launchpad"></a>Modify the Launchpad Service Account
79
+
**To modify Launchpad configuration**
80
80
81
-
A separate [!INCLUDE[rsql_launchpad_md](../../includes/rsql-launchpad-md.md)] service is created for each instance on which you have configured the machine learning services.
81
+
1. Open [SQL Server Configuration Manager](../../relational-databases/sql-server-configuration-manager.md).
82
+
2. Right-click SQL Server Launchpad and select **Properties**.
82
83
83
-
By default, the Launchpad is configured to run using the account, NT Service\MSSQLLaunchpad, which is provisioned with all necessary permissions to run R scripts. However, if you change this account, the Launchpad might not be able to start or to access the SQL Server instance where external scripts should be run.
84
+
+ To change the service account, click the **Log On** tab.
84
85
85
-
If you modify the service account, be sure to use the **Local Security Policy**application and update the permissions on each service account to include these permissions:
86
+
+ To increase the number of users, click the **Advanced**tab.
86
87
87
-
+ Adjust memory quotas for a process (SeIncreaseQuotaPrivilege)
+ Replace a process-level token (SeAssignPrimaryTokenPrivilege)
91
88
92
-
For more information about permissions required to run SQL Server services, see [Configure Windows Service Accounts and Permissions](https://msdn.microsoft.com/library/ms143504.aspx#Windows).
89
+
**To modify debug settings**
90
+
91
+
A few properties can only be changed by using the Launchpad's configuration file, which might be useful in limited cases, such as debugging. The configuration file is created during [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] setup and by default is saved as a plain text file in the following location: `<instance path>\binn\rlauncher.config`
92
+
93
+
You must be an administrator on the computer that is running [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to make changes to this file. If you edit the file, we recommend that you make a backup copy before saving changes.
94
+
95
+
The following table lists the advanced settings for [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)], with the permissible values.
96
+
97
+
|**Setting name**|**Type**|**Description**|
98
+
|----|----|----|
99
+
|JOB\_CLEANUP\_ON\_EXIT|Integer |This is an internal setting only – do not change this value. </br></br>Specifies whether the temporary working folder created for each external runtime session should be cleaned up after the session is completed. This setting is useful for debugging. </br></br>Supported values are **0** (Disabled) or **1** (Enabled). </br></br>The default is 1, meaning log files are removed on exit.|
100
+
|TRACE\_LEVEL|Integer |Configures the trace verbosity level of MSSQLLAUNCHPAD for debugging purposes. This affects trace files in the path specified by the LOG_DIRECTORY setting. </br></br>Supported values are: **1** (Error), **2** (Performance), **3** (Warning), **4** (Information). </br></br>The default is 1, meaning output warnings only.|
101
+
102
+
All settings take the form of a key-value pair, with each setting on a separate line. For example, to change the trace level, you would add the line `Default: TRACE_LEVEL=4`.
0 commit comments