Shrinking SQL Log files in an Availability Group Cluster or Database Mirror

A very common problem that I see time and time again is the Log file growth of Microsoft SQL Server .LDF files.

This problem can cause service outages when a hard disk is filled up completely by these massive LDF files.

The problem happens when a SQL Server Database is configured for Full Recovery mode (often the Default). In Full Recovery mode, the SQL Log files (.LDF files) must be backed up themselves, in addition to backing up the SQL Database. Many people get confused and think they only have to backup the SQL Database file.

Solving the problem

Ideally, you should start backing up the SQL Log files. They are there for a reason, and full recovery mode is awesome because it allows you to restore a database to a point in time, specifically, to the point in time that you backed up the SQL database + and then the last SQL transaction log backup. So if you perform a SQL Full backup at 8pm nightly, and a SQL transaction log backup the next day at 12:00 Noon, then you can restore to any point in time up until 12:00 Noon.

If your recovery point objective (RPO) allows you to lose up to a day’s worth of data, and you are okay with restoring only to the previous night’s full backup, then by all means, change your database recovery mode to Simple and avoid the hassle of backing up the SQL Transaction logs altogether!

You might say, wait, this is all well and good, but I have a problem right now that I am trying to solve. My .LDF files have filled up my hard disk, and I need to clear them out now! First, before you proceed, it is important to understand why the logs are growing, otherwise you may find yourself having to continuously repeat this procedure. Log growth is normal when there are lots of write transactions into the database. The solution is to backup the transaction logs more frequently so that they are logically truncated, and that can prevent the physical file from growing too large.

First, find out if your database is in an Availability Group or a Database Mirror. Because your options are limited in this case. If your database is not in an AG or DM, then just switch the recovery model to simple, shrink the Log file using SQL Management Studio, then if needed, switch the recovery model back to full.  This method is the quickest, but  you lose the ability to restore to a point in time from the last full backup, so perform this at your own risk. In fact, all advice on this blog is for educational purposes, and I provide no warranty, and I assume no responsibility if you follow any of my advice. =)  If you have available disk space,  you can always backup the SQL transaction log first before performing switching the recovery model from full to simple.

Okay, so assuming you need to shrink a log file that is in an AG or DM, then the only method I have found that works is to perform the following (again, use at your own risk):

1. Identify the culprit log files by running this query in SQL Management Studio:
DBCC SQLPERF(LOGSPACE);

In my case, this showed two databases with log files > 65GB.

image

2. Next, backup the Log file to free up space within the file (logically/virtually). Ideally, if you had enough disk space, you would backup the log file to an actual file somewhere. Otherwise, if you are okay with an RPO of 24 hours (to your last full backup) then you can backup to a null device (great blog article here describing this method, please heed the disclaimers).

BACKUP LOG myDatabaseName TO DISK=’NUL:’

Note: Technically you should be able to run this command against the primary replica or the secondary replica, and the log file will be truncated in both places according to this blog article.

3. Next, verify if the log file is in a state that will allow shrinking. If your status is ‘2’ then you will need to proceed to step 4, otherwise if the Status is ‘0’ (Zero) then you can skip to step 5.

Use myDatabaseName
GO
dbcc loginfo

image

4. This step will reset the log file so that you can physically shrink it in step 5. Again, this step assumes that you are okay with a 24 hour RPO as you will only be able to restore to your last full backup.  I’ve worked with enough DBA’s that if I don’t add these disclaimers at each step then they will certainly spam the comments with ‘don’t ever do this step’ =)

DBCC SHRINKFILE (myDatabaseName_Log, EMPTYFILE);

Next, re-run step 3 (dbcc loginfo) and verify that Status is now 0 instead of 2. If it is, then proceed to step 5, otherwise re-run step 2 and 4.

5. Now that the transaction log has been backed up, and emptied, it is now possible to physically shrink the size of the log file on disk with this command:

DBCC SHRINKFILE (myDatabaseName_Log, 500);   –This would physically shrink the database size to 500 Megabytes.

Important: you can only shrink files against the primary replica. The good news is that once you shrink the primary, the physical size of the secondary replicas will shrink too, so you only need to do this in one place.

Hint: dbcc opentran shows if there are open transactions that could block the shrink operation.

Hint #2: If the log files still will not shrink, check to make sure that the secondary replica database is not marked as Suspect. In that case, you will need to manually remove the suspect database from the secondary first before the shrink operation will work.

