Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


August 2007

An Unlikely Culprit Can Cause Computers to Hang


RSS
Subscribe to Windows IT Pro | See More Tips Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Executive Summary:
The Windows Indexing Service can help you quickly search through files, but problems can arise that can make Windows XP Professional and other Windows operating systems sluggish and even hang. The Microsoft Management Console (MMC) Indexing Service snap-in can help you troubleshoot the problem. Microsoft Customer Service and Support (CSS) offers three solutions if the problem lies with master merges.


In my Reader To Reader article "Create an MMC Snap-In for Searching PDF Files" (March 2007, InstantDoc ID 94950), I expounded on the virtues of using Windows' Indexing Service to quickly search through mounds of files, including .pdf, .doc, .mht, .html, and .txt files. I might have jinxed myself because after I wrote that article, I began experiencing performance problems on my Windows XP Professional machine, which currently indexes about 6,700 files. When I attempted to open Microsoft Office files from the Windows desktop or Windows Explorer, my computer would sometimes hang for two to three minutes. (Interestingly, the computer didn't hang when I opened files from their native applications, such as Microsoft Word or Microsoft Excel.) The computer would also hang when I tried to do a file search from within Windows Explorer. However, I found that if I stopped the Indexing Service, my computer didn't hang. Leaving the Indexing Service disabled wasn't an option for me, so I'd restart the Indexing Service. Shortly thereafter (sometimes as soon as an hour later), my computer would start hanging again.

I used the custom Microsoft Management Console (MMC) snap-in that I created (see "Create an MMC Snap-In for Searching PDF Files") to monitor activities within the Indexing Service. The Indexing Service is supposed to throttle back when you're using the computer, but I noticed that when my computer was hanging, not all of the Indexing Service catalogs were in the Paused, User Activity state.

To correct the problem, I attempted to tune the Indexing Service through the MMC Indexing Service snap-in. After stopping the Indexing Service, I right-clicked Indexing Service on Local Machine, chose All Tasks, then selected Tune Performance. In the Indexing Service Usage dialog box, I selected the Used Occasionally option, which sets indexing to Lazy and querying to Low load. After closing the Indexing Service snap-in, I restarted the Indexing Service. It wasn't long before I discovered that this change didn't stop my machine from hanging.

I decided to dig a little deeper into how the Indexing Service works. I learned that the service creates temporary working catalogs as part of its normal daily operations. A temporary working catalog consists of word lists and saved indexes. When the Indexing Service indexes a document, the index information first goes into a temporary word list. When the Indexing Service stores an index on disk, it's placed in a temporary saved index. Periodically, the Indexing Service merges each catalog's word lists and stored indexes into a permanent master index, after which it deletes all the word lists and deletes all but one of the stored indexes.

You can see how many words lists and saved indexes exist for a catalog at any point in time by clicking Indexing Service on Local Machine in the Indexing Service snap-in and looking at the Word Lists and Saved Indexes columns, which Figure 1 shows, in the catalog summary in the right pane. In Figure 1, note the zeros in the third catalog's Word Lists and Saved Indexes columns. If you set a particular catalog's Include in Index? option to No, these columns will always contain zeros.

After periodically checking the catalog summary for several days, I noticed that the number of word lists and saved indexes for my various catalogs never went down but rather increased each day. Apparently, the word lists and stored indexes weren't being merged into master indexes.

As an interim solution, I forced each catalog to do a master merge by opening the Indexing Service snap-in, right-clicking a catalog, then selecting All Tasks, Merge. After a short period of time, the numbers in the Word Lists column dropped to zero and the numbers in the Saved Indexes column dropped to one, as Figure 2 shows. More important, my computer didn't hang any more.

To permanently fix the hanging problem, I had to determine why my catalogs weren't getting a master merge. An investigation led me to the Main Registry Entries Web page (http://msdn2.microsoft.com/enus/library/ms692119.aspx), which is part of the Indexing Service section in the Platform SDK. From this Web page, I learned about a registry entry named MasterMerge-Time, which is under the HKEY_ LOCAL_MACHINE\SYSTEM\ CurrentControlSet\Control\ContentIndex key. The MasterMergeTime entry's value specifies the time (represented as the number of minutes after midnight) at which a master merge will occur. The range of values is 0 through 1439. The default value is 0, which means that the master merge will occur exactly at midnight.

