<img height="1" width="1" src="https://www.facebook.com/tr?id=1529264867168163&amp;ev=PageView &amp;noscript=1">
blog_listing_hero_img.jpg

Automating Jetstress 2013 for Exchange 2013 – Part 1

It’s considered best practice to perform Jetstress before installing Exchange. Jetstress must be performed on every mailbox role server in an organization. After sizing the mailbox server with the help of Microsoft storage calculator, you decide the required storage size and storage type. Once you decide on the size and kind of storage, it’s time to validate your disk subsystem with Jetstress to make sure that you get sufficient disk Input/output (IOPs) to take up the load. Jetstress's result will help you evaluate your design, and if necessary, you may need to tweak the design.

 

If your organization has hundreds of mailbox servers to bring into production you will need an automated process. Here is an automated script to Jetstress your disk’s subsystem in a large scale. This script is also for those of you who want to start the script and forget it. It will verify the supporting files, disk subsystem, install and initializes Jetstress, finally stresses the disk and analyzes the result for you. Basically, it makes the Exchange administrator’s life easy. This script is inspired by Neil Johnson’s - Automating Jetstress.

 

In this article, we will talk about automating Jetstress completely with Jetstress 2013 for Exchange 2013 on Windows Server 2012. 

What you will need before you start Jetstress automated script?

1. Configure Disk Subsystem and mount point as per the design. Make sure to follow all the best practices while configuring mount points. 

2. Download the latest version of Exchange 2013 Jetstress(Jetstress.msi) from Microsoft - and copy to the folder c:\temp\Jetstress on the server.

3. Get the latest version of the ESE.dll and other below supporting files from Exchange 2013 binaries and copy it to the folder C:\temp\Jetstress on the server.

a) ese.dll

b) eseperf.dll

c) eseperf.hxx

d) eseperf.ini

 

Note: Its recommend to get the Dll’s from the latest exchange 2013 version available.

4. Create configuration file - Jetstressconfig.xml and below are the steps to create the Jetstressconfig.xml configuration file.

a) Install Exchange Jetstress 2013 on the server.

b) Copy the dll’s defined above to “C:\program files\Exchange Jetstress” folder.

c) Start the Exchange Jetstress 2013 once to initialize the dll’s. Close and reopen the Jetstress application once.

Note: It’s recommended to “Run as administrator”, to initialize the dll’s and supporting files.

d) Select “Start a new test” on Jetstress 2013 window and click “Next”

e) At Open configuration option, select “Create a new test configuration” and save Jetstressconfig.xml to C:\temp\Jetstress and click on “Next”.  This is an important process of Jetstress automation. We need to create the jetstressconfig.xml file with all necessary configuration.

 

 KK1

Figure 1. Creating a new configuration file Jetstressconfig.xml

 f) Select ­­­the option “Test Disk subsystem throughput” in Define Test scenario and click “Next”­­­ 

KK2 resized 600

Figure 2. Define Test scenario

 g) It’s recommended to perform manual tuning by defining the thread count. Figure 3 has the details to define the thread count through option “Suppress turning and use thread count (global)”Below articles are defined as to - how to select an appropriate thread count.

http://technet.microsoft.com/en-us/library/ff459238(v=exchg.141).aspx

 

 KK3

 Figure 3. Defining thread count

 h) Select Test type as “Performance” stress test and also make sure that “Run background database maintenance” is selected and click “Next”.

 

 KK4

Figure 4. Test type section

 i) Specify the path for the test results as temp path “c:\temp\Jetstress\jetstressresults” and also specify the test duration as 2 hrs.

 

Performance test is performed if test duration is <=(less than or equal to) 6 hours.  

Stress test is performed if the test duration is > (greater then) 6 hours. Performance test is the most recommended to get more accurate results.

 KK5

Figure 5. Test result path

j) Define number of Database, database copies and the disk subsystem configuration as per the design and mount points configured.

 KK6

Figure 6. Database Configuration

k) Select an option to “Create new Database” in select Database source and click “Next”

 KK7

Figure 7. Select Database source

l) Finally review the test conditions and click on “Run test”. It will create the first database on first mount point and will make a copy of the first database into other mount points. Once all the DBs are created, it starts the Jetstress based on the defined period. Below Figure 8 has details of configuration for the Jetstress test.

 KK8

Figure 8: Starting Jetstress test

 m) Wait for Jetstress to finish. This Jetstress may succeed or fail or may not give you the required IOPs. If Jetstress is passed, then keep on increasing the thread count till Jetstress fails and you need to finalize the thread count, which is just one before the failed Jetstress and the maximum IOPs you can obtain from the disk subsystem with recommended read (<20ms) and write (<10ms) latency. If Jetstress fails, then keep decreasing the thread count until it succeeds.  Make a note of the successful thread counts, which gives you the required IOPS.

n) If your IOPS is not matching your requirement, then you may need to tweak the design and reduce the number of users on each DB.

o) Save the final configuration to c:\temp\jetress\jetstressconfig.xml and uninstall the Jetstress application.

 

Now, we are ready with the Jetstress.msi, supporting files and master configuration jetstressconfig.xml file. Let’s automate this using PowerShell. 

Jetstress 2013 Automation Script is divided into 5 parts:

  1. Validates Jetstress.msi and other supporting files
  2. Validates disk subsystem mount point’s configuration.
  3. Install Jetstress 2013 application and copy supporting file
  4. Initialize Jetstress and start the stress test for 2 hours.
  5. Validate Jetstress result file and display the result.
  6. Uninstall Jetstress, if Jetstress is successful

 

 

Validates Jetstress.msi and other supporting files

Below is a function to check and verify all necessary Jetstress.msi and other supporting files exists in the directory c:\Temp\Jetstress. It is important to have all necessary files for the successful execution of Jetstress. 

 

#function to verify Jetstress.msi and other supporting files.

Function Verifyjetstressfiles()

{

$failure = 1

$Jetstressfiles = "jetstress.msi","ese.dll","eseperf.dll","eseperf.hxx","eseperf.ini","jetstressconfig.xml"

foreach($files in $Jetstressfiles)

          {

if(!(Test-Path -path "$files")) 

 { $failure = 0    } 

           }

Return $failure

}

 

 Verification of the disk configuration.

To perform Jetstress, you need to have the disk configured as per the design. If you decide to have 20 databases in each mailbox server, then you have to configure the disk with 20 mount points. Microsoft recommends, keeping both Database and log files on the same mount point.

Note: It is recommended to configure disk mount point as defined in the Jetstressconfig.xml configuration file. For Jetstress purpose, make sure that every mailbox server disk mount point is configured as per jetstressconfig.xml. Once Jetstress is completed and verified scrap the disk configuration and reconfigure as per the DAG database or have multiple Jetstressconfig.xml  for different servers, which will fit your disk mount point configuration as per the DAG database and delete the temp Jetstress file once Jetstress is completed.

 

 

#function to Verify Disk configuration

Function Verifydiskconfig()

{

$Failure = 1

$jetstress = get-content "C:\Temp\Jetstress\JetstressConfig.xml"

foreach ($line in $jetstress)  

            {  

                        if ($line -match "<path>" -or $line -match "<logpath>")  

                        {  

             if ($line -match "<path>")

                                    {            $vpath = "DB Path:" }

else

{ $vpath = "Log Path:"       }

             $path_array = $line.split('<>'); 

             $path = $path_array[2] 

             if ((Test-Path -path $path)) 

                                    { 

                                                write-host -f green "$vpath $path found”

                                    } 

                                    else 

                                    { 

           write-host -f yellow "$Path does not Exist" 

           $Failure = 0

                                    }            

                        }  

}

return $Failure

}

 

Install Jetstress application and copy supporting files

Use msiexec tool to install Jetstress.msi application in a silent mode. Once Jetstress is installed, it will copy all supporting files to “Exchange Jetstress” directory under “C:\program files”.

#function to Install Jetstress

Function installjetstress()

{

msiexec /qn /package c:\temp\jetstress\jetstress.msi” | get-process

Copy-Item "C:\temp\JetStress\*" "C:\Program Files\Exchange Jetstress" -recurse -ErrorAction SilentlyContinue

            }

Conclusion:

We have covered the major part of the article with details on how to create configuration xml file using Jetstress application and start with the script to validate the supporting files as it is important to make sure before the installation. Then we followed by checking the disk configuration as defined in the configuration xml file and installation of Jetstress.

This is still not over however. Part 2 of the article will perform Jetstress and analyze the Jetstress result. We will also discuss how to consolidate all the functions defined in the article into one script and execute it from a single server to hundreds of servers!