Memory lock in windows

Lock pages in memory

Applies to

Describes the best practices, location, values, policy management, and security considerations for the Lock pages in memory security policy setting.

Reference

This policy setting determines which accounts can use a process to keep data in physical memory, which prevents the computer from paging the data to virtual memory on a disk.

Normally, an application running on Windows can negotiate for more physical memory, and in response to the request, the application begins to move the data from RAM (such as the data cache) to a disk. When the pageable memory is moved to a disk, more RAM is free for the operating system to use.

Enabling this policy setting for a specific account (a user account or a process account for an application) prevents paging of the data. Thereby, the amount of memory that Windows can reclaim under pressure is limited. This could lead to performance degradation.

Note:В В By configuring this policy setting, the performance of the Windows operating system will differ depending on if applications are running on 32-bit or 64-bit systems, and if they are virtualized images. Performance will also differ between earlier and later versions of the Windows operating system.

Possible values

  • User-defined list of accounts
  • Not defined

Best practices

Best practices are dependent on the platform architecture and the applications running on those platforms.

Location

Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment

Default values

The following table lists the actual and effective default policy values for the most recent supported versions of Windows. Default values are also listed on the policy’s property page.

Server type or GPO Default value
Default Domain Policy Not defined
Default Domain Controller Policy Not defined
Stand-Alone Server Default Settings Not defined
Domain Controller Effective Default Settings Not defined
Member Server Effective Default Settings Not defined
Client Computer Effective Default Settings Not defined

Policy management

This section describes features, tools, and guidance to help you manage this policy.

A restart of the computer is not required for this policy setting to be effective.

Any change to the user rights assignment for an account becomes effective the next time the owner of the account logs on.

Group Policy

Settings are applied in the following order through a Group Policy Object (GPO), which will overwrite settings on the local computer at the next Group Policy update:

  1. Local policy settings
  2. Site policy settings
  3. Domain policy settings
  4. OU policy settings

When a local setting is greyed out, it indicates that a GPO currently controls that setting.

Security considerations

This section describes how an attacker might exploit a feature or its configuration, how to implement the countermeasure, and the possible negative consequences of countermeasure implementation.

Vulnerability

Users with the Lock pages in memory user right could assign physical memory to several processes, which could leave little or no RAM for other processes and result in a denial-of-service condition.

Countermeasure

Do not assign the Lock pages in memory user right to any accounts.

Potential impact

None. Not defined is the default configuration.

Вики IT-KB

Пошаговые руководства, шпаргалки, полезные ссылки.

Инструменты пользователя

Инструменты сайта

Боковая панель

Право блокировки страниц в памяти (Lock pages in memory)

Для учётной записи, от имени которой будет выполняться служба экземпляра SQL Server, рекомендуется установить разрешение, дающее возможность блокировки страниц в памяти (Lock pages in memory). Это позволит сократить количество обращений к виртуальной памяти на диске в случае нехватки ресурсов, отдавая приоритет работе в закрепленных страницах оперативной памяти.

В консоли Local Security Policy (secpol.msc) перейдём в раздел Local Policies > User Rights Assignment, найдём и настроим политику Lock pages in memory

В нашем примере право Lock pages in memory выдано учётной записи gMSA KOM\s-MS01$ , от имени которой будет выполниться основная служба экземпляра SQL Server Database Engine.

Внимание!
Если сервер 1С:Предприятие 8.3 планируется использовать на одной системе с SQL Server, то от данной настройки лучше воздержаться, чтобы SQL Server не отнимал чрезмерное количество ресурсов у системы и не мешал работе сервера 1С:Предприятие.

Дополнительные источники информации:

Проверено на следующих конфигурациях:

Версия ОС Версия SQL Server
Microsoft Windows Server 2012 R2 Standard EN (6.3.9600) Microsoft SQL Server 2016 SP2 CU4 (13.0.5233.0)

Автор первичной редакции:
Алексей Максимов
Время публикации: 12.02.2019 11:01

Enable the Lock Pages in Memory Option (Windows)

Applies to: SQL Server (all supported versions)

This Windows policy determines which accounts can use a process to keep data in physical memory, preventing the system from paging the data to virtual memory on disk.

Locking pages in memory may boost performance when paging memory to disk is expected.

Use the Windows Group Policy tool (gpedit.msc) to enable this policy for the account used by SQL Server. You must be a system administrator to change this policy.