Note: Before determining the size of 500Mb to shrink to, you may want to consider how much of the log file is in use, otherwise the shrink operation will not work. Also, you may want to consider allowing the size of the log file to be 25% of the size of the physical database file (.MDF) because otherwise when log growth happens, the database operations will block all active transactions and that will cause latency within applications (imagine users complaining).

You can determine how much of the log file is in use by running this query:

Use myDatabaseName
GO

SELECT name ,size/128.0 – CAST(FILEPROPERTY(name, ‘SpaceUsed’) AS int)/128.0 AS AvailableSpaceInMB
FROM sys.database_files;

So to determine the size of the log file to shrink to, subtract the “AvailableSpaceInMB” from the physical database size reported by the command: DBCC SQLPERF(LOGSPACE);. Then add some cushion so that future physical log growth does not block transactions from occurring.

Azure AD Federated SaaS Apps

Thanks to Aaron Smalser on the Microsoft Azure product team, I was pointed in the direction of this page that allows me to see the list of Azure AD pre-integrated apps that support SAML or WS-Federation. Thanks Aaron!http://social.technet.microsoft.com/wiki/contents/articles/20235.azure-active-directory-application-gallery-federated-saas-apps.aspx

As of this writing on 3/11/15, there are now 105 applications that support SAML or WS-Federation with Azure AD. That is double what was available on September 2nd 2014 (per Alex Simon’s blog article here). 

So out of the 2,460 total applications available in the gallery, or 2,355 that support “Password Single Sign-On” which is what I would describe as password vaulting, and 105 support federated sign-in. The latter is the most optimal experience in my opinion.

So in the 191 days between 9/2/2014 and 3/11/2015, Microsoft has added 55 new applications that support SAML or WS-Federation. That is about 1 new application every 3.5 days. That is impressive!

1    15Five
2    Abintegro
3    Adaptive Suite
4    Adobe EchoSign
5    AnswerHub
6    AppDynamics
7    ArcGIS
8    Ariett Purchase & Expense
9    Ariett Touch
10    AvePoint Meetings
11    BambooHR
12    Bime
13    BlueJeans
14    Bonusly
15    Boomi
16    Box
17    Canvas
18    Central Desktop
19    Cisco Webex
20    Citrix GoToMeeting
21    Citrix ShareFile
22    Clarizen
23    ClickTime
24    CloudBees
25    Colibri
26    Concur
27    Cornerstone OnDemand, Inc.
28    Coupa
29    Docusign
30    Dream Broker Studio
31    Dropbox for Business
32    e-Builder
33    Egnyte
34    Envoy
35    EventBuilder
36    FreshDesk
37    Freshservice
38    Gigya
39    Google Apps
40    Greenhouse
41    Huddle
42    IdeaScale
43    Infolinx
44    Innotas
45    InsideView
46    Intacct
47    ITRP
48    Jitbit Helpdesk
49    Jive
50    Kintone
51    Kontiki
52    Kudos
53    LogicMonitor
54    Lynda.com
55    Mimecast Admin Console
56    Mimecast Personal Portal
57    Mindflash
58    Mozy Enterprise
59    MyDay
60    NetDocuments
61    New Relic
62    OfficeSpace Software
63    PagerDuty
64    Panopto
65    Panorama9
66    Picturepark
67    Projectplace
68    Rally Software
69    Replicon
70    RunMyProcess
71    Salesforce
72    Salesforce Sandbox
73    Samanage
74    Sciforma
75    ScreenSteps
76    ServiceNow
77    ShiftPlanning
78    SmarterU
79    Smartsheet
80    SpringCM
81    SuccessFactors
82    SumoLogic
83    SumTotalCentral
84    Syncplicity
85    TalentLMS
86    Team Org Chart
87    TeamSeer
88    ThirdLight
89    Thoughtworks Mingle
90    ThousandEyes
91    Timestamp
92    UserVoice
93    Wikispaces
94    Work.com
95    Workday
96    http://www.insideview.com 
97    xMatters OnDemand
98    Zendesk
99    Zoho Mail
100    Zoom
101    Zscaler
102    Zscaler Beta
103    Zscaler One
104    Zscaler Two
105    Zscaler ZSCloud

Office 365 “Groups” are next generation distribution lists

 

There is a new Azure AD feature that allows you to create O365 groups through the Azure Access Panel. This feature is in Preview (Beta) but this blog post is a walkthrough of this as well as exploring the value of O365 Groups.clip_image002

You can still create groups in the OWA web Interface as well:

image

