Your basic ITPro blog... What's going on at work, what I'm interested in.

Tuesday, January 28, 2014

Poor Man’s Bandwidth Throttling

I had an issue. We use AppAssure for backups. The backup jobs that AppAssure would run against our main file server were using up all of our WAN link bandwidth. We have a high-speed (200Mb) MoE link between the site with our file server and the site with our AppAssure server. Our longer backup jobs would use all 200Mb of that link, or most of it. This was causing performance issues for other services trying to use that link also.

My initial solution was to just pause my backup jobs during the time window when these other services were in need of bandwidth and performance. I would then unpause the jobs once they were finished. This kind of worked, but not really. Mainly because it was very labor intensive, with me having to manually manage the job pausing/unpausing. I needed something better.

Version 2 of my ‘solution’ was to just set the speed/duplex of the network card on my AppAssure server to 100Mb/Full. This way, the most bandwidth it could use was half of my MoE pipe. This actually works pretty well. Well, it works as expected. Of course, longer backup jobs now ran about twice as long as they did before. So, I am still not where I want to be.

Today, I implemented Version 3 of this solution. Now, I am scheduling the change of this speed/duplex setting on the network card. So, my AppAssure server is only set to 100Full during the small window that the other services are in need of the extra bandwidth. The rest of the time, AppAssure can use as much as it needs. This actually turned out to be pretty simple, once I figured it out.

These settings are kept in  the Registry. So, I had to find the key holding this configuration information for my network card. It can be found at: HKLM\System\CurrentControlSet\Control\Class\<SSID>\<number>. I went to the \Class level and did a search for my network card name. I found the key and, after a little bit of poking around, found the value that stores SpeedDuplex. I verified that when I changed my settings on the network card in the GUI, the value would change in the registry. So, I knew I had the right registry key.

From there, I just exported the key to a .reg file twice, once when the network card was set to 100Full and once when it was set to 1GBFull. I tested the .reg files by importing them back and forth and making sure that my network card settings were changing as I desired.

The next step was to create to batch files, one to set the network card to 100Full and one to set it to 1GbFull. The batch files each had three lines:

regedit /s <path to .reg file>
netsh interface set interface <interfaceName> DISABLED
netsh interface set interface <interfaceName> ENABLED

The first line imports the appropriate .reg file. The next two lines reset the network card to apply the setting. Simple.

Once I had the two .reg files and the two .bat batch files to apply my settings, I just used Task Scheduler to schedule these batch files to be run at the proper times. This allows my backups to run at full speed for most of the week, but still throttles them when my other apps need the bandwidth.

Wednesday, January 22, 2014

What Time Is It?!

We had an issue this weekend with our Checkin system. At least, that is how it initially appeared. It turned out, though to be something completely different.

Our checkin kiosks were not opening the events at the right time. After a little bit of looking around, it turned out that our server had the wrong system time. When I heard about this, I was very confused. As a member server in our AD, it should have been getting the correct time from its local DC. Indeed, it was getting its time from the DC, but the DC had the wrong time also! This is where the actual problem presented itself.

The issue was with how this particular DC was getting its time. As a VM (hosted on a Hyper-V cluster), it was set to get its time from its host server (the default for the Integration Services, I believe). So, the DC was getting its time from its host. Then the hosts, and my other servers in that AD Site, were getting their time from the DC. Each machine was feeding the other the wrong time.

The solution? Turn off “Sync Time With Hyper-V Host” in the Integration Services section of the VM’s configuration.


Then, as AD member machines, my servers started getting their time from my authoritative DC in my domain.

Additional Info

My photo
email: support (AT) mangrumtech (DOT) com
mobile: 480-270-4332