Skip to content

Commit b8db1a2

Browse files
committed
Bringing even with master.
2 parents 0dfe82e + cc0cd47 commit b8db1a2

23 files changed

Lines changed: 481 additions & 502 deletions

docs/advanced-analytics/TOC.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,11 @@
153153
### [Advanced configuration options for Machine Learning Services](r/configure-and-manage-advanced-analytics-extensions.md)
154154
### [Security considerations for the R runtime in SQL Server](r/security-considerations-for-the-r-runtime-in-sql-server.md)
155155
### [Modify the user account pool for SQL Server Machine Learning Services](r/modify-the-user-account-pool-for-sql-server-r-services.md)
156-
### [Configure and manage machine learning extensions](r/configure-and-manage-advanced-analytics-extensions.md)
157156

158157
### [Deploy and consume models using web services](operationalization-with-mrsdeploy.md)
159158
### [Managing and monitoring machine learning solutions](r/managing-and-monitoring-r-solutions.md)
160159
### [Resource governance for Machine Learning Services](r/resource-governance-for-r-services.md)
161-
### [Create a resource pool for R](r/how-to-create-a-resource-pool-for-r.md)
160+
### [Create a resource pool for machine learning](r/how-to-create-a-resource-pool-for-r.md)
162161
### [Extended events for Machine Learning Services](r/extended-events-for-sql-server-r-services.md)
163162

164163
### [DMVs for Machine Learning Services](r/dmvs-for-sql-server-r-services.md)
@@ -180,7 +179,7 @@
180179
### [Add R to an existing Azure virtual machine](r/installing-sql-server-r-services-on-an-azure-virtual-machine.md)
181180
### [Use sqlBindR.exe to upgrade an instance](r/use-sqlbindr-exe-to-upgrade-an-instance-of-sql-server.md)
182181
### [Install R Server from the command line](r/install-microsoft-r-server-from-the-command-line.md)
183-
### [Provision the Data Science Virtual Machine](r/provision-the-r-server-only-sql-server-2016-enterprise-vm-on-azure.md)
182+
### [Provision an enterprise data science virtual machine](r/provision-the-r-server-only-sql-server-2016-enterprise-vm-on-azure.md)
184183
### [Set up data science tools](r/setup-or-configure-r-tools.md)
185184
### [Set Up a data science client](r/set-up-a-data-science-client.md)
186185

docs/advanced-analytics/r/configure-and-manage-advanced-analytics-extensions.md

Lines changed: 51 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
title: "Advanced Configuration Options for Machine Learning Services | Microsoft Docs"
33
ms.custom:
44
- "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"
79
ms.reviewer: ""
810
ms.suite: ""
911
ms.technology:
@@ -17,80 +19,88 @@ ms.author: "jeannt"
1719
manager: "jhubbard"
1820
ms.workload: "Inactive"
1921
---
20-
# Advanced Configuration Options for Machine Learning Services
22+
# Advanced configuration options for Machine Learning Services
2123

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.
2325

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
2527

26-
## <a name="bkmk_Provisioning"></a> Provision User Accounts for Machine Learning
28+
## <a name="bkmk_Provisioning"></a> Provision additional user accounts for machine learning
2729

2830
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:
2931

3032
+ Reduces privileges of the external script runtime processes on the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] computer
3133
+ Provides isolation between sessions of an external runtime such as R or Python.
3234

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.
3436

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).
3638

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.
3840

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.
4042

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.
4244

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 user account pool. To change this limit, an administrator should use SQL Server Configuration Manager.
4446

45-
## <a name="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).
4648

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+
## <a name="bkmk_ManagingMemory"></a> Manage memory used by external script processes
4850

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.
5052

51-
## <a name="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.
5254

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).
5456

55-
`<instance path>\binn\rlauncher.config`
5657

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+
## <a name="bkmk_Launchpad"></a>Modify the Launchpad service account
5859

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.
6061

61-
```
62-
C:\>Notepad.exe "%programfiles%\Microsoft SQL Server\MSSQL13.MSSQLSERVER\mssql\binn\rlauncher.config"
63-
```
62+
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.
6463

65-
## <a name="bkmk_properties"></a> Edit Configuration Properties
64+
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:
6665

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)
67+
+ Bypass traverse checking (SeChangeNotifyPrivilege)
68+
+ Log on as a service (SeServiceLogonRight)
69+
+ Replace a process-level token (SeAssignPrimaryTokenPrivilege)
6870

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).
7072

71-
Default: TRACE_LEVEL=4
73+
## <a name="bkmk_ChangingConfig"></a> Change advanced service options
7274

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.
7376

74-
|**Setting name**|**Value type**|**Default**|**Description**|
75-
|------------------|----------------|-------------|-----------------|
76-
|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.
7878

79-
## <a name="bkmk_Launchpad"></a>Modify the Launchpad Service Account
79+
**To modify Launchpad configuration**
8080

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**.
8283

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.
8485

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.
8687

87-
+ Adjust memory quotas for a process (SeIncreaseQuotaPrivilege)
88-
+ Bypass traverse checking (SeChangeNotifyPrivilege)
89-
+ Log on as a service (SeServiceLogonRight)
90-
+ Replace a process-level token (SeAssignPrimaryTokenPrivilege)
9188

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`.
93103

94104
## See Also
95105

96-
[Security Considerations](security-considerations-for-the-r-runtime-in-sql-server.md)
106+
[Security considerations](security-considerations-for-the-r-runtime-in-sql-server.md)

0 commit comments

Comments
 (0)