These groups are mighty powerful. Not only can they function as AD security groups (in the Cloud only as they don’t sync down to on-premises (yet), but they also function as email distribution groups and shared calendars. They also provide group chat and file sharing capabilities via a dedicated document library in SharePoint Online. You can also have shared OneNote notebooks with your group! You can also assign Azure AD applications to groups for single sign-on (more on that below).
(Note: for a great whitepaper on these capabilities, click here).

imageTe

 

To get started, you have to enable the preview functionality in your Azure AD tenant.

image

Then scroll down to Group Management and enable the group features

Note: I recommend doing this in your demo environment first so that you can evaluate the functionality before turning it on in production, especially since they are ‘preview’ features.

image

You will notice that a newly created group from the Access Panel will appear as a “Distribution Group” type.

image

clip_image006

You can edit the group properties to be able to receive email from outside the organization and you can also subscribe new members so that they are notified when new group conversations occur.

image

image

Lync Online and External Contacts

Update 3/9/2015: I just updated this article to include a previously undocumented dependency, that both Lync and Outlook must be on the same version for this to work.

Here is an interesting scenario that reveals a lot about how Lync Online operates. Let’s assume that two companies plan to merge and they want to have Instant Messaging and Presence between the two companies.

One company, ABC Corp has Lync 2010 on-premises and the other company, XYZ Corp has Lync Online. Both companies have enabled federation.

Both companies would like a shared Global Address List (GAL), and they plan to use Microsoft FIM 2010 R2 GALSync, so that user objects in one forest are copied as contact objects in the other forest.

The last requirement is to have the ability to search for the Lync external contacts within the Lync client itself.

Tips:

  1. By default GALSync does not replicate the SIP address attribute “msRTCSIP-PrimaryUserAddress”, so GALSync must be modified to include this attribute. Additionally, mailnickname and targetaddress is required for Azure Active Directory Synchronization to export the object to Office 365 so that it is accessible for the Lync Online users. For a list of which attributes are synced by DirSync, click (here).
  2. When populating the msRTCSIP-PrimaryUserAddress field, make sure to pre-pend with the sip: in front of the address.
  3. When the targetaddress field is populated, be sure to pre-pend with SMTP: in front of the email address. For more info, see this article
  4. mailNickname can be populated with the contents of sAMAccountName
  5. sAMAccountName, displayname, and CN cannot be blank.

Brajesh Panda wrote a fantastic walkthrough for modifying GALSync to include the msRTCSIP-PrimaryUserAddress attribute. However, it does not mention Lync Online. I wanted to write this blog article to add clarity on how external contacts can appear in Lync Online in a very limited scenario:

1. Outlook must be configured for cached Exchange Mode (this is the default configuration for Exchange Online).

[Update 3/9/2015] 2. Outlook and Lync must be on the same version (ex: Lync 2013 and Outlook 2013). Crossing versions is not supported and will not work (ex: Lync 2013 and Outlook 2010).

Additionally, external contact search is not available for Lync Mobile, OWA or Lync for Mac. The rest of this article explains why.

Unified Contact Store (UCS)

Lync Online is a “wave 15” product, and therefore is written to take advantage of the new Unified Contact Store (UCS).  This is significant because according to my test results, search lookups in Lync Online appear to only query the UCS, and the UCS does not include information from the Global Address List (GAL) according to this MSFT article.

image

Therefore, when Lync Online is formatting its EWS query, it appears to exclude external contacts and only include licensed Lync Online users.  This applies to the following Lync Online clients that exclusively rely on EWS for lookups: Lync Mobile, Lync for Mac OSX, and Lync presence when integrated into OWA. The only Lync client that can search and find external contacts is the Lync client for Windows when installed on a computer with Outlook configured for cached mode, with a local copy of the Offline Address Book. This is because Lync is designed to supplement the EWS query with an additional MAPI query to Outlook when Outlook is configured for cached exchange mode.

Note: When troubleshooting, remember that the OAB does not download immediately after a fresh Outlook profile is created, so it can take some time before external contacts will appear (see below for more information on how to check for this).

Goodbye Lync Address Book

Lync Online does not download a Lync address book. This is the opposite behavior of the Lync on-premises Server. Instead, Lync Online clients that want to lookup a contact will perform a web services query in two parts. The first query depends on whether an EWS connection is available and established (note: this requires the Exchange autodiscover record to be correctly configured to point to Exchange Online). Then, Lync Online is also configured to query the local Outlook via a MAPI connection to the local Outlook profile installed on the same local workstation that Lync is installed on, and it passes the query to Exchange on behalf of Lync. It is worth noting that when Outlook is configured for Online mode, then the MAPI connection that Lync makes to Outlook then uses the same EWS query against the UCS instead of the GAL (and therefore does not return external contacts). Again, cached mode is required.

Lync Online can only query external contacts in the GAL when the local Outlook client is configured for cached mode. Additionally, the SIP address of the user performing the search should match their email address otherwise the EWS and MAPI connection will fail and the user may receive authentication prompts. Also keep in mind that any updates to external contacts in the GAL will not be visible in Lync until the next time the Offline Address Book (OAB) is downloaded by the Outlook client (approximately once per day).  This can take as long as 48 hours in a worst case scenario, consider the behavior by design:

  1. Exchange Online mailbox server generates a new OAB at 5:00 AM (once every 24 hours)
  2. Exchange distributes the OAB to the CAS servers (Default distribution schedule: 480 minutes)
  3. Outlook downloads the OAB (Default update schedule: 24 hours)

This means that in the worst possible scenario, an update to the Address Book won’t become available to the user until 48 hours after the change.

Example:

Monday at 09:00 – Outlook client downloads the OAB

Monday at 14:00 – A new mailbox is created

Tuesday at 05:00 – Exchange OAB Generation runs

Tuesday at 09:00 – Outlook client checks for new OAB

Tuesday at 11:00 – OABVirtualdirectory is updated

Wednesday at 09:00 – Outlook client downloads the new updates.

 

So yes, all of the stars must align in order for the Lync client to search for external contacts. But it does work!

Here is evidence of an external contact replicating and being searchable with Lync Online:

The local contact “Jed Hill” was created in on-premises Active Directory:

image

Here is the DirSync export showing this object was copied to Lync Online

image

Next, download the Offline Address Book. You can check to see if the offline address book was downloaded by checking the timestamps in this directory:
C:\Users\(UserName)\appdata\local\microsoft\Outlook\Offline Address Books\ (long number)
Go into the subfolder and you should see several .OAB files:
image

And here is a screen shot of me searching for the external contact by first name and it returning Jed Hill. Ignore the fact that it says presence unknown, because I picked a fake SIP address for testing.

image

You can force the Outlook client to update more frequently by the methods described in this blog article here:

http://www.howto-outlook.com/howto/oabupdate.htm

Search Limitations

The limitations have already been mentioned, but to recap, external contacts will not be searchable within Lync Mobile, Lync for Mac. Also, keep in mind that when Outlook is in Online Mode, then the regular Lync client for Windows won’t be able to search for external contacts. The work-around for all these scenarios is for each user to type in the full SIP address to communicate with each external contact that is not already pinned or saved as a favorite in their Lync contact list.

IM/Presence Limitations

Here is a screen shot that shows Exchange Online OWA integration with Lync Online does not show presence or IM button for the External Contact. Whereas the full Outlook client will show the IM button when responding to an email with an external contact with a SIP address.

image

  • Lync Online users can pin up to 250 contacts to their Lync Contacts list.

  • Lync Online users each have a total of 200 concurrent presence subscriptions. Once that limit is reached, users can still send and receive instant messages and add users to a Contacts list, but they cannot see any additional presence information and will see a “Maximum Followers Reached” message when attempting to view a user’s presence

For more information on Lync Online features and limitations, see the Lync Online Services Descriptions here:
http://technet.microsoft.com/en-us/library/lync-online-instant-messaging-presence-and-contacts.aspx

References:

http://www.amintavakoli.com/2013/01/how-does-integration-between-outlook.html

http://tech.rundtomrundt.com/2011/10/forcing-lync-client-to-use-mapi.html

http://www.lync.geek.nz/2014/04/lync-2013-exchange-integration.html

http://msexchangeguru.com/2013/05/10/lync-and-exchange/

OneDrive offers unlimited cloud storage

Today Microsoft announced that OneDrive for Business customers will soon have unlimited storage (previous limit was 1TB).

Many people have pointed out that the 20,000 file limit seems to nullify the “unlimited” storage feature.

http://support.microsoft.com/kb/2933738

Due to the current single item limit of 2GB per file, the effective limitation of OneDrive is now 40TB (20,000 * 2GB = 40TB).

Since local laptop hard drives are moving towards low capacity SSDs, I am comfortable with a 40 TB cap being the same as  “virtually unlimited.’

Microsoft increased the consumer version of OneDrive single item limit from 2GB to 10GB. We hope that the business version will eventually support 10GB files too, but we do not have a date on when or if that will happen yet.  https://blog.onedrive.com/onedrive-now-supports-10-gb-files/

 

Lync Phone edition tls handshake fail with usb tethering out of box

MSFT support engineers have identified a bug with the USB tethering on Lync Phone Edition. They compared the packet traces of the PIN authentication successful TLS handshake and compared it with the failed USB tethering TLS handshake.

They observed that during PIN authentication, the Lync phone connects to the Lync server over port 80 to download the intermediary certificate whereas during USB authentication, the phone skips that step and immediately attempts to handshake on SSL 443. The problem is the handshake fails because the phone does not yet have the intermediate certificate.

Quick conceptual background: A certificate chain is commonly composed of a Root certificate, followed by an intermediate certificate, and finally the issued certificate.

So in summary, there is a bug in the Lync Phone Edition firmware that is preventing the intermediate cert download from occurring during the USB tethering.

This is why the USB tethering works successfully following the PIN authentication, because during the PIN authentication, it successfully downloads the intermediate certificate.

MSFT is going to document this issue into a Knowledge Base Article and then inform the product engineering team. There is no guarantee that the product group will fix this behavior since there is a reasonable work-around to use PIN authentication.

Another potential fix is to find a different certificate authority that may skip the intermediate authority and issue device certs directly from the root authorities that come pre-loaded on each phone as described at the bottom of (this) MS Technet article.

This is not very practical because you would first have to purchase the certificate from Comodo, Verisign, Entrust, etc to find out whether they issue certs directly from the root and skip the intermediate. Also, it is highly unlikely that we would find a CA provider that does not have an intermediate authority because best practice is to mask/shield the root from direct contact by issuing certs from the intermediate rather than the root.

Assign lync policies based on ad group

I adapted a script I found online to run within a scheduled task to assign a Conferencing Policy based on the membership of a global group named “CSLyncRecordingUsers.” Originally the script accepted paramters, but I wanted to just force the scheduled task to run with as few paramters as possible. I commented out the lines requiring arguments.

The service account needs to have the Logon as Service right assigned, and it needs to be a member of RTCUniversalServerAdmins.

The scheduled task just needs to reference powershell.exe and then a single parameter with the location of the script.

image

_________BEGIN Assign-ToGroup.ps1____________________

import-module ‘C:\Program Files\Common Files\Microsoft Lync Server 2013\Modules\Lync\Lync.psd1’

#Note: The above quotes must be single ticks and not double quotes or the task scheduler will not fire.

#Purpose: Assign the Recording Policy to all members of the global Group CSLyncRecordingUsers

#Syntax C:\Scripts\Assign-ToGroup.ps1 CSLyncRecordingUsers”RecordingAllowed”

#$strFilter = “(&(objectCategory=Group)(SamAccountName=” + $args[0] +”))”
$strFilter = “(&(objectCategory=Group)(SamAccountName=CSLyncRecordingUsers))”

$objDomain = New-Object System.DirectoryServices.DirectoryEntry

$objSearcher = New-Object System.DirectoryServices.DirectorySearcher

$objSearcher.SearchRoot = $objDomain

$objSearcher.Filter = $strFilter

$objSearcher.SearchScope = “Subtree”

$colProplist = “member”

foreach ($i in $colPropList)

    {[void] $objSearcher.PropertiesToLoad.Add($i)}

$colResults = $objSearcher.FindAll()

foreach ($objResult in $colResults)

    {$objItem = $objResult.Properties; $group = $objItem.member}

foreach ($x in $group)

    {

#        Grant-CsConferencingPolicy $x -PolicyName $args[1]
        Grant-CsConferencingPolicy $x -PolicyName “RecordingAllowed”

    }

Windows Azure Automation

Windows Azure Automation allows you to automate the creation, monitoring, deployment, and maintenance of resources in your Windows Azure environment. For example, by default Azure Automation comes with a default Azure runbook containing over 350 Azure powershell commands that you can schedule for automation. You will also be able to import other runbooks to automate non-Azure assets, or create your own.

“Azure Automation provides an orchestration feature set for public cloud resources that is similar to what the Service Management Automation (SMA) engine provides for on-premises private cloud resources via the Windows Azure Pack and System Center 2012 R2 Orchestrator.” – Keith Mayer (from his excellent blog on Automation here).

I looked into this service because I wanted a solution to shut down my demo VM’s running in Azure on a nightly basis.

The first step is to logon to the Azure Account Portal and sign in with your subscription information:

https://account.windowsazure.com

Then click Preview Features and click the “Try it now” button

image

A pop-up will appear informing you that the feature will be added to your subscription soon.

image

Now logon to the Azure Management Portal. If you were previously signed in, you must sign out and back in before you’ll see the Automation option appear in the menu.

https://manage.windowsazure.com

image

Click ‘Create an automation account’

At the time of preview, it is only available in East US.

image

To get started with your first “Hello World” runbook, follow the guidance online (here).

There are currently 20 powershell commands for managing Azure Automation available (here).

There are 30 runbooks in the Technet script gallery that have been written by the community for use in Azure Automation available (here).

I found a runbook on the Technet script gallery (here) written by Peter Selch Dahl for stopping all VMs.

However, after reading the rest of Keith Mayer’s blog, I decided to just follow his article. http://blogs.technet.com/b/keithmayer/archive/2014/04/04/step-by-step-getting-started-with-windows-azure-automation.aspx

Simple Disk Performance Testing

I came across an excellent blog article on disk performance testing:

http://www.brentozar.com/archive/2008/09/finding-your-san-bottlenecks-with-sqlio/

It walked through using SQLIO to test disk performance.

Basically, you just modify the param.txt file like this:

D:\testfile.dat 2 0x0 20480  

(Where 20480 is a 20gigabyte file that will get created on the D:\ drive)

Then you can do a quick 10 second run with this syntax:

C:\Program Files (x86)\SQLIO>sqlio.exe -kW -s10 -fsequential -t8 -o8 -b8 -LS -Fparam.txt timeout /T 10

For comparison my C drive is a Corsair Force GS and scored 210mb/s with 27k IOPS and my D drive is a OCZ-Vertex and scored 135mb/s and 17k IOPS

Then you can run a longer 120 second test by creating a batch file containing these entries:

sqlio -kW -t8 -s120 -o8 -frandom -b8 -BH -LS D:\TestFile.dat
sqlio -kR -t8 -s120 -o8 -frandom -b8 -BH -LS D:\TestFile.dat
sqlio -kW -t8 -s120 -o8 -fsequential -b64 -BH -LS D:\TestFile.dat
sqlio -kR -t8 -s120 -o8 -fsequential -b64 -BH -LS D:\TestFile.dat

 

  • -kW and -kR: means we’re testing writes or reads
  • -t8 and -o8: means 8 threads with up to 8 outstanding requests at once.  SQLIO isn’t CPU-bound at all, and you can use more threads than you have processors.  The more load we throw at storage, the faster it goes – to a point.
  • -s120: means the test will last 120 seconds
  • -b8 and -b64: the size of our IO requests in kilobytes.  SQL Server does a lot of random stuff in 8KB chunks, and we’re also testing sequential stuff in 64KB chunks.
  • -frandom and -fsequential: random versus sequential access.  Many queries jump around randomly in the database, whereas things like backups, bulk loads, and table scans generally work sequentially.

Downloads

SQLIO from Microsoft http://www.majorgeeks.com/mg/getmirror/sqlio_disk_subsystem_benchmark_tool,1.html

Note: the blog post also recommends an easy GUI tool that is available here:

CrystalDiskMark Portable Edition http://crystalmark.info/download/index-e.html#CrystalDiskMark

CrystalDiskMark generates sequential & random, read & write loads at your storage system in 512KB and 4KB chunks

image

image

More advanced tools:

Iometer http://www.iometer.org/

SQLIOSim http://support.microsoft.com/kb/231619

Microsoft Azure (IaaS) Cost Estimator Tool

Microsoft just released a tool that can connect to your on-premises environment and estimate the cost of running it in Azure Infrastructure as a Service (IaaS).

You can target an individual physical machine, a Hyper-V or vCenter/ESX host, or a System Center Virtual Machine Manager (VMM) environment.

The tool takes seconds to install and is extremely easy to use. I installed it on my Windows 8.1 domain-joined laptop and pointed it at my lab environment running Hyper-V.

1. Download the beta (here). Note: The beta will expire on 9-1-2014.

2. Follow the installation (next –> next –> done!)

3. Launch the tool and click on Hyper-V

image

4. Enter the details of your Hyper-V server

image

Note: I selected ‘Run Once’ to get an immediate cost but I like how the tool allows you to run it over a configurable duration of time so that it can include other factors such as disk and network I/O.

Click Begin Profiling to run the scan.

image

In my experience, the scan averaged about 120 Kbit/s between my workstation and the server.

 

5. Click on the virtual machines that you are interested in getting a quote on

image

6. Click ‘get cost’ in the bottom-right.

image

 

\