Showing posts with label Performance. Show all posts
Showing posts with label Performance. Show all posts

Thursday, 13 May 2021

Linux System is using to much swap memory

A value from 0 to 100 which controls the degree to which the system favors anonymous memory or the page cache. A high value improves file-system performance, while aggressively swapping less active processes out of physical memory. A low value avoids swapping processes out of memory, which usually decreases latency, at the cost of I/O performance.

The default is normally 60 in Linux but devices running custom Linux builds may change the value.

  1. Check / Note the default setting
    1. SSH in to the unit and switch to root
    2. run "cat /proc/sys/vm/swappiness"
  2. Lower the value, I normally set it to 10, but 0 would shut the swap process down, 100 would make it swap all the time.
    1. run "echo 10 > /proc/sys/vm/swappiness"
    2. run "swapoff -a"
    3. run "swapon -a"
Retest performance of the unit,  sometimes the swapoff will fail as they is not enough memory to offload the swap data too.  You will need to free up memory or reboot.  Just bear in mind that the command at this time is none permanent and rebooting will switch it back to default.

This is good in case the change kills the device, rebooting will bring it back to normal.  Once you are happy its fixed the issue / runs better you can do two things expand the RAM or make the charge permanent.

Friday, 5 March 2021

Windows 2019 Remote Desktop Start menu stops working

 This one has driven me crazy over the last year or so as different things appear to break it and different fixes appear to resolve it.

  • Windows server has missed a few updates
    • Every fix should start with updating, unless an update broke the system then skip this part

  • Windows Firewall as too many rules
    • Each time user logs in to the server a few rules are added to the firewall but over time this can lead to thousands of rules being made,  this was fixed in Windows 2016 but it appears that 2019 needs a reg key enabling to sort it.

      Also you will need to clean out all the old rules,  quickest way is too open the "Windows Defender Firewall with Advanced Security", right click on "Windows Defender Firewall with Advanced Security on Local Computer" and select Restore default policy

      This will reset the polices but you had an custom polices these will not be gone and need to be remade.  still quicker then trying to delete bad ones with the system locking up all the time.

      Only Forward: Remote Desktop Host firewall is filled with multiple firewall rules (only-forward.net)

  • Firewall Reg Keys that need removing and remaking
    • Open Powershell as admin
    • Type the Following:
      • Remove-Item "HKLM:\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\RestrictedServices\Configurable\System"
      • New-Item "HKLM:\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\RestrictedServices\Configurable\System"
      • Remove-Item "HKLM:\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\RestrictedServices\AppIso\FirewallRules"
      • New-Item "HKLM:\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\RestrictedServices\AppIso\FirewallRules"
  • Corruption in the Universal Windows Platform applications
    • I think its the explorer app that gets damaged but am not 100% on that.

      run the following in an PowerShell(admin) console

      1. sfc /scannow
      2. dism /online /cleanup-image /scanhealth
      3. dism /online /cleanup-image /restorehealth

      Now if point 3 ends with an error like it can not find the source to resolve the issue,  you can use a donor system to pull the files from but its got to be working and updated to the same level (ish,  I have had success with a outdated 2019 as a donor to an updated 2019 but mileage may vary here it could break more then it fixes)

      4. Dism /Online /Cleanup-Image /RestoreHealth /source:\\<DEVICE>\C$\Windows\WinSxS /limitaccess
      5. Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

      Now point 3 and 4 can be swapped with using the install media if you have it available but I have never tested it this way as I have never had it to hand but the command is

      Dism /Online /Cleanup-Image /RestoreHealth /source:wim:D:\\sources\install.wim:1 /limitaccess
      (on the install.wim:1 the :1 is the version of the OS you are using, like core / Desktop / Data Center / Standard)

Wednesday, 2 December 2020

Windows Server Performance issues - Power options

 This is a little basic, but when looking at server performance make sure that the Power options are set to High Performance

This has a impact on the system and can help with some low level performance issues.  all servers guest and hosts.

Can be done via group policy Computer > Administrative Templates > System> Power Management > Select An Active Power Plan

Tuesday, 1 December 2020

Search Service Tuning on a Remote Desktop Services (RDS) Server GPO Settings

 Recommended GPO Settings

These GPO settings can be updated to turn down the indexing while allowing the Outlook’s instant search feature to function.

  • Windows Components/Search
  • Allow indexing of encrypted files, Disabled
  • Prevent adding UNC locations to index from Control Panel, Enabled
  • Prevent adding user-specified locations to the All Locations menu, Enabled
  • Prevent automatically adding shared folders to the index, Enabled
  • Prevent indexing e-mail attachments, Enabled
  • Prevent indexing of certain file types, Enabled
  • Prevent indexing public folders, Enabled
  • Enable Throttling for online mail indexing, 6 items per minute (maximum is 120 per minute)
  • Prevent indexing certain paths:
    file:///C:\*
    outlookexpress://{*}/*
    otfs://{*}/*
    mapi://{*}/*
    mapi15://{*}/*
    ONEINDEX15://{*}/*
    iehistory://{*}/

Copied for Keep sake from

Thursday, 19 November 2020

Windows Assessment and Deployment Kit (Windows ADK)

Windows Assessment and Deployment Kit (Windows ADK) is a great tool for helping you see performance issues with signing in and booting up a system.

I have used it for Remote Desktop hosts to see where the processing is getting tied up.

Just need to download the right version from


When you are installing make sure you select the "Windows Performance Toolkit"

when its finished opened cmd as Administrator and type the following

xperf -on PROC_THREAD+LOADER+INTERRUPT+DPC+PROFILE+DISK_IO+HARD_FAULTS+DRIVERS+NETWORKTRACE+ALL_FAULTS -stackwalk profile -SetProfInt 1221

Then get the user to log in or log off depending on what your monitoring and once its finished switch back to the user that ran the above command and type

xperf -d <filename>.etl

This information was found on