To enable the lock pages in memory option

On the Start menu, click Run. In the Open box, type gpedit.msc.

On the Local Group Policy Editor console, expand Computer Configuration, and then expand Windows Settings.

Expand Security Settings, and then expand Local Policies.

Select the User Rights Assignment folder.

The policies will be displayed in the details pane.

In the pane, double-click Lock pages in memory.

In the Local Security Setting — Lock pages in memory dialog box, click Add User or Group.

In the Select Users, Service Accounts, or Groups dialog box, select the SQL Server Service account.

Restart the SQL Server Service for this setting to take effect.

Включение параметра «Блокировка страниц в памяти» (Windows) Enable the Lock Pages in Memory Option (Windows)

Применимо к: Applies to: SQL Server SQL Server (все поддерживаемые версии) SQL Server SQL Server (all supported versions) Применимо к: Applies to: SQL Server SQL Server (все поддерживаемые версии) SQL Server SQL Server (all supported versions)

Эта политика Windows определяет, какие учетные записи могут использовать процесс для сохранения данных в физической памяти, чтобы система не отправляла страницы данных в виртуальную память на диске. This Windows policy determines which accounts can use a process to keep data in physical memory, preventing the system from paging the data to virtual memory on disk.

Блокировка страниц в памяти может повысить производительность, если требуется подкачка памяти на диск. Locking pages in memory may boost performance when paging memory to disk is expected.

Для включения этой политики для учетной записи, используемой SQL Server SQL Server , воспользуйтесь средством «Групповая политика Windows» (gpedit.msc). Use the Windows Group Policy tool (gpedit.msc) to enable this policy for the account used by SQL Server SQL Server . Чтобы изменить эту политику, необходимо быть системным администратором. You must be a system administrator to change this policy.

Включение параметра «Блокировка страниц в памяти» To enable the lock pages in memory option

В меню Пуск выберите команду Выполнить. On the Start menu, click Run. В окне Открыть введите gpedit.msc. In the Open box, type gpedit.msc.

В консоли Редактор локальных групповых политик разверните узел Конфигурация компьютера, затем узел Конфигурация Windows. On the Local Group Policy Editor console, expand Computer Configuration, and then expand Windows Settings.

Разверните узлы Настройки безопасностии Локальные политики. Expand Security Settings, and then expand Local Policies.

Выберите папку Назначение прав пользователя . Select the User Rights Assignment folder.

Политики будут показаны на панели подробностей. The policies will be displayed in the details pane.

На этой панели дважды щелкните параметр Блокировка страниц в памяти. In the pane, double-click Lock pages in memory.

В диалоговом окне Параметр локальной безопасности — блокировка страниц в памяти щелкните Добавить пользователя или группу. In the Local Security Setting — Lock pages in memory dialog box, click Add User or Group.

В диалоговом окне Выбор пользователей, учетных записей служб или групп выберите учетную запись службы SQL Server. In the Select Users, Service Accounts, or Groups dialog box, select the SQL Server Service account.

Чтобы этот параметр вступил в силу, перезапустите службу SQL Server. Restart the SQL Server Service for this setting to take effect.

Блокировка страниц в памяти Lock pages in memory

Область применения Applies to

В этой статье описываются лучшие методики, расположение, значения, **** управление политиками и вопросы безопасности для страниц блокировки в параметре политики безопасности памяти. Describes the best practices, location, values, policy management, and security considerations for the Lock pages in memory security policy setting.

Справочные материалы Reference

Этот параметр политики определяет, какие учетные записи могут использовать процесс хранения данных в физической памяти, что не позволяет компьютеру разгона данных в виртуальную память на диске. This policy setting determines which accounts can use a process to keep data in physical memory, which prevents the computer from paging the data to virtual memory on a disk.

Как правило, приложение, запущенные в Windows, может согласовывать объем физической памяти, а в ответ на запрос приложение начинает перемещать данные из ОЗУ (например, кэша данных) на диск. Normally, an application running on Windows can negotiate for more physical memory, and in response to the request, the application begins to move the data from RAM (such as the data cache) to a disk. При перемещении на диск памяти, доступной для страниц, операционная система не будет использовать больше ОЗУ. When the pageable memory is moved to a disk, more RAM is free for the operating system to use.

