Terminal Server slows down

4 min


I have 2 Terminal Servers Windows Server 2008 R2 on my farm, 25-30 people are actively working on each of them. They are engaged in normal office work: creating and editing documents in Microsoft Office 2010, working with mail in Microsoft Outlook 2010, surfing the Internet, working with 1C: Enterprise 8.3 and other office trifles. They are supported by 2 sufficiently powerful servers with two Xeon on each side, 32 GB of RAM, a RAID SAS controller with 10k and 15k disks.

Until the number of users approached 30 on each server, there were no tangible inhibitions that interfered with normal operation. When they came to this figure, the servers began to significantly slow down, annoying users. Braking expressed in the delays of the usual operations of editing, creating, moving files, navigating folders. Everything seems to work, but somehow slowly, annoying, sometimes the picture freezes for 1-2-3 seconds, then the work continues.

We carry out tests

Began to understand what was the matter. First of all, I thought about the disk subsystem, which simply could not cope with the load. To verify this, opened the “Performance” snap-in, added the “ Average Disk Length Queue/sec ”counter, an instance of “_Total” And began to follow. My confirmation was correct. The average value was around 2-4, which is bad. Brakes begin to be felt at values from 1.5 and above.

Recommendations on the Internet suggest that, with a value above 1, the disk subsystem does not cope with the load and something needs to be done to increase performance. In my case, improving performance means buying new, fairly expensive server SSDs, as now there are expensive and fast SAS drives with a rotation speed of 15k.

I decided to do some more testing. I chose the same counter, but I took 2 logical disks separately as an instance. Here I was in for a surprise. It turns out that the load was not on all disks, but only on the logical system partition C: where the operating system is installed. All user data is stored on disk D:, the load on it was in the range of 0.2-0.5. I originally assumed the opposite. I thought that the section with user data is loaded, where multi-gigabyte PST files of Outlook are stored, which are constantly loaded during the work of the mail client.

It is worth talking about the raid levels that I used. Now it became clear that I was breaking the disks incorrectly, expecting an increased load on the partitions with user data. System Windows Server 2008 R2 installed on a RAID-1 array consisting of two disks. User data is on aRAID-5 consisting of 4 disks. What I was guided by when I crashed disks in this way, now I don’t remember, but this is clearly wrong. I think it was necessary to make one common RAID-10 or RAID-6 partition, split it into 2 logical ones, and place the system separately from user data. Thus, there would be a more uniform load on all disks.

We reduce the load on the hard disk

The main task was to reduce the load on the system disk. First of all, transferred the paging file from the system disk to the user partition. This did not help much since there is enough RAM, the use of the paging file was minimal. I began to look with the help of the resource monitor, what loads the most disk subsystem.

It turned out that browsers, in my case Internet Explorer and Google Chrome, and specifically, their caches. Began to think about how to move the cache. With Chrome everything turned out to be simple. For him, there are ADM files for managing settings through windows domain group policies. You can download them here ” https://support.google.com/chrome/a/answer/187202?hl=en “.

Directory For User Data

Next, we create a new policy, add an ADM template, find the setting “ Specify a directory for user data ”, set the value to “D: \ $ {user_name} \ Application Data \ Chrome”. After applying this setting, the user profile from the C drive will be moved to the specified path. In the same place, in the settings, we indicate the maximum size of the cache folder: “ Set disk cache in bytes ” equal to 50 MB, set the value in bytes to “52428800”.

With Internet Explorer, everything was more complicated. I could not find the setting in the group policy that allows you to move the Temporary Internet Files folder to another location. There was an option to use a roaming profile, but I did not want to get involved with this for the sake of such a task. I found one setting that partially could help me in my question: “Empty Temporary Internet Files folder when the browser is closed”.

Turned it on so that the temporary Internet files are automatically cleared when you close the browser. Although I have configured in the GPO moving folders ( Folder Redirection ) «the AppData (Roaming folder)» to a different drive, the system is not a part of the settings still are not transferred and remains on the system drive, including the folder Temporary Internet Files.

Internet Explorer

These settings reduced the load on the system partition. Further, it was decided to abandon the server antivirus Kaspersky, the need for which has disappeared. Earlier, I configured Applocker on terminals to prevent arbitrary executables from running. Users could run only a strictly limited set of programs, so they would not be able to start up if they wanted to. Disabling antivirus has reduced the load.

Observing further the load on the disk, I noticed that the Zabbix monitoring system agent log is constantly being written to the file. It turned out that after installation, during debugging, I indicated the maximum level of logging, which led to the continuous recording of all sorts of information in the log. This created a decent load on the disk since there was a lot of recorded information per second. Turned off the logs, since the system has long been configured and debugged, there is no need for logs.

After all my actions, the disk load has decreased to acceptable values of an average queue length of 1-1.5. Users felt an improvement in speed, so the issue of the upgrade was postponed for some time. Rather, it is necessary to completely replace the server, rather than individual drives.

Like it? Share with your friends!

What's Your Reaction?

cute cute
lol lol
love love
scary scary
hate hate
geeky geeky
omg omg

Hello Guys, Here we write about ultimate guides about content management system (CMS) and other software such as WordPress, Joomla, Drupal, Oxwall, Skadate, Prestashop, Magento, CSS, HTML, Linux, CentOS, Ubuntu, Windows, macOS, Android, iOS, iPadOS, etc...


Your email address will not be published. Required fields are marked *

nine − five =