Tuesday, April 04, 2006

Census Bureau to use HTC handhelds in 2010

 


For the first census of the 21st Century, the US Census Bureau is finally entering the 20th. In 2010, when the next census is conducted, the agency will use handheld computers, rather than relying on notepads for door-to-door visits. The agency says the plan will keep costs down as well as making the count more accurate. The handhelds will be made by smartphone manufacturer HTC, and will run a version of Windows Mobile. Concerned Census Bureau officials have been assured that the HTC units won't replace their BlackBerrys, and will be used solely for data collection, not as smartphones (despite the fact that, coming from HTC, they'll probably be very capable smartphones with messaging and calling functions turned off for this project). The equipment is expected to be deployed this year or next by Florida-based Harris Corp., which won a $600 million contract to run the field operation.  According to Census Bureau officials, the switch from paper to PDA will save money, though the total cost for the 2010 census is still expected to be as much as $12 million, double that of 2000.


View article...

Thursday, February 16, 2006

Microsoft Exchange Server 2003 Service Pack 2 (SP2) Help

Overview

The Exchange Server 2003 Help can help you in the day-to-day administration of Exchange. Use this information to guide you through Exchange Server 2003 features, tasks, and administration procedures. The Exchange Server 2003 Help augments the online articles, books, and release notes about Exchange Server 2003.

Download At http://www.microsoft.com/downloads/details.aspx?familyid=90bdb404-0f9b-4181-96fa-5871d9c26cf4&displaylang=en

Thursday, February 02, 2006

Microsoft IT Showcase: IT Security at Microsoft Overview

Discover the best practices and processes Microsoft IT uses to secure its network. Provides a brief overview of the many aspects of network security; including some of the technologies used to protect against viruses, unapproved access attempts and malicious attacks. Describes the threat analysis and business reasons why certain practices and procedures were put into action.

http://www.microsoft.com/downloads/details.aspx?FamilyID=e959f26c-1f5c-4331-b1fb-6c720795704d&DisplayLang=en

Microsoft IT Showcase: Providing Security for the Network Perimeter at Microsoft

This article describes how Microsoft improves operational efficiency and productivity for security-enhanced and well-managed infrastructure through the deployment of Microsoft Windows Server 2003, the Active Directory directory service, Public Key Infrastructure (PKI), certification authority (CA), Microsoft Internet Security and Acceleration (ISA) Server 2004, and Microsoft Exchange Server 2003 with Intelligent Message Filter.

http://www.microsoft.com/downloads/details.aspx?FamilyID=ab2e9758-0671-4a8c-958a-b955d30d5677&DisplayLang=en

Tuesday, January 31, 2006

How does OABGen know what domain controller to connect to?

Here is an article posted on EHLO by Dave Goldman.

In this article I will explain how the OAB Generation process discovers the domain controller that it will use for rebuilding an Offline Address List. Understanding this process can help you in troubleshooting.

 

As I have mentioned in other blog posts of mine, the System Attendant (MAD.exe) is the process that is responsible for invoking OABGen.dll (the OAB generation process). This happens one of two ways:

 

1. Via Schedule

 

To view the schedule for an Offline Address list you can do the following:

 

1. Open the ESM (Exchange System Manager)

2. Expand the Recipients Container.

3. Select the Offline Address List Container.

4. In the right hand pane highlight an Offline Address List.

5. Select Properties.

 

At the bottom of the Properties dialog box you will see an area that shows the Update Interval. This drop-down list box will control when the Offline Address List is generated. The list box will also show several predefined times:

 

·         Run daily as 2:00 am

·         Run daily as 3:00 am

·         Run daily as 4:00 am

·         Run daily as 5:00 am

·         Never Run

·         Use custom schedule

 

2. Via the ESM (Exchange System Manager)

 

1. Open the ESM.

2. Expand the Recipients Container.

3. Select the Offline Address List Container.

4. In the right hand pane right client an Offline Address List.

5. Select "Rebuild".

 

By selecting "Rebuild" you will force replication to occur. In doing so the System Attendant then becomes responsible for making sure that the selected Offline Address List is rebuilt.

 

But, the real question here is "how does the System Attendant find the domain controller??"

 

Well, in order for the OAB Generation process to connect to the Active Directory to make its NSPI queries, it must have a mechanism for doing so. This connection to the Active Directory will be facilitated by a MAPI profile.

 

What is a MAPI and what is a MAPI Profile?

 

MAPI stands for Messaging Application Programming Interface.

 

A MAPI Profile is a named list of message services and configuration data created by a user or service. A profile can contain any number of message services. Profiles will contain a session object and use service providers to do the work on the behalf of the user or system.

 

A MAPI Session is a period of fixed duration (logon time ---> logoff time) which the work is done. In the context of MAPI, work refers to a series of client requests to MAPI that are services by one or more service providers.

 

Once a scheduled rebuild or manual rebuild of an offline address list is performed, there are a few things that need to happen before OABGen.dll can even connect to the Active Directory:

 

1. The system attendant needs to force the Directory Service call to synchronize the Offline Address List.

 

2. After the Directory Service calls are made necessary security checks will be done to ensure that we have the proper credentials to make this call.

 

3. After the necessary security checks have been preformed we will make a call to the Active Directory to get the Configuration Domain Controllers DNS name. This is needed so we can obtain information like (Forest Name, Organization, Administrative Groups, Server Name, etc).

 

4. Once the Configuration Domain Controller's name is obtained a Session Object can be set up.

 

5. Now try to create one of the Directory Service objects, and read all of the information we need from the active directory (this is the data mentioned above).

 

6. Make a query to get the name of the offlineABServer.

 

