windows-perf.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Tue, 17 Nov 2020 19:49:45 +0200
changeset 2462 9b3b29e0b467
parent 2461 1a943cc3f862
permissions -rw-r--r--
Allow symlink evaluation.


============================
 Tuning Windows performance
============================
.. contents::
   :local:

Disable 8.3 name support
========================

Check status in elevated shell::

  fsutil behavior query disable8dot3

Disable 8.3 names on all volumes::

  fsutil 8dot3name set 1
  fsutil behavior set disable8dot3 1

Corresponding registry leaf (1 - disable, 0 - enable)::

  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation

https://support.microsoft.com/en-us/help/121007/how-to-disable-8-3-file-name-creation-on-ntfs-partitions
  How to disable 8.3 file name creation on NTFS partitions.
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc959352(v=technet.10)
  About registry key ``NtfsDisable8dot3NameCreation``.

Disable last access time
========================

Check status in elevated shell::

  fsutil behavior query disableLastAccess

Disable last access time for all NTFS volumes (``1`` - user setting, ``3`` - system setting)::

  fsutil behavior set disableLastAccess 1
  fsutil behavior set disableLastAccess 3

Corresponding registry leaf (1 - disable as user, 3 - disable as system)::

  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisableLastAccessUpdate

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-behavior
  Docs for ``fsutil behavior``.
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc959914(v=technet.10)
  About registry key ``NtfsDisableLastAccessUpdate``.

Allow symlink evaluation
========================

Query current setting::

  fsutil behavior query SymlinkEvaluation

Registry keys::

  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
  SymlinkLocalToLocalEvaluation=dword:00000001
  SymlinkLocalToRemoteEvaluation=dword:00000001
  SymlinkRemoteToLocalEvaluation=dword:00000000
  SymlinkRemoteToRemoteEvaluation=dword:00000000

Exclude directories for Windows Defender
========================================

* Open Windows Defender Settings.
* Click "Virus & threat protection".
* Click "Virus & threat protection settings".
* Scroll down to "Exclusions" and click "Add or remove exclusions".
* Click "Add an exclusion" and select "Folder" from the drop-down menu.
* Navigate to the directory to be excluded, or paste its path into the "Folder" text-box, and click
  "Select Folder".

Same from elevated CLI::

  powershell -Command Add-MpPreference -ExclusionPath "C:\tmp"
  powershell -Command Add-MpPreference -ExclusionProcess "java.exe"
  powershell -Command Add-MpPreference -ExclusionExtension ".java"

To show and delete settings::

  powershell -Command "Get-MpPreference | Select -Expand ExclusionPath"
  powershell -Command "Get-MpPreference | Select -Expand ExclusionProcess"
  powershell -Command "Get-MpPreference | Select -Expand ExclusionExtension"

  powershell -Command Remove-MpPreference -ExclusionExtension ".java"

https://support.microsoft.com/en-us/help/4028485/windows-10-add-an-exclusion-to-windows-security
  Add an exclusion to Windows Security.
https://docs.microsoft.com/en-us/powershell/module/defender/add-mppreference
  Modifies settings for Windows Defender from PowerShell.
https://docs.microsoft.com/en-us/powershell/module/defender/remove-mppreference
  Removes exclusions or default actions.

Exclude directories Windows Search Indexing
===========================================

* Open Windows Control Panel.
* Search for "index" and choose "Indexing Options".
* Click the "Modify" button
* Under the appropriate drive letter, navigate to the folder you want to exclude, and make sure it
  is unchecked.
* Double-check your work by verifying the directory shows up in the "Exclude" column of the "Summary
  of selected locations" table.