Copilot is your AI companion
Always by your side, ready to support you whenever and wherever you need it.
Performance Tuning Guidelines for Windows Server 2012 R2
Important! Selecting a language below will dynamically change the complete page content to that language.
-
File Name:
PerfTuningGuideServer2012R2.pdf
When you run a server system in your organization, you might have business needs that are not met by using the default settings. For example, you might need the lowest possible energy consumption, or the lowest possible latency, or the maximum possible throughput on your server. This topic provides a set of guidelines that you can use to tune the server settings in Windows Server 2012 R2 and obtain incremental performance or energy efficiency gains, especially when the nature of the workload varies little over time.
-
Supported Operating Systems
Windows Server 2012 R2
To view this download, you need to use a PDF Viewer.
-
- To start the download, click the Download button, and then do one of the following:
- To start the download immediately, click Open.
- To copy the download to your computer for viewing at a later time, click Save.
- To cancel the download, click Cancel.
-
An impression many people get is that servers are static and inviolable. They are computers that are orders of magnitude more powerful than your typical desktop, and as such, they rarely if ever experience issues. Problems might be blamed on “the servers” when they have nothing to do with your actual server infrastructure.
The reality is that servers are just big computers, often running specialized software. They can have all of the same sorts of issues that regular computers do, except they tend to be more regimented in their operation. They don’t have a user installing browser toolbars or opening sketchy emails, but they can still be infected with malware just like any other machine.
More importantly, they can have just as many hardware and software issues as any other machine. A server running Windows Server 2012 R2 can have a wide range of configuration problems, settings that hinder performance, and even simple memory leak problems. Likewise, their RAM is still RAM, their hard drives are still hard drives, and their processors are still processors. A fault in any of those components can lead to all manner of problems.
Below, we’ve compiled a list of potential problems you can check for so that you can troubleshoot a slow server. Before you dig in, though, we recommend backing up your data and configurations. Note down any changes you make and when, so you can diagnose if those changes cause problems down the line. And, of course, don’t change anything you don’t have the authority to change; if you need to talk to your IT staff, do that instead.
Switch to High-Performance Power
Power plans for servers dynamically scale the clock speed of the processors to meet the needs of the server at any given time. When load changes, this can cause slow performance and delays as the server adjusts. By changing to a high-performance power plan, you can guarantee the processors run at 100% at all times, so all resources are ready and available when needed.
You can set the power plan per-device as a local machine policy, or for all of your servers as part of a group policy. Either way, the option is found in the local computer policy menu under power options.
Disable DOS 8.3 Short File Names
Short File Names for DOS 8.3 is a backwards compatibility feature. If you don’t require support for legacy equipment or short names, you can disable this compatibility option to speed up file indexing and creation.
In the command prompt, type fsutil 8dot3name query followed by your volume designation, such as D: – this will show you whether or not you have this option enabled. If it’s enabled, and you’ve confirmed you don’t need it, you can disable it by typing fsutil 8dot3name set d: 1, where d: is your volume name again. You can also strip existing names from compatible files, though doing so might not affect performance.
Check for CPU or RAM Consuming Processes
Every Windows computer, whether it’s a server or a PC, has a task manager. Your task manager shows, among other things, all of the processes running on your machine. Along with the process name, it can show additional information, including the RAM and CPU usage that process is consuming at any given time.
A common cause of a slow Windows Server 2012 R2 installation is a process that is consuming exceptionally large amounts of resources. To check this, open up your task manager the usual way, such as with CTRL-SHIFT-ESC or by right-clicking the taskbar and choosing task manager from the menu.
First, check the bottom of the window. Under CPU usage and Physical Memory, there are percentages. Are either of those options maxed out at 100% or otherwise higher than you expect them to be? If so, you may have a problem. Check the Processes tab and sort it by CPU usage or by memory usage, to see which processes are taking up so many resources.
When you identify a problem process, you can investigate what it is and determine if it can be killed and restarted, if it’s malicious software, or what the problem may be. If necessary, contact the employee responsible for the offending application.
You may also want to check the tasks on your virtual machines (if you’re running any). If one of your VMs is maxing out on CPU or memory, and if you’ve configured them to use a flexible amount of processing power, they may be sapping a lot of your server’s resources.
Scan for Malware
Servers are just as vulnerable to malware as personal computers. If they’re accessible to the internet, roving malware can find its access point. If it’s on a network, any infected device on that network could spread malware to it. You will want to have some form of antivirus protection on your server. Usually, Windows Defender is good, but in some cases, you may need something more powerful as an enterprise-grade solution.
If you notice any odd processes consuming resources, or odd behavior, or signs of malware, scan for it. You should also routinely scan, as well as keeping active protection engaged at all times. Avoid making exceptions for individual users or applications, as these can be exploited. Also, keep in mind that some malware is insidious and difficult to spot. Not everything is an obvious piece of ransomware – the truth is, the worst viruses are the ones that are perfectly invisible.
Check Network Speeds
It’s also possible that the cause of slow server speeds has nothing to do with the server itself, and everything to do with the connection used to access it.
There are a lot of different ways in which a server can slow down due to a poor connection.
- Check to make sure all relevant cords are plugged in tight.
- Check any relevant cables to make sure they’re modern, high-speed cables.
- Check with the user reporting problems to make sure they aren’t having personal speed issues.
- Check with the ISP to see if they are having uptime or connection issues.
- Check your network controller to make sure its hardware and software are up to date.
In some cases, you’ll be chasing down reported “slow server speeds” when the actual problem is an issue with the user’s VPN or their ISP. It can also be an issue with DNS. In fact, DNS issues are so common and so varied that many IT workers default to checking for DNS issues before looking elsewhere.
Update Relevant Drivers
If you don’t perform regular maintenance on your servers, it’s possible that you may have an issue that would normally be solved with an update you have not applied. Software issues are common, but you may also consider updating drivers for the hardware in your machine. Driver updates are often overlooked until they cause a problem, but it can be difficult to identify when a problem is caused by a driver issue.
The most relevant drivers to update are typically network card drivers, but graphics and other drivers can cause problems as well.
Before updating any driver, check to make sure the server can be temporarily decommissioned, or that you’re within a designated maintenance window. Driver updates often require a restarted machine, and you don’t want to take down a critical part of your business during operations for a driver update.
Check for Signs of Attack
As mentioned above, servers can be vulnerable to both malware and malicious attack from an outside source. If your server is accessible at all from the internet, it can be subject to attack, even when the way to access it is hidden. There are scripts and bots that exist solely to try every possible IP address in sequence just to see what’s on the other end. Obscurity is not security.
Attacks come and go. A lone bot spamming login attempts can slow down your server as it has to process those attempts. This is why implementing a lockout policy is always a good idea. You may have to deal with unlocking accounts from users who frequently forget their passwords, but it’s better than allowing bots to hammer at your system until they get in.
Additionally, DDoS attacks can eat up server resources and slow down an entire machine. Check network activity and look for unusual spikes or anything that might max out resources. There are many ways to protect a server against a DDoS attack, but it depends on the kind of attack. If you identify an attack, you can investigate further.
Disable SMB Packet Signing
Server Message Block Packet Signing is a security measure used in Windows servers. Each packet of information passed between a server and a user or back is digitally signed to verify its authenticity. This helps prevent malicious users or devices from inserting themselves in the middle to scrape data or otherwise alter messages.
Unfortunately, in some cases, SMB packet signing can slow down a server, particularly with large file transfers. This is because each packet needs to be signed and authenticated, and this process takes time. Often, it can time out mid-operation as well, further delaying the transfer of a file.
You can check to see if this might be an issue by attempting to transfer a large file and watching the graph of progress. If it’s flat and smooth, this isn’t a problem. If it has abrupt peaks and valleys, time-outs may be the problem.
You can disable packet signing in the security settings for your group policy. Be aware, however, that packet signing is a security measure. Only disable it if you have other security measures in place to prevent man in the middle attacks. A bit more performance isn’t worth a compromised network, after all.
Run SFC /Scannow
Over time and with use, a hard drive – particularly spinning platter drives, though SSDs can have issues as well – degrades. This degradation can result in corrupted blocks of storage, which may or may not be otherwise occupied. Servers can run into issues if system files or other infrequently-accessed files are corrupted, making certain processes error or time out. Sometimes this results in hard-locks or system crashes, and other times it simply causes a time-out or other process failure.
One way to check for such errors is to use the System File Checker. Running SFC with /Scannow will perform a full system scan looking for filesystem errors or corrupted system files. If it finds any, it will offer you the option to repair them, which should help resolve the issue.
Review Hardware for Faults
If your system file scan found faults, you might have a drive that is on the verge of failure. If this is the case, you should consider scanning the entire disc to look for other faults, and repair them. Then, you should swap out the drive. If your drives are properly mirrored, you should be able to hot-swap an individual drive without causing issues. Do not, however, yank a drive if you don’t know that it’s safe to do so. It’s much more common to have a system that needs to be taken down for maintenance and the hardware swapped.
Reference the Performance Tuning Guide
There are approximately a million different settings within the overall Windows Server 2012 R2 system that can be tweaked to improve performance. Often times, the standard settings out of the box are good enough, but in some situations they are no longer adequate. You can tweak and tune these settings to improve the overall performance of your system.
We’re not going to reproduce the entire tuning guide here, because it’s 181 pages long. You can find the full guide in PDF form here.
Consider a Migration to a Cloud Platform
Tweaking and dealing with system issues is a core part of running an on-premises server infrastructure. If you’re continually having issues with them, particularly if those issues are related to hardware limitations, updates, or maintenance, you might benefit from migrating your system to the cloud. We’ve talked extensively about when a cloud system is right for a business, and we’d be more than happy to discuss the entire premise with you if you give us a call.
Contact an Expert for Remote Assistance
If basic troubleshooting hasn’t identified the issue for you, and you don’t want to transfer to a cloud system, it might be worthwhile to contact a company like us to do a remote overview of your system.
Remote assistance can diagnose a lot of potential issues with your server, and we can both offer assistance with fixing them and with managing the servers moving forward. Again, feel free to contact us for more information.
About The Author
Herman
Herman is the lead team member here at Computertech.com. He’s been in IT for over 20 years and has expertise in our various IT Services including Microsoft Azure, Microsoft 365, Microsoft Teams and even Computer Security.
No related posts.
The purpose of this blog post is to provide a list of commonly applied optimizations for Citrix environments and provide assistance with their implementation through a script – yes, you read that correctly, a SCRIPT
For those of you who are familiar with the original blog post, we decided to make some minor updates to the original list and script and make the script compatible with Windows 8.1 and Windows Server 2012.
Although not every setting may apply to every use case, most of these settings should apply to Windows 8/8.1 and Server 2012/2012 R2 virtual machines running on XenDesktop 7.x
This blog is divided into four sections: service settings, computer settings, user settings and an awesome script.
Service Settings
The following services are recommended to be evaluated for being set to disabled:
- Application Layer Gateway Service
- Background Intelligent Transfer Service
- BitLocker Drive Encryption Service
- Block Level Backup Engine Service
- Bluetooth Support Service
- Computer Browser
- Device Association Service
- Device Setup Manager Service
- Diagnostic Policy Service
- Distributed Link Tracking Client
- Family Safety
- Fax
- Function Discovery Resource Publication
- HomeGroup Listener
- HomeGroup Provider
- Microsoft Software Shadow Copy Provider
- Offline Files
- Optimize Drives
- Secure Socket Tunneling Protocol Service
- Security Center
- Sensor Monitoring Service
- Shell Hardware Detection
- SNMP Trap Service
- SSDP Discovery
- Superfetch
- Telephony
- UPnP Device Host
- Volume Shadow Copy
- Windows Backup
- Windows Color System
- Windows Connect Now – Config Registrar
- Windows Defender Service
- Windows Error Reporting Service
- Windows Media Player Network Sharing Service
- Windows Update
- WLAN AutoConfig
- WWAN AutoConfig
The following services are recommended to be evaluated for being set to auto:
- Network List Service
Computer Settings
Below are the recommended baseline computer settings and optimizations:
- Configure Event Logs to 1028KB and set retention to “overwrite”
- Configure processor resources for best performance of “Programs”
- Configure Visual Effects for “best performance”
- Disable automatic updates of drivers from Windows Updates
- Disable boot log and boot animation
- Disable Data Execution Prevention
- Disable default system screensaver
- Disable hard disk timeouts
- Disable hibernation
- Disable Internet Explorer First Run Wizard and RSS Feeds
- Disable Internet Explorer Enhanced Security
- Disable Machine Account Password Changes
- Disable New Network dialog
- Disable NTFS Last Access Timestamps
- Disable System Restore
- Disable TCP/IP / Large Send Offload
- Disable the ability to clear the paging file during shutdown
- Disable UAC secure desktop prompt
- Disable Background Layout Service
- Disable CIFS Change Notifications
- Increase Disk I/O Timeout to 200 seconds
- Increase service startup timeouts
- Set Popup Error Mode to “Neither”
- Set Power Saving Scheme to “High Performance”
- Set Recovery Dump to “Small”
- Turn off Windows Slide Show and install NetFX3
Disable the following Scheduled Tasks:
- AitAgent
- AnalyzeSystem
- AutoWake
- BfeOnServiceStartTypeChange
- BthSQM
- ConfigNotification
- Consolidated
- DiskDiagnosticDatacollector
- DiskDiagnosticResolver
- FamilySafetyMonitor
- FamilySafetyRefresh
- GadgetManager
- HotStart
- KernelCeipTask
- MobilityManager
- ProgramDataUpdater
- Proxy
- RacTask
- RegIdleBackup
- ResolutionHost
- Scheduled
- SessionAgent
- StartupAppTask
- SystemDataProviders
- UninstallDeviceTask
- UpdateLibrary
- Uploader
- UpnPHostConfig
- UsbCeip
- Windows Filtering
- WinSAT
User Settings
Below are the recommended user settings for Windows 8/8.1 and Server 2012 in XenDesktop 7 environments:
- Disable Action Center
- Disable cursor blink
- Disable Internet Explorer persistent cache
- Disable screensaver
- Force off-screen composition in Internet Explorer
- Reduce menu show delay to 150 milliseconds
Note: User Settings when applied within a profile are done only for that user. In order for the User –based policies to apply to all users, the modified user profile must either replace the Default User Profile, information on this process is available here. Optionally, the profile can be deployed as a template profile through a Profile Management solution such as Citrix Profile Management.
Recommended Hotfix
Another thing worthy of mentioning is that we highly recommend applying the July, 2013 Hotfix Rollup from Microsoft. This fixes a memory leak issue in Windows 8 and Server 2012 which eventually causes the server to exhaust its resources and slow down to a crawl.
The Awesome Script
And now for the part that you likely scrolled all the way down to get to… the awesome script that does all of the above for you. The file “Windows8and2012VDIBaseline.vbs” which can be downloaded here is a VBS script that will perform the optimizations highlighted within this blog in an automated fashion. This script is intended to be run on your “Golden Image” (aka. Base image) which is used to create MCS clones or PVS streams.
Note: After running the script, a reboot is needed in order for the script registries to apply properly. As with any script, we highly encourage understanding what the script does prior to running it. Whitehat nor the authors are liable for any issues that come as a result of running this script so please make sure to make backups of your registry and Virtual Machine or VHD file prior to running the script, just in case something goes wrong
Special thanks to Jonathan Bennett (AutoITScript) for creating a wonderful optimizer tool and to Jeff Stokes (MSFT) for creating the original baseline script for Windows 7 that we leveraged as a base for the script provided above.
For additional information on XenDesktop 7, please reference Citrix eDocs. For optimizations that apply to Windows 7 machines, please review the Windows 7 Optimization Guide for Desktop Virtualization Citrix White Paper.
Until next time
Feel free to leave comments below regarding these optimizations, feedback on the script or any other recommendations that we might have missed so that we can update them accordingly. The optimizations and script are a continual work in progress so feedback is greatly appreciated!
-Pablo & Steven
Pablo Legorreta, Principal Enterprise Architect, Whitehat Virtual
Steven Krueger, Sales Engineer, Citrix Systems
Началось, всё с того, что потребовалось закинуть 3 бухгалтеров на один терминальный сервер. В будущем планировалось подключать удаленные точки, поэтому выбрал именно этот вариант с терминалом. Одна база 1С, весом в 1Гб, 3 пользователя работающие по локальной сети, что может быть проще. А не тут то было, связка 1C Бухгалтерия 8.3 и windows server 2012 R2 тормозила так, что бухгалтера отказывались работать.
Начну по порядку:
Виртуальный сервер с windows server 2012 R2.
Процессор Intel core i7, 3.6 Ghz
Памяти 10Gb.
Обычный жесткий диск — WD Caviar Black 1Tb.
Да, полноценным сервером назвать это трудно, но кто не хочет сэкономить в наше время?!
Установил 2012R2, настроил службу удаленных рабочих столов, создал пользователей, поставил 1C, закинул базу. Запускаю… и понимаю, что не может программа грузиться 20 секунд, когда на обычном компе с core i3 грузится в трое быстрее.
- Первым что испробовал, перенес всю виртуальную машину на SSD диск (и базу соответственно, тоже) скорость загрузки от этого не улучшилась.
- По многочисленным советам на форумах пробовал отключать в 1С Бухгалтерия регламентные задания и полнотекстовый поиск. Результат ни как не повлиял на скорость работы и загрузки.
- Начал грешить на тонкости самой виртуальной машины Hyper-V, установил 1С на физический сервер, перекинул лицензию на клиента. Запускаю и все тормоза 1с 8.3 остаются на прежнем месте.
После проделывания вышеперечисленных записей, понимаю что server 2012 R2 сам тормозит работу 1С и чтобы окончательно убедиться в этом, установил 1с 8.3 на windows server 2008R2 (благо имеется такой на стороне). Запускается в миг, база летает, всё как надо.
На выходных запасаюсь образом 2008R2, чаем и терпением. Пока пил чай и читал новинки операционной системы 2012 R2, натыкаюсь на удивительную вещицу: DFSS.
Dynamic Fair Share Scheduling — позволяет балансировать и распределять ресурсы CPU между пользователями.
Решение
Открываем PowerShell и запускаем команду:
(gwmi win32_terminalservicesetting -N «root\cimv2\terminalservices»).enabledfss
1 — включено, 0 — выключено.
У меня выдает значение 0, т.к. DFSS уже отключено.
После чего открываем реестр windows (regedit) и меняем в следующих ветках некоторые значения:
1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Quota System параметр EnableCpuQuota на 0.
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TSFairShare\Diskпараметр EnableFairShare на 0.
Перезагружаем сервер и радуемся быстрой работой 1С и win server 2012R2.
Источник: http://blogmax.ru/blog/10-windows-server-2012r2-i-1s-8-3-medlennaya-rabota.html
- Jan 22, 2018
- /
-
Scripts, Windows Server, XenApp/XenDesktop
Windows Server 2012 R2 Optimisation Script.
Tested on: Windows Server 2012 R2 build 9600.
Description: This script disables services, disables scheduled tasks and modifies the registry to optimise system performance on Windows Server 2012 R2 running in a Citrix SBC environment.
Note: This script makes changes to the system registry and performs other configuration changes. As such a full backup of the machine or snapshot if running in a virtual environment is strongly recommended. Carry out full testing before introducing the optimised image to production. You should review ALL optimisations this script makes and determine if they fit in to your environment. Not all optimisations will suit all environemnts. To avoid failure, run PowerShell as an administrator before running this script.
Download (click below):
Windows Server 2012 R2 Optimisation Script (6413 downloads )
Any problems with the script or if you want to make your own improvement suggestions then comment below.
Open the script using a text editor or PowerShell ISE to see what exactly the script does.