7. Once the offlineABServer is found, get and use legacyExchangeDN to query that object in the active directory. (Example - "/dc=local/dc=OABGen/cn=Configuration/cn=Services/cn=Microsoft Exchange/cn=OABGen/cn=Administrative Groups/cn=First Administrative Group/cn=Servers/cn=W2K3-E2K3".

 

8. Next setup our tasks that are necessary for the OAB Generation (profile creation, obtain the public folder information store, etc).

 

9. Get the server name and add it to the MAPI Session that was previously created.

 

10. Logon to the Admin portion of the profile (System Attendant profile).

 

11. Obtain the system directory so we can find out where the MAPISVC.inf file resides.

 

12. Read in the service specific settings from the MAPISVC.inf file so the profile can be configured.

 

13. Check to see if we are a domain controller or not.

 

14. Get the mailbox name for this profile - "/o=OABGen/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=W2K3-E2K3/cn=Microsoft System Attendant"

 

15. Now log profile on to our session object using the MAPILogonEx API. For more information on the MAPILogonEx API please refer to: http://msdn.microsoft.com/library/en-us/mapi/html/9764438a-0e36-4124-af1e-8296759ed216.asp

 

16. Open the Address Book provider by creating a new IAB interface object.

 

17. Associate this Address Book with this MAPI session.

 

18. Load all of our necessary providers here for the profile.

 

19. Open the profile sections and also initialize emsabp.dll.

 

20. Load the Address Book data.

 

21. Look up the AB Server that will be responsible for holding the Offline Address List.

 

Here is where the magic is:

 

22. Check to see if the Address Book server can be contacted and is online. If we find that we are online then we need to Logon to the Directory Service.

 

23. Check to see if this server is an Exchange 2000 server.

 

24. Check the registry to see if we are hard coding the profile by using the following registry key [HKEY_LOCAL_MACHINE\Software\Microsoft\Exchange\Exchange Provider]. Please see this Knowledge Base Article for more information:

 

ID Q314737 - XADM: Offline Address List Generation Does Not Work on Exchange 2000 Server SP1

http://support.microsoft.com/default.aspx?scid=kb;EN-US;314737

 

NOTE: Using this registry key is not a recommended or supported method, and should not be used unless directed by a Microsoft PSS Support Professional for troubleshooting purposes only!!

 

25. Open Address Book profile section in the MAPISVC.inf file.

 

26. Read from the MAPISVC.inf file and see if we can find the following MAPI property tag 0x6602001e = PR_PROFILE_HOME_SERVER. If this value is present in the DS Section of the MAPISVC.inf file then this is the server that we are going to use for our Active Directory connections via our MAPI profile.

 

27. If this value is not present we are an Exchange 2000 server, we will then use the RFR Interface (Referral Service). Using the Referral Service will allow us ask the Exchange Server to connect to the Active Directory and find us another suitable domain controller that we can connect to.

 

28. If the server is not an Exchange 2000 server or our Referral failed to get the profile home server address we need to rebind back to the Active Directory again.

 

29. Once we find our data save it to the profile.

 

30. Now that we have the necessary profile information to connect to the Active Directory we pass this data along to OABGen.dll.

 

31. When OABGen.dll is invoked to rebuild an address list, it will have use the domain controller that is will use for its Active Directory queries.

 

 

Monday, January 23, 2006

Microsoft Network Load Balancing: Frequently Asked Questions for Windows 2000 and Windows Server 2003

For those of us who implement Windows NLB on E2K3 Front End Servers, this is a good read.

NLB basics, NLB and other clustering technologies, NLB for scalability, NLB for high availability, NLB fundamentals, deployment issues, set up and configuration, management and operations, support for sessions, and application and protocol support.

Download At http://www.microsoft.com/downloads/details.aspx?FamilyID=3bc5c7d1-0c45-40a9-ac0a-84da23aa13b4&DisplayLang=en


Monday, January 16, 2006

Update for Intelligent Message Filter for Exchange Server 2003: 2006.01.05 released

Update for Intelligent Message Filter for Exchange Server 2003: 2006.01.05 (KB907747) has bee eleased.

Get it through Microsoft Update or WSUS

For information how to setup automatic updates, see:  http://support.microsoft.com/?kbid=907747

Microsoft IIS Diagnostics Toolkit

Overview

The IIS Diagnostics Toolkit is a combined release of popular tools used by today's IIS users. These tools include tools aimed at resolving problems related to Secure Socket Layer (SSL) issues, permission or security problems, gathering data for your SMTP server included with IIS, as well as the famous Log Parser utility used to sift through hundreds or thousands of log files very quickly.

The toolkit consolidates all the tools into a convienant download and is supplemented by updates every 90-days to ensure that users have the most current diagnostics tools at their fingertips.
 
Version: 1.0
Date Published: JAN/14/2006
Language: English
Download Size: 6.1 MB

Available also in amd64 and ia64 versions (see bottom of source page document)
 
The tools that are included in this MSI package are:
  • Auth Diagnostics
  • Debug Diagnostics
  • SMTP Diagnostics
  • SSL Diagnostics
  • Trace Diagnostics
  • WFetch 1.4
  • Log Parser 2.2
 

Friday, January 06, 2006

Exchange Does Not Always Use Local GCs

A good description from Jasper Kuria on why E2K3 does always use the local GC.

Until last week I was under the impression that Exchange always uses local GCs (Global Catalog servers) and only uses out-of-site directory servers (GCs or DCs) if no local ones are available. I found out otherwise from working on the issue described below.

 

One of our customers had a server outage and Outlook clients could no longer connect to the Exchange server. In other words the server was hung and we had a critsit (critical customer situation case). When dealing with hangs, the first thing we normally ask customers to do is capture a few hang dumps a few minutes apart so that we can determine what the hung process is doing.

 

The customer dutifully sent us 3 hang dumps taken about 5 minutes apart. On opening the dumps, the first thing that stood out was that there were 6 threads with similar call stacks whose execution state remained completely unchanged in all three dumps. In just one second of execution a thread’s stack can change so drastically that it is almost unrecognizable as the same thread.  Put in context, these threads had stayed at the same point for millions of years--in processor time. They each had a stack that looked like this (the stack grows upwards from kernel32!BaseThreadStart and only the relevant parts are included):

 

00 3386dbb8 74fd1394 NTDLL!NtWaitForSingleObject+0xb

...

05 3386ddc8 77955bb2 WLDAP32!LdapWaitForResponseFromServer+0x533

06 3386de04 77955a86 WLDAP32!ldap_result_with_error+0x101

07 3386de34 77959f71 WLDAP32!ldap_search_ext_sW+0x84

08 3386de90 77958f41 WLDAP32!LdapDetermineServerVersion+0x56

09 3386e22c 7795ef47 WLDAP32!LdapBind+0x1e4

0a 3386e25c 7795eed0 WLDAP32!LdapNonUnicodeBind+0x84

0b 3386e274 62ebcfbc WLDAP32!ldap_bind_s+0x17

0c 3386e2cc 62ebcefd dsaccess!CLdapConnection::BindToHost+0x100

 

...

 

16 3386e834 61ee2422 tokenm!CSearchResults::DoDCSearches+0x7b

 

...

21 3386f850 77d5d899 store!EcDoConnectEx+0x4c

22 3386f8c8 77d9c912 rpcrt4!Invoke+0x30

31 3386ffb4 7c57b388 rpcrt4!ThreadStartRoutine+0x18

32 3386ffec 00000000 KERNEL32!BaseThreadStart+0x52

 

From frame 05 (in bold), these threads were all waiting for a response from an LDAP server creating a convoy that was in turn blocking several other RPC threads. None of the threads was making progress and as a result the available RPC connections that Outlook clients rely on were maxed out. OWA clients worked fine while all this was going on because OWA does not use RPC.

 

So why wasn’t the LDAP server responding? First I dumped the LDAP connection object to determine what server these threads were querying. Interestingly, the server was named

 

                  aussydneygc1.au.company1.com

 

Per the naming convention, this was a GC in Australia yet the Exchange server was in the US. Hmmh, why were we going across the sea all the way to Australia when there were 16 healthy GCs in the US? The next thing I had them do was turn up diagnostic logging for DSACCESS (the Exchange component responsible for querying the AD) to find out what GCs were being discovered and in what order. DSACCESS uses an algorithm that discovers GCs in the local site first and then those in remote sites based on the cost of WAN (Wide Area Network) links and logs the list in the informational Event Id 2080 (viewable every 15 minutes when diagnostic logging for MSExchangeDSAccess à Topology is set to maximum). The table looked like this:

 

 

 

process INETINFO.EXE (PID=2380). DSAccess has discovered the following servers with the following characteristics:

 

 (Server name | Roles | Reachability | Synchronized | GC capable | PDC | SACL right | Critical Data)

 

In-site:

wsdc1.us.company1.com   CDG 7 7 1 0 1 1 7 1

wsdc2.us.company1.com   CDG 7 7 1 0 0 1 7 1

wsdc3.us.company1.com   CDG 7 7 1 0 0 1 7 1

wsdc4.us.company1.com   CDG 7 7 1 0 1 1 7 1

 

Out-of-site:

nydc5.us.company1.com   CDG 7 7 1 0 1 1 7 1

nydc7.us.company1.com   CDG 7 7 1 0 1 1 7 1

 

For more infomation on what these values mean see kb article 316300

 

Only the GCs/DCs in the US were listed (none of the ones in Australia were) and so DSACCESS could not have been the culprit.

 

I looked at the stuck threads a little more and determined that the users connected to the Exchange server via RPC had DNs (Distinguished Names) that looked like this:

 

"CN=John Doe,OU=Users,OU=Melbourne,OU=Company1 AUS,DC=au,DC=company1,DC=com"

 

"CN=David Boe,OU=Users,OU=Melbourne,OU=Company1 AUS,DC=au,DC=company1,DC=com"

 

 

"CN=Jane Zoe,OU=Users,OU=Sydney,OU=Company1 AUS,DC=au,DC=company1,DC=com"

 

For a moment I thought maybe these users in the Australian domain had mailboxes on the US Exchange server but the customer assured me that their mailboxes were properly located on Australian mailbox servers. The only other possibility was that these Australian users were logging on to the US server for public folder content.  Looking at the code and dumping the mdb (store) GUID confirmed this.

To recap the scenario, Australian mailbox users were connecting to a US Exchange server for public folder content. In order to determine what permissions the users had on the public folder content, the US Exchange server was querying a DC in Australia. The threads sending queries to this DC were stuck waiting for a response and they were in turn blocking other RPC threads, maxing out available RPC connections and adversely affecting Outlook clients on the US server. The question still remains, why wasn’t the US Exchange server querying the local US GCs listed above in the DSACCESS table?

It turns out that Exchange does not always use the local GCs. For certain specific security related user attributes like tokenGroups and tokengroupsGlobalandUniversal (used to determine what security groups a user is a member of and therefore what permissions s/he has to secure resources such as public folders). Exchange MUST query a DC that is authoritative for the user’s home domain, which will likely be an out-of-site DC—in this case it happened to be a DC in Australia. This behavior was introduced around the Exchange 2000 SP2 time frame to address an issue where users from remote domains (sibling or parent) were denied access to public folders even when the security groups they were in should have allowed them access. Pre-SP2 we had made the false assumption (in the product) that a local GC can service ALL queries that Exchange issues. A local GC can (and should) service MOST queries in a well designed multi-site AD environment.

Now back to Company1’s situation. At the time of the outage the WAN link to Australia was, in the customer’s words, "having some serious issues", which is why the LDAP responses were severely delayed. The connection was really spotty but it wasn’t down, which is probably why the connections didn’t time out. "How could this have been avoided?" they wanted to know. One simple way would be using dedicated public folder servers. If the US Exchange server were only a public folder server the worst that could happen is the Australian users wouldn’t have had access to the public folder content stored on the server (and perhaps individual Australian Outlook Clients would display the infamous "retrieving information from the server" RPC dialog). This is a less serious problem any day than lots of users (US users in this case) having no access to email. Another possible way to avoid the situation would be setting up replicas of the US Public Folder content on an Australian public folder server to avoid referrals over the WAN link. "But what if we have too little public folder content to justify a dedicated public folder server?" the customer asked. Fair question, but the honest answer is you risk running into this kind of problem again. Hopefully the WAN link going down is a relatively rare occurrence. If cross site public folder referral is also rare, the two rarities multiplied make for a low probability of the event occurring, but, like an earthquake, when it does occur...you get the point.

BTW we might have some good news on this in a few weeks. Stay tuned!

Thursday, January 05, 2006

Application Analyzer 2006 for Lotus Domino Beta

The Microsoft Application Analyzer 2006 for Lotus Notes/Domino is a tool that is used to help size and scope a Lotus Notes/Domino application migration project. The tool will analyze Lotus Domino applications, provide reports about application characteristics and recommend possible target solutions on the Microsoft Collaboration Platform.

Download At Source: 
http://www.microsoft.com/downloads/details.aspx?FamilyID=20e88f5d-b885-4ee0-8530-de12e96504b6&DisplayLang=en

Friday, December 30, 2005

Scripting Center help for MONAD

For everyone familiar with the scripting center that we have used for vbscripting and E2K3, there is now an extension to it for MSH scripting.  Enjoy...  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Thursday, December 29, 2005

Large Security Tokens and Kernel Memory Exhaustion

This is a fantastic article posted by Mike Lee on EHLO.  It describes the exact issues with Kernel memory and Token bloat.  This is a MUST READ!

INTRODUCTION

 

This is the third CXP flash about Windows 2003 kernel memory issues and Exchange 2003.

 

The first flash provided technical background about the demands Exchange makes on kernel resources.

 

 

The second flash discussed hardware configurations that can restrict the kernel memory available for applications.

 

This flash explains the effect of large user security tokens on Exchange's kernel memory usage.

 

 

EXECUTIVE SUMMARY

 

Each client connection to a Windows server uses some paged pool kernel memory. The amount of kernel memory used per connection can vary widely. The size of the client's security token is the most important factor here.

 

Security tokens increase in size in proportion to the number of security groups to which a user belongs. This increase is generally linear, but there are sharp jumps in memory usage at certain thresholds.

 

There are an increasing number of Microsoft and third party clients and services that can connect to an Exchange server to provide expanded client, search and mobile functionality. Each of these clients may make multiple connections to the server, and each connection has token information associated with it. By reducing average token sizes, you can greatly increase the number of simultaneous connections that the server can manage.

 

 

CALL TO ACTION

 

  • Exchange administrators should monitor the amount of paged pool memory in use on Exchange servers during peak connection times, and reconfigure servers that are close to running out of pool memory. 
  • Exchange administrators should calculate the effects on pool memory of adding new mailboxes, clients or services to an Exchange server.

 

  • Exchange administrators should coordinate with Active Directory administrators to manage the number of security groups to which Exchange users are assigned. This is especially critical if the number of security group memberships is near a threshold where token size could suddenly jump.

 

Environmental changes such as the implementation of a new client or an increase in the number of security group memberships can suddenly increase kernel memory consumption to a critical level, causing the Exchange server to suddenly become slow or unstable. This can happen even though no changes have been made or mailboxes added on the Exchange server

 

 

FREQUENTLY ASKED QUESTIONS (FAQ)

 

What is a user token?

 

A security token is the bundle of information that identifies the user and the security groups to which the user belongs. Each time the user tries to connect to a secured resource, the token must be presented to the resource so that it can determine whether access should be granted or denied. For detailed information about security tokens please refer to the Access Tokens Technical Reference in the Windows Server 2003 Technical Reference at:

 

http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/TechRef/897db60d-a38e-40bc-a18e-f4ccafe190e9.mspx

 

How big is a user token?

 

It depends. The most important factor is the number of security groups to which a user account belongs. Making a user a member of an additional security group can add up to 68 bytes to the token.

 

Various factors affect total token size and how many bytes are added per group. There is no simple mathematical formula for calculating token size based on the number of group memberships.

 

Nonetheless, the token for a user who belongs to 60 security groups is very likely to be less than 4K in size. The token for a user who belongs to 80 security groups is likely to be slightly more than 4K in size.

 

With regard to kernel memory consumption, there is a critical difference between a token that is "slightly less" than 4K and one that is "slightly more" than 4K.

 

As soon as the size of a token goes above 4K, even by a few bytes, it will take 8K of kernel memory to hold the token. If the token grows to slightly larger than 8K, its memory requirement will suddenly jump to 12K.

 

This increase may not seem that significant until you multiply it by thousands of clients--each of whom may make several connections to the server.

 

How much memory is taken up by user tokens on a typical server?

 

Consider an Exchange server where 1000 clients are logged on using Outlook 2003 in cached mode. Cached mode is a new Outlook feature that greatly improves the end user experience across slow or unreliable connections. Cached mode clients typically will not notice server disconnections lasting several minutes while online mode clients would experience errors in the same circumstance.

 

The typical Outlook 2003 cached mode client holds open 3 to 5 connections to the Exchange server. Older versions of Outlook (and Outlook 2003 in online mode) will make 1 or 2 connections to the server. Multiple connections allow Outlook to perform multiple server tasks in parallel. As a general rule, more connections per client means a better user experience. But, more connections per client also means more kernel memory consumption.

 

Each client connection to the Exchange store operates independently and needs a copy of the user token. There is also some RPC overhead for managing these connections, and busy clients may have more than one RPC connection to the server. Each RPC connection to the server also needs a copy of the user's token. Thus, each cached mode client has multiple copies of its token in memory on the server.

 

For the purposes of this example, assume that each client has a total of 5 connections and a token that is just under 4K in size. Each client then needs 20K of kernel memory.

 

This means that a thousand cached mode users will require about 20 megabytes of paged pool memory to support their connections. On a correctly tuned Exchange server with the /3GB switch set, there is a maximum of about 250 megabytes of paged pool memory available to all applications on the server.

 

NOTE: Please refer back to the first flash in this series for more information about the trade-offs involved in setting the /3GB switch. You can follow this link to read that flash on the Microsoft Exchange Team blog:

 

http://blogs.technet.com/exchange/archive/2005/12/07/415733.aspx

 

If additional security groups push the token size above 4K, then the amount of kernel memory used for tokens will suddenly be 40 megabytes instead of 20 megabytes. If each user starts using Microsoft Communicator and MSN Desktop Search,  there can be additional connections made to the Exchange server. If these additional clients add a single connection each, they increase paged pool demand by another 40%.

 

There may also be clients on your network who have Outlook add-ons that make additional connections, clients who connect to the server from multiple computers at once, and delegates who open multiple calendars or mailboxes simultaneously. Each of these puts additional pressure on paged pool memory by making additional connections.

 

What happens if I run out of paged pool memory?

 

The server will become slow or refuse additional requests and connections. Applications may fail suddenly. In extreme cases, the server can even "blue screen" and stop entirely.

 

If the paged pool shortage is transient, the server will likely recover. Applications can be somewhat resilient to temporary shortages of memory, but no application can run forever if critical resource requests are not satisfied. If the paged pool shortage lasts very long, it is likely to trigger cascading bottlenecks. In such a case, the server will probably have to be rebooted to make it functional again.

 

How much paged pool memory should be free in order for me to feel safe?

 

Under peak load, there should be approximately 50 megabytes of available paged pool. If you have less than 30 megabytes free, you should take immediate steps to reduce load on the server.

 

Paged pool is allocated statically at Windows boot time. The pool cannot be increased without reconfiguring and rebooting the server. The amount of paged pool memory available depends on a number of factors, including boot switches (such as /USERVA and /3GB), registry settings and physical RAM.

 

You can use a kernel debugger to view the size of initial paged pool and other kernel memory allocations. Setting up a traditional kernel debugging session can be a daunting task, typically requiring an extra computer, specialized cabling and a server reboot. Alternately, the LiveKD utility from Sysinternals can be used to start a kernel debugging session from the server console. LiveKD does not require you to reboot the server. For more information, please see this article in the Microsoft Knowledge Base:

 

The Performance tool does not accurately show the available Free System Page Table entries in Windows Server 2003

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

 

IMPORTANT NOTE: Commands that can be used during a kernel debugging session can cause the system to become unstable or to stop. Microsoft recommends that you stop all Exchange services before initiating a kernel debugging session, and that you reboot the server after the session.

 

Without running a kernel debugger, you can still estimate how much paged pool is available on your server. A typical Exchange mailbox server with 1 gigabyte or more of RAM should have an initial paged pool allocation of slightly under 250 megabytes. (This assumes that the server has been configured with the /3GB switch and other recommended optimizations. Without the /3GB switch, initial paged pool on the same server would be about 350 megabytes.)

 

It is easy to check how much paged pool is currently in use. Windows Task Manager displays paged pool usage on the Performance page under Kernel Memory\Paged. You can also monitor paged pool usage over time with Windows System Monitor through the Memory\Pool Paged Bytes counter.

 

As a general rule then, paged pool usage in excess of 200 megabytes is cause for concern, and paged pool usage in excess of 220 megabytes requires immediate attention. If you are within these limits, and the server is still running out of paged pool, then the problem is likely that the initial paged pool allocation is insufficient. You can use a kernel debugger to verify whether this is the problem.

 

How can I find out how much of a server's pool usage is for user tokens?

 

You can find out how much kernel memory is being used for tokens at any given moment by using the Poolmon or Memsnap utilities. These utilities can be run without interrupting the server. They are available with the Support Tools for Windows 2000 and 2003.

 

Both utilities rely on the fact that each allocation of pool memory has a tag associated with it. The tag for tokens is called TOKE. Therefore, you can look through the output of either utility and find the TOKE line to see how much paged pool memory is in use at the moment for tokens.

 

NOTE: For Windows 2000, display of the pool tags is not enabled by default. You must enable tag display with the Gflags utility and then reboot the server before you can use Poolmon or Memsnap.

 

More information about monitoring and tuning kernel memory for Exchange is available here:

 

How to Use Memory Pool Monitor (Poolmon.exe) to Troubleshoot Kernel Memory Leaks

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

 

The "Ruling Out Memory-Bound Problems" section of the Troubleshooting Exchange Server 2003 Performance white paper

http://www.microsoft.com/technet/prodtechnol/exchange/2003/library/e2k3perf.mspx

 

How to optimize memory usage in Exchange Server 2003

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

 

What can I do to reduce the size of user tokens?

 

There are three strategies you can follow:

 

  • Reduce the number of security groups to which each user belongs.

 

Nesting security groups will not help in doing this. The SID of each nested group is stored in the user token. In fact, if you are puzzled by what appears to be a discrepancy in the number of groups to which users belong and the size of their tokens, nested security groups may be the explanation. You can simplify group administration by following the best practice of not nesting groups beyond two levels.

 

If you are migrating user accounts from Windows NT 4 domains or between Active Directory domains, users may have sIDHistory entries for previous domains. If users belong to a large number of groups in that domain, this can greatly increase the token size. Completing the migration and decommissioning the previous domains may therefore reduce token size.

 

  • Host Exchange servers in a different domain than the users who connect to them.

 

This can reduce the size of user tokens by stripping domain local groups for the user account domain from the token presented to the Exchange server. This works because domain local groups from one domain are not kept in the token generated on a server in a different domain.

 

  • Where possible, convert security groups to distribution groups.

 

Token size is increased by membership in security groups, not distribution groups. Users can belong to thousands of distribution groups with no effect on token size. If a group is not actually being used to deny or grant access to resources, it should be a distribution group, not a security group.

 

What else can I do to reduce the total TOKE size on my server?

 

Once you have reduced the typical token size to the practical minimum, the next step is to manage the number of simultaneous connections made to the server. As mentioned above, each client may make multiple connections to the server, and different clients make different numbers of connections based on a wide variety of factors. You may not even have a full list of all the clients that connect to your server.

 

Users may install Outlook add-ons that make additional connections. Developers may run applications that make large numbers of connections or that don't shut down connections when they are done. Therefore, the first thing to do is to analyze what kind of clients connect to your server.

 

Exchange System Manager (ESM) will help you do this analysis. Each database displayed in ESM has a Logons page that lists the number of connections per logon, along with much other useful information.

 

You can get even more detailed information, including the name of each client process, by running the Exchange Server User Monitor (EXMon), which can be downloaded here:

 

http://www.microsoft.com/technet/prodtechnol/exchange/downloads/2003/tools.mspx

 

After you have inventoried the connections being made, you are ready to consider the following actions to reduce the number of connections:

 

  • Restrict unauthorized clients and applications. 
  • Remove the Public Information Store from the server and direct clients to public folders on a different server. This eliminates public folder connections made by clients.

 

  • Remove specific public folders that account for large numbers of client connections. Good candidates here are the Schedule+ Free/Busy folder and the Offline Address Book. Clients must make additional connections to these folders when scheduling appointments or downloading the address book.

 

  • Add replicas of heavily accessed public folders to distribute the number of clients who connect to them between multiple servers.

 

  • Install dedicated public folder servers to eliminate all public folder connections from mailbox servers.

 

  • Distribute heavy connection users evenly across multiple servers. Heavy connection users are likely to be those with multiple computers or devices and field and mobile users.

 

  • Distribute users with large security tokens across multiple servers.

 

What is Microsoft doing to help with this problem?

 

Microsoft has made several tools and scripts available to help administrators manage and monitor kernel memory usage. A new sample script will soon be available that can scan Active Directory user objects and report how many groups each user account belongs to. When published, this script will be available in the following Microsoft Knowledge Base article. We will also publish the script on this blog site within next few days.

 

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

 

By knowing the number of groups each user belongs to, you can estimate how large user tokens are likely to be, and judge how close you are to a line where token size will suddenly jump by another 4K.

 

The configuration file for the Exchange Best Practices Analyzer (ExBPA) has been updated recently and now detects many problematic hardware configurations. You can download ExBPA here.

 

http://www.microsoft.com/technet/prodtechnol/exchange/downloads/2003/analyzers/default.mspx

 

ExBPA is updated frequently to detect new issues and environments and to make recommendations to Exchange administrators for dealing with them. Each time you run ExBPA, it can check for new configurations and versions, and automatically update itself. Running ExBPA on a regular schedule gives you immediate and automatic access to the latest best practices for Exchange configuration.

 

The ultimate solution for these issues is to move to a 64-bit platform. The situation is similar to that which existed when the 16-bit DOS operating system was nearing the end of its life. Making even marginal improvements in memory management became important. While careful memory optimization on the 32-bit platform can improve scalability significantly, it cannot entirely overcome the fundamental problem of the 32-bit limit.

 

The next version of Exchange will be 64-bit. Until that version is available, Microsoft will continue to provide guidance and optimizations for maximizing the scalability of Exchange running in a 32-bit memory space.

 

Tuesday, December 27, 2005

Introducing the Microsoft Exchange Server Profile Analyzer

Posted on http://blogs.technet.com/exchange/archive/2005/12/27/416524.aspx ...

Included in this month’s Exchange Tools Web release (direct link) is a new analysis tool called the Microsoft Exchange Server Profile Analyzer Tool (or EPA). We created this tool to help server administrators understand their user profile to help with the process of server sizing or capacity planning. A user profile describes how many actions an average user performs in an average day. When we refer to actions, we are talking about things that a user would do within an e-mail client application like send mail, delete mail, browse folder, etc. The EPA tool attempts to use whatever information is available in user mailboxes to generate an estimated profile, and depending on the characteristics of your users, the estimated profile may not be very accurate (for example, if messages are frequently deleted from the Sent Items folder, EPA will not generate accurate sent message statistics). For those of you who have worked with older versions of Exchange and Outlook, the EPA tool is building a profile in a similar way to the storstat.exe tool.

This package includes three separate tools:

  • EPA (available as EPAWin.exe and EPACmd.exe) is designed to generate a user profile based on the contents of user mailboxes.
  • EPAOWA is designed to generate a user profile by analyzing OWA log files
  • EPASummarizer is an assistant tool for EPA that can combine output files from EPA to summarize statistics across multiple data collections.  

This article will focus specifically on the EPA tool. We will explain how it gathers data, what data it gathers, and specific requirements for running the tool successfully.

 

The major steps that EPA takes to collect data are:

 

Step 1:Load topology from Active Directory. EPA reads Exchange configuration data such as organization, server, storage group, private mailbox store, and http virtual server from AD. This means that the account that runs EPA is required to have the ability to read Exchange configuration data from AD. In the GUI version of EPA (EPAWin.exe), you will see a tree view of the topology once this step is complete.

 

Step 2:Scan HTTP virtual server and virtual directory configuration for each server. For each http virtual server found on the server, EPA reads configuration information from the IIS metabase for two attributes: running state and SSL accessibility. For each virtual server, EPA maintains a list of mailbox virtual directory access links. The format of the link looks like this: http(s)://servername(:portnumber)/virtualdirectoryname/.

For a particular virtual server:

  • If EPA detects its state as not running, EPA will ignore it.
  • If EPA fails to read the running state, EPA assumes the virtual server is running.
  • If EPA reads that SSL is not enabled, for each mailbox virtual directory found on the virtual server, EPA adds a corresponding “http://” link to the list
  • If EPA reads that SSL is enabled, for each mailbox virtual directory found on the virtual server, EPA adds a corresponding “https://” link to the list
  • If EPA fails to read the SSL attribute, EPA adds two entries of this virtual server to the list. One assumes the SSL is enabled (https://), and the other does not (http://).

At the end, EPA sorts the list to put “https://” links on the top so that we will always attempt to use encrypted connections if they are available. When EPA moves on to Step 4 to collect data from each user mailbox, it will attempt to use each link in the list until it finds one that works. EPA will attempt to match the configured SMTP domain of a virtual server with each user’s SMTP domains to facilitate hosted Exchange scenarios.

 

You may notice that this step would require the account that runs EPA to have access to IIS metabase. If you don’t have access to the IIS metabase, EPA will make some assumptions about your configuration that should allow it to run under most circumstances, however you may see some error messages reported in the log if metabase access is not available. 

 

Step 3:For each server and mailbox store we found in the topology, EPA determines whether or not they will be included in the data collection stage based on configuration input,

 

Step 4:Data collection. Based on user’s configuration of the ServerThread and MailboxThreadPerServer attributes in the configuration file, EPA creates single/multiple working threads for data collection. If ServerThread is configured to 1 (which is the default setting), EPA will collect data sequentially on servers. Otherwise, it will create multiple threads for servers, and starts to collect data from multiple servers at the same time. Similar logic applies to MailboxThreadPerServer. The mailbox thread is the actual thread that is doing the data collection from a single mailbox (see the section below for the details of this function). After each mailbox is processed, the statistics generated from the collected data will be summarized to the parent mailbox store. The collection process for a mailbox store is done when all the mailboxes in the store are processed. The statistics for the server level are calculated when the collections for all the mailbox stores on the server are done. Similarly, the statistics at the organization level will be calculated when the collections on all the servers are finished.

 

How EPA collects data from single mailbox

 

EPA accesses items in user’s mailbox by using HTTP/Web Distributed Authoring and Versioning (WebDAV). This requires that the account that runs EPA has to have Full Mailbox Access. Note that EPA only supports Integrated Windows Authentication (NTLM) authentication at this time. If your server does not have Integrated Windows Authentication enabled for HTTP virtual servers, EPA will fail to collect data. EPA will also fail if HTTP virtual servers on back-end mailbox servers have OWA FBA (Forms-Based Authentication) enabled.

 

The primary WebDAV methodsthat EPA uses are SEARCH, PROPFIND, BPROPFIND and X-MS-ENUMATTS. The SEARCH method is used to get the hierarchy table and content table from a folder. To get the actual properties of a folder or of a message item, EPA uses the PROPFIND and BPROPFIND methods. X-MS-ENUMATTS is used to get the attachment table from a message item.  Table 1 shows the sets of properties that EPA reads for different types of store objects such as folder, message, attachment and appointment using WebDAV.  Table 2 shows a list of collectors EPA calculates based on the properties listed in Table 1.

 

 

Table 1: Properties EPA reads by using WebDAV

Property Name

Namespace

Root Mailbox Folder

contacts

urn:schemas:httpmail:

calendar

urn:schemas:httpmail:

deleteditems

urn:schemas:httpmail:

drafts

urn:schemas:httpmail:

inbox

urn:schemas:httpmail:

outbox

urn:schemas:httpmail:

sentitems

urn:schemas:httpmail:

tasks

urn:schemas:httpmail:

notes

urn:schemas:httpmail:

journal

urn:schemas:httpmail:

MsgFolderRootURI

urn:schemas:httpmail:

Folder Properties

href

DAV:

displayname

DAV:

childcount

DAV:

objectcount

DAV:

haschildren

DAV:

hassubs

DAV:

creationdate

DAV:

foldersize

http://schemas.microsoft.com/exchange/

0x0FFF0102 (EntryID)

http://schemas.microsoft.com/mapi/proptag/

0x0e080003 (Size)

http://schemas.microsoft.com/mapi/proptag/

0x36010003 (FolderType)

http://schemas.microsoft.com/mapi/proptag/

0x663A000B (HasRules)

http://schemas.microsoft.com/mapi/proptag/

Message Properties

href

DAV:

creationdate

DAV:

contentclass

DAV:

subject

urn:schemas:mailheader:

to

urn:schemas:mailheader:

cc

urn:schemas:mailheader:

bcc

urn:schemas:mailheader:

hasattachment

urn:schemas:httpmail:

read

urn:schemas:httpmail:

htmldescription

urn:schemas:httpmail

outlookmessageclass

http://schemas.microsoft.com/exchange/

0x0e060040 (DeliveryTime)

http://schemas.microsoft.com/mapi/proptag/

0x0e080003 (Size)

http://schemas.microsoft.com/mapi/proptag/

Attachment Properties

0x3703001f (Extension)

http://schemas.microsoft.com/mapi/proptag/

0x0e200003 (AttachmentSize)

http://schemas.microsoft.com/mapi/proptag/

0x3704001f (AttachmentName)

http://schemas.microsoft.com/mapi/proptag/

Appointment Properties

dtstart

urn:schemas:calendar:

Note: Please refer to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_webdav_x-ms-enumatts.asp for a complete list of supported WebDAV properties and detailed descriptions of the data containined within the properties listed above.

 

 

 

Table 2: Exchange Server Profile Analyzer Data Collectors

Collector Name

Description

MailboxTotalSize

The total size, in bytes, of the mailbox

RulesTotalCount

Total number of rules defined in the mailbox

FolderTotalCount

Total number of visible folders in the mailbox

FolderMaxMessageCount

Maximum number of messages in any one folder

FolderTopLevelCount

Number of visible folders in the mailbox

FolderUserCreatedTopLevelCount

Number of user created folders that are direct children of the root of the mailbox

SearchFolderCount

Number of search folders in the current mailbox

FolderHierarchyHeight

The height of the folder tree

FolderTopLevelAverageSubfolders

Average number of children each child of the folder tree root has.

FolderTopLevelAverageHeight

Average height of each of the root folder’s children's subtrees.

FolderSize

Size in bytes of all the messages in a folder (takes list of folders to measure, e.g. "Inbox, Deleted Items, Sent Items")

FolderSizeAggregates

Folder size statistics (across all folders in mailbox) - provides Avg, Min, Max.

MessageMailboxCount

Number of messages in the mailbox

MessageFolderCount

Number of messages in a folder (takes a list of folders to measure, e.g. ("Inbox","Deleted Items","Sent Items")

MessageUnreadCount

Number of messages that are unread

MessageDAMCount

Number of Deferred Action Messages in the mailbox

MessageReplyCount

Number of messages where the subject prefix is "RE:" or equivalent subject prefix for the given culture

MessageForwardCount

Number of messages where the subject prefix is "FW:" or equivalent subject prefix for the given culture

MessageContainsAtLeastOneDLCount

Number of messages containing at least 1 distribution list in the recipients table

MessageContainsAtLeastOneAttachmentCount

Number of messages containing at least 1 attachment

MessageSizeDistribution

Counts messages in a size range (takes a list of ranges, e.g. "2,10,100,1024" would provide counts of messages from 0-2,2-10,10-100,100-1024,1024-beyond)

MessageSizeAggregates

Message size statistics across all messages (provides Avg,Min,Max)

MessageReceivedPerDayAggregates

Average number of messages received per day (provides Avg,Min,Max, and can restrict to the last N days)

MessageSentPerDayAggregates

Average number of rows in each sub table when the sent items folder is categorized by date (provides Avg,Min,Max and can restrict to last N days)

MessageRepliesSentPerDayAggregate

Average number of messages prefixed with "RE:" sent per day (provides Avg,Min,Max and can restrict to last N days)

MessageForwardsSentPerDayAggregates

Average number of messages prefixed with "FW:" sent per day (provides Avg,Min,Max and can restrict to last N days)

MessageBodyTypesCount

Number of messages in each body type requested (takes list of body types as input, e.g. "RTF,HTML,Other")

RecipientsPerMessageSentAggregates

Average number of recipients of each message in the Sent Items folder

RecipientsDLPerMessageSentAggregates

Average number of distribution list recipients of each message in the Sent Items folder

AttachmentSizeAggregates

Attachment size statistics across all attachments (provides Avg,Min,Max)

AttachmentSizeDistribution

Counts attachments in specified size ranges (takes a range list of inputs, e.g. "2,10,100,1024" provides counts for ranges 0-2,2-10,10-100,100-1024,1024-up)

AttachmentPerMessageAggregates

Statistics on number of attachments per message (provides Avg,Min,Max)

ContactCount

Number of contacts in the mailbox

ContactCreatedPerDay

Number of contacts created per day (provides Avg,Min,Max, can be restricted to last N days)

AppointmentCount

Number of appointments in the calendar

AppointmentCreatedPerDay

Number of appointments created per day (provides Avg,Min,Max, can be restricted to last N days)

MeetingRequestCount

Number of meeting requests in the calendar.

MeetingRequestReceivedPerDayAggregates

Statistics on number of meeting requestes received per day (provides Avg,Min,Max, can be restricted to last N days)

 

 

We want to hear from you! Feel free to send your feedback on this tool directly to epafb AT microsoft DOT com and we will use your input to help make future versions of this tool even better. 

 

Frequently Asked Questions

Question: EPA reports CompletedWithException. Where can I find what exceptions occurred during the data collection process?
Answer:  EPA reports exception information exceptions in a log file. The default log file will be located at the user's application data path. For example, C:\Documents and Settings\<username>\Application
Data\Microsoft\Epa\epalogYYYYMMDD_HHMMSS.log

Question:  Error: Unable to connect to Active Directory. Please make sure that the user account has enough permission.
   Error: Unable to check the state of HTTP virtual server 1 on ServerName.
   Error: Unknown error (0x80005000) 
Answer:  The errors are reported because the account that runs EPA does not have permission to read IIS metabase. The error code may vary. EPA will continue to attempt to collect data from user mailboxes by making some assumptions about the configuration of your Exchange topology. See "Step 2" described above for details.
 

Question: Error: Unable to find an available URI for user ServerName\MDBName\Mailbox x.
Answer: The error is reported for two reasons normally. 
   1. No HTTP virtual server is running.
   2. For each HTTP virtual server on the exchange server, SMTP domain of the virtual server does not match with user's SMTP domains. 

Question: Error: User ServerName\MDBName\Mailbox x cannot access any of the following links:http://ServerName/Exchange/.
Answer: The error will come up in the following five cases. 
      1. The account that runs EPA does not have full mailbox access on the user's mailbox. This can be verified through Exchange System Manager. Please see the EPA documentation for details on how to configure and verify permissions.  If the account does have full mailbox access rights, then try using Internet Explorer to access the user's mailbox with OWA. If you are not able to access the mailbox with OWA, EPA will not be able to access it either. 
      2. The authentication methods configured on the virtual directory do not include Integrated Windows Authentication which is the only method EPA supports. 
      3. There are restrictions set up on the Exchange Server that restrict TCP/IP traffic in some way so that HTTP or HTTPS traffic from the machine you are running EPA on is blocked. You can work around this by running EPA on a machine that has the ability to connect with the back-end Exchange Server (such as an Exchange front-end server).
      4. When SSL is required on the server and the name on the SSL certificate does not match the name that EPA is using to access the server, EPA will fail due to SSL certificate validation errors.  We will have a fix for this in next Web Release. 
      5. When OWA Forms-Based Authentication is enabled on the HTTP virtual server, EPA will fail since the DAV requests submitted by EPA will get "440 Login Timeout" error. This is similar to
http://support.microsoft.com/default.aspx?scid=kb;en-us;817379 . We plan to provide better feedback for this case in the next web release version.

If these troubleshooting suggestions don't solve your EPA problems, please contact epa@microsoft.com for further investigation.