SolutionBase: Simulate traffic for your Exchange Server using LoadSim

When setting up a new Exchange Server, you want to make sure it can handle the traffic you're going to give it. Here's how to use LoadSim to simulate an actual enviroment for your server without having a duplicate network.

Although installing Exchange Server 2003 is a relatively easy task, deploying a new Exchange Server is not a task to be taken lightly. Exchange Server tends to be an extremely high demand application. If you don't properly plan your Exchange deployment, Exchange can bring your server to its knees. As such, it's usually a good idea to do some testing prior to actually deploying a new Exchange Server in a production environment, just to make sure that the new server can handle the workload.

Exchange is a complex application, and there really isn't a single tool that I know of that can perform a comprehensive set of tests against the server. Instead, you need to make some decisions about what aspects of the system's performance you want to test and then choose the right tool for the job. For example, the Exchange Server Stress and Performance Tool (ESP) can test the impact of non MAPI traffic, such as SMTP traffic. Likewise, the JetStress tool can test the performance and integrity of your disk subsystem. Of course the majority of the requests made against an Exchange Server are usually in MAPI format (MAPI is the protocol used by Outlook to access Exchange).

The tool of choice for testing the impact of MAPI traffic on an Exchange Server is LoadSim, which I will talk about in this article.

Author's note

If you are interested in learning more about JetStress or ESP, I have written separate articles on them. As you work with LoadSim, keep in mind that the other tests are important too. LoadSim only simulates MAPI based mailbox traffic. It does nothing to help you test the effects of other protocols that might be used, SPAM, Outlook Web Access clients, etc.

The prep work

We all know that in a lot of companies, it can be really tough to get management agree to letting you buy new server hardware. I have known a couple of people who have run LoadSim against a live server as a way of demonstrating to management the impact of future growth. Microsoft advises against doing this though. Microsoft designed LoadSim specifically to test the performance and the limitations of new Exchange Servers prior to those servers being placed into a production environment.

The Microsoft Web site advises you to configure your Exchange Server in the same way that it will eventually be used in a production environment. You can the run LoadSim against the server and get a feel for how well the server performs.

Although I'm not really in a position to contradict Microsoft, I have a slightly different recommendation for anyone who is contemplating running LoadSim on a new server. I think that it makes more sense to create a small dedicated network specifically for testing your new server. The reason for this is because Exchange is not a standalone application. Exchange is a forest level distributed application.

You are only allowed to have one Exchange organization per forest. If you already have a production Exchange organization in place, does it make sense to add a test server to the production organization and then start flooding that server with MAPI requests? Even if the tests aren't doing anything that could cause a catastrophic failure on the production network, you have to remember that Exchange is dependant on the Active Directory.

Running LoadSim against a test server that is connected to your production network will stress not only the server that you are testing, but also your domain controllers (and the network itself). Traffic from LoadSim will consume lots of network bandwidth and could stress your global catalog servers or your DNS servers. Of course depending on how you look at it, that might be a good thing, because it would allow you to test your network as a whole. I tend to believe that test servers have no place on a production network though.

If you are like me and don't like the idea of running LoadSim tests against a server that's connected to a production network, then the easiest thing to do is to set up an isolated test network. All you need is a couple of PCs that you can use to perform various network roles. You can set one of these machines up as a combination domain controller / DNS server. You will need at least one more machine that can act as a MAPI client. This is the machine that will actually be running LoadSim, although you can run LoadSim from multiple clients if you prefer.

If you've got another computer to spare, it is a good idea to set a computer up to run Performance Monitor against the Exchange Server that you are testing. Unless you are measuring network traffic, the Performance Monitor tends to give you much more accurate results if you run it remotely rather than running it directly on the machine that's being tested.

Now, just set the Exchange Server up as you plan to in the production environment, and test to your heart's content. When you are done testing, you will probably want to format the Exchange Server's hard drives so that you can set the server up to be a part of your production domain and your existing Exchange organization.

Acquiring LoadSim

LoadSim is a free utility that you can download from the Microsoft Web site. The download consists of a 1.73 MB self extracting executable file. Simply download the file, double-click on it, and you will be prompted for a location to extract the file's contents to.

Installing LoadSim

To install LoadSim, double-click on the LOADSIM.MSI file. When you do, Windows will launch the LoadSim installation wizard. Click Next to bypass the wizard's Welcome screen. You will now be prompted to accept the utility's End User License Agreement (EULA). Accept the EULA, click Next, and you will be asked to confirm the installation path. Click Next one last time, and LoadSim will be installed. Click Finish to complete the installation process.

Running LoadSim

Now that LoadSim is installed, you can access it by clicking the Start button and selecting All Programs | Exchange LoadSim | LoadSim 2003. When LoadSim opens, it will go through a very brief initialization routine. After LoadSim finishes initializing, it's time to begin the configuration process. The first thing that you have to configure is the test topology. To do so, select the Topology Properties command from LoadSim's Configuration menu.

When the Topology Properties sheet appears, the Servers tab will be selected by default. The first thing that you will have to configure is the number of users that you want to simulate. To do so, expand the listing for the server that you want to test to reveal the storage groups that exist on the server (you should set up the storage groups as they will exist in real life prior to running LoadSim). As you select each storage group, the mailbox stores within the storage group will appear in the column to the right. Double click on the # Users column, and set the number of users that you want to simulate for each mailbox store.

Figure A

Use the Servers tab to set the number of users that you want to simulate within each of the test server's mailbox stores.

After setting the number of user accounts to be simulated, select the properties sheet's Security and Credentials tab. As you know, Exchange is designed to be secure. Clients (virtual or real) can't send messages through the server without being authenticated.

The Security and Credentials screen, shown in Figure B, gives you two choices. You can either configure the clients so that LoadSim uses the credentials of the account that you are logged in with, or you can set LoadSim so that each client logs into Exchange using a separate account.

Figure B

I recommend choosing the option Login To Users Using the Account LoadSim Is Running On.

I fully expect that some of you will disagree with me on this point, but I recommend using the option to use the account that you are already logged in with. I know that this is a security no-no, but the test is being performed on an isolated, test network, so security isn't really a huge concern. Besides, using the current account places less strain on the computer that's running LoadSim, and that machine is less likely to run out of memory as a result. Furthermore, if the Exchange Server that's being tested is running Exchange Server 2003 Service Pack 1, then using the separate account option can result in errors depending on how many virtual users you have configured.

The properties sheet's third tab is the Distribution List tab, shown in Figure C. In most real world deployments, there will be at least a few distribution lists that are used for sending a message to a group of users. LoadSim does not require you to simulate distribution list usage, but by default, LoadSim is configured to simulate 1,000 distribution lists on the server.

Figure C

LoadSim can simulate distribution list usage.

You will probably want to either disable distribution list testing or set the number of simulated distribution lists to a number that is a bit more realistic for your company. While you are at it, you can also set the minimum, average, and maximum distribution list size.

Being that Exchange Server 2003 supports query based distribution lists, Microsoft has built dynamic distribution list simulation capabilities into LoadSim. LoadSim gives you the option of creating dynamic distribution lists at the user, server, or store level.

The final tab on the Topology Properties sheet is the Public Folder tab, shown in Figure D. The Public Folders tab allows you to simulate your organization's anticipated public folder structure. The settings on this tab are pretty self-explanatory. Basically, they allow you to set the number of root level folders, and the total number of sub folders. From there, you can specify the maximum, minimum and average folder depth along with the maximum, minimum, and average number of posts in each folder.

Figure D

The Public Folders tab allows you to simulate your organization's anticipated public folder structure.

Configuring the test

Now that you have specified your Exchange topology, it's time to configure the test that you plan to run. We have already told LoadSim how many users are on the server, but we have yet to tell LoadSim how those users use the server. Some users use Exchange much more extensively than others. With this in mind, select the Test Properties command from the Configuration menu. When you do, you will see the screen that's shown in Figure E.

Figure E

Now that you have configured the topology, you must configure the test.

The screen that you see in Figure E simply allows you to specify the duration of the test. Things get a lot more interesting though when you click the Add button (the add button will be grayed out until you configure the topology).

When you click the Add button, you will see a screen that's similar to the one shown in Figure F. This screen allows you to better define the way that your users will eventually use the server.

Figure F

The Add / Edit User Group dialog box allows you to define the level of intensity that you expect from your users.

For example, suppose that you anticipate having a hundred users, and you expect ten of those users to use Exchange very heavily. You could use this dialog box to tell LoadSim that you want to define ten users as heavy users. You could then click OK and then click Add again and define the other 90 users as medium level users, or whatever is appropriate for your organization.

Of course terms like heavy and light usage are relative. My idea of heavy usage might be completely different from yours. As such, LoadSim allows you to define the activities that a heavy or light user would engage in. To do so, select one of the groups of users that you have just defined and click the Customize Tasks button. LoadSim will now display the Customize Task properties sheet.

LoadSim allows you to define each user group's activities in fine granular detail. In fact, there are so many options that I can't possibly talk about them all (LoadSim comes with over a hundred pages of documentation). If you look at Figure G though, you will get an idea of the kinds of things that you can do.

Figure G

You can control each user group in fine granular detail.

As you can see in the figure, you can enable or disable eighteen different Outlook tasks. Furthermore, each task has its own set of configuration options. The settings shown in Figure G are specific to processing the Inbox. Things like Send Mail and Browse Mail have completely different configuration options. In case you are wondering, the properties sheet's Test / Logon tab allows you to simulate how often the test users log on and off during the test. The initialization tab is used to control things like the number of messages in each user's mailbox, the number of rules that the test users have set up, the size of the deleted items folder, etc.

Running the simulation

Now that you have configured LoadSim, you can run the simulation by selecting the Run Simulation command from the Run menu. When you do, you will see a message informing you that you can run tests from multiple computers, but that only one of those machines should be used to initialize public folders. Click Yes to initialize the public folders and the test is on its way.

You can monitor the test's impact on the server by running the Performance Monitor. I also recommend keeping an eye on the server's available disk space. Running long duration LoadSim tests can run a server out of disk space pretty quickly depending on how LoadSim is configured. But then again, that's one of the reasons why we test new Exchange Servers against an anticipated work load.