Включение этого параметра политики для определенной учетной записи (учетной записи пользователя или учетной записи процесса для приложения) предотвращает разбавку данных. Enabling this policy setting for a specific account (a user account or a process account for an application) prevents paging of the data. Таким образом, объем памяти, который Windows может освободить под нагрузкой, ограничен. Thereby, the amount of memory that Windows can reclaim under pressure is limited. Это может привести к снижению производительности. This could lead to performance degradation.

Примечание. При настройке этого параметра политики производительность операционной системы Windows будет отличаться в зависимости от того, работают ли приложения в 32- или 64-битных системах и являются ли они виртуализированными образами. Note: By configuring this policy setting, the performance of the Windows operating system will differ depending on if applications are running on 32-bit or 64-bit systems, and if they are virtualized images. Производительность также будет отличаться в более ранних и более поздних версиях операционной системы Windows. Performance will also differ between earlier and later versions of the Windows operating system.

Константа: SeLockMemoryPrivilege Constant: SeLockMemoryPrivilege

Возможные значения Possible values

  • Определяемый пользователей список учетных записей User-defined list of accounts
  • Не определено Not defined

Рекомендации Best practices

Лучшие методики зависят от архитектуры платформы и приложений, работающих на этих платформах. Best practices are dependent on the platform architecture and the applications running on those platforms.

Location Location

Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment

Значения по умолчанию Default values

В следующей таблице перечислены фактические и эффективные значения политики по умолчанию для последних поддерживаемых версий Windows. The following table lists the actual and effective default policy values for the most recent supported versions of Windows. Значения по умолчанию также можно найти на странице свойств политики. Default values are also listed on the policy’s property page.

Тип сервера или объект групповой политики Server type or GPO Значение по умолчанию Default value
Default Domain Policy Default Domain Policy Не определено Not defined
Политика контроллера домена по умолчанию Default Domain Controller Policy Не определено Not defined
Параметры по умолчанию для автономного сервера Stand-Alone Server Default Settings Не определено Not defined
Действующие параметры по умолчанию для контроллера домена Domain Controller Effective Default Settings Не определено Not defined
Действующие параметры по умолчанию для рядового сервера Member Server Effective Default Settings Не определено Not defined
Действующие параметры по умолчанию для клиентского компьютера Client Computer Effective Default Settings Не определено Not defined

Управление политикой Policy management

В этом разделе описаны компоненты, средства и рекомендации, которые помогут в управлении этой политикой. This section describes features, tools, and guidance to help you manage this policy.

Для активации этого параметра политики не требуется перезагрузка компьютера. A restart of the computer is not required for this policy setting to be effective.

Изменения прав пользователя вступают в силу при его следующем входе в учетную запись. Any change to the user rights assignment for an account becomes effective the next time the owner of the account logs on.

Групповая политика Group Policy

Параметры применяются в следующем порядке с помощью объекта групповой политики (GPO), который будет перезаписывать параметры на локальном компьютере при следующем обновлении групповой политики: Settings are applied in the following order through a Group Policy Object (GPO), which will overwrite settings on the local computer at the next Group Policy update:

  1. Параметры локальной политики Local policy settings
  2. Параметры политики сайта Site policy settings
  3. Параметры политики домена Domain policy settings
  4. Параметры политики подразделения OU policy settings

Если локальный параметр затеняется, это означает, что в настоящее время этот параметр контролируется GPO. When a local setting is greyed out, it indicates that a GPO currently controls that setting.

Вопросы безопасности Security considerations

В этом разделе описывается, каким образом злоумышленник может использовать компонент или его конфигурацию, как реализовать меры противодействия, а также рассматриваются возможные отрицательные последствия их реализации. This section describes how an attacker might exploit a feature or its configuration, how to implement the countermeasure, and the possible negative consequences of countermeasure implementation.

Уязвимость Vulnerability

Пользователи со **** страницами блокировки в правой части памяти могут назначать физическую память нескольким процессам, что может привести к потере ОЗУ для других процессов или к отказу в обслуживании. Users with the Lock pages in memory user right could assign physical memory to several processes, which could leave little or no RAM for other processes and result in a denial-of-service condition.

Противодействие Countermeasure

Не назначать страницы блокировки в памяти пользователям каких-либо учетных записей. Do not assign the Lock pages in memory user right to any accounts.

Возможное влияние Potential impact

Нет. None. Конфигурация по умолчанию не определена. Not defined is the default configuration.

Читайте также:  Включение файла подкачки windows
Оцените статью