After I read about the MasterMergeTime entry, I had my suspicion about what might be wrong. When I checked with Microsoft Customer Service and Support (CSS), a support engineer confirmed my suspicion: If a machine isn't powered up when the master merge is scheduled to take place, the master merge won't occur. In addition, the support engineer told me that master merges also automatically occur after a certain number of documents have been indexed and when disk space gets low. And as the number of word lists and saved indexes increase, the computer's performance degrades.

The support engineer noted that I had three options to stop my machine from hanging:

  • Disable the Indexing Service.

  • Change the MasterMergeTime value to a time of day when the machine is powered up and can handle the extra CPU overhead brought about by the master merge.

  • Manually force a master merge for each catalog at regular intervals.

Disabling the Indexing Service wasn't an option for me. Manually forcing master merges for each catalog would be too time-consuming. So, I opted to change the MasterMergeTime value. Since I changed the value to a time of day when the PC is running but idle, I haven't had any more problems with my machine hanging because of the Indexing Service.

I also learned one other helpful tip from the support engineer. By default, XP Pro creates catalog indexes for two locations: the My Documents folder and the default IIS site. Typically, the catalog for the My Documents folder is at C:\System Volume Information\catalog.wci, whereas the catalog for the IIS site is at C:\Inetpub\ catalog.wci. If you want to run the Indexing Service because you need it for some special directories you have, but you don't need the ability to search the My Documents folder and the default IIS site for text strings, you can take one of two actions:

  • Not recommended: In the Indexing Service snap-in, delete the catalogs for the default locations.

  • Recommended: In the Indexing Service snapin, expand the catalog's Directories folder in the left pane. In the right pane, double-click each directory, which brings up a dialog box that has the odd name of Add Directory. In this dialog box, change the Include in Index? option from Yes to No. If you want to recover disk space after this change, you can force a master merge on that particular catalog. Note that although you can stop the indexing of a particular catalog by right-clicking the catalog in the left pane and selecting Stop, this action only temporarily stops the indexing. The indexing of that catalog will resume the next time the Indexing Service is started manually or the machine boots up (assuming the Indexing Service is set to the default startup setting of Automatic).

If your computer hangs or has other performance problems when you're opening or searching for files, you might want to use the Indexing Service snap-in to monitor your catalogs. If the numbers in the Word Lists and Saved Indexes columns for your catalogs never go down, you likely have a problem with master merges.
—Bret Bennett, President, BRET A. BENNETT

See Associated Figure

End of Article



Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...

More fun TechEd 2005 Resources

Kevin points out some more TechEd resources ...

Outlook Tips and Techniques

Read about hiding items, merging appointments, multiple windows, creating views, permissions, sending Outlook items to outside recipients, Send As permission, Inbox Assistant, tricks for rules, and tips for obtaining Microsoft Knowledge Base articles. ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Are You Satisfied?

A Preliminary Look at Deployment Plans for Microsoft Windows Vista

Related Events Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Microsoft Exchange & Windows Connections event returns to Las Vegas Nov 10 - 13
Connections returns to Las Vegas for this exciting event where each attendee will receive SQL Server 2008 standard with 1 CAL. Co-located with Microsoft ASP.NET, SQL Server, and SharePoint Connections with over 250 in-depth sessions.

Free Online Event! Virtualization:Get the Facts!
Register now and attend this free, live in-depth online conference on November 13 and 20, 2008, produced by Windows IT Pro. All registrants are eligible to receive a complimentary one-year digital subscription to Windows IT Pro (a $49.95 value)!

Check Out Hyper-V Video on ITTV
Watch Karen Forster's interview on Hyper-V's performance on ITTV.net.

Ease Your Scripting Pains with the Flexibility of PowerShell!
Join MVP Paul Robichaux on December 11, 2008 at 11:00 AM EDT as he equips you with PowerShell basics in 3 introductory lessons, each followed by a live Q&A session—all on your own computer!

PASS Community Summit 2008 in Seattle on Nov 18-21
The don’t-miss event for Microsoft SQL Server Professionals. Register now and you’ll enjoy top-notch Microsoft and Community speakers and more.



Solving PST Management Problems
In this white paper, read about the top PST issues and how to administer local/network PST Files.

Get Protected -- Data Protection Manager 2007
Protect your virtualized environment with Data Protection Manager

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing