<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>SharePoint Strategery</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/sharepoint_strategery/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/sharepoint_strategery/feed.xml</link>
    <description>Best used when *strategy* breaks down... (blog by Brian Pendergrass, Microsoft SharePoint - Premier Field Engineer)</description>
    <lastBuildDate>Fri, 19 Jan 2018 22:51:22 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Reasons to do a full crawl (*and it's not for schema changes)</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_strategery/reasons-to-do-a-full-crawl-and-its-not-for-schema-changes</link>
      <pubDate>Wed, 06 Dec 2017 17:04:03 GMT</pubDate>
      <dc:creator><![CDATA[bspender]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sharepoint_strategery/?p=835</guid>
      <description><![CDATA[To avoid burying the lede, I'll start by "boldly" saying...
*You don't need to regularly schedule a...]]></description>
      <content:encoded><![CDATA[To avoid burying the lede, I'll start by "boldly" saying...
<span style="color: #000080"><span style="color: #00ccff">*</span><em>You don't need to regularly schedule a full crawl for SharePoint Search </em></span>

I've been at this long enough to realize that someone likely has an exception to this - but I truly cannot think of a reason to schedule full crawls (especially for SharePoint content). In fact, you generally do not need to run them at all outside of the few/specific reasons provided here in TechNet:
<p style="text-align: left;padding-left: 30px"><strong>Reasons to do a full crawl</strong>
<a href="https://technet.microsoft.com/en-us/library/4356bad9-de1d-4e81-b049-17248b4a86c1#Plan_full_crawl">https://technet.microsoft.com/en-us/library/4356bad9-de1d-4e81-b049-17248b4a86c1#Plan_full_crawl</a></p>
Most of these reasons are straightforward (e.g. the SSA or content source is new). However, the following reason in particular is commonly misunderstood (and drives the most common objection I hear when recommending customers avoid scheduling a full crawl):
<ul>
 	<li><span style="color: #ff6600">A Search service application administrator or site collection administrator added or changed a managed property. A full crawl of <span style="color: #808080">all affected content sources is required</span> for the new or changed managed property to take effect.</span></li>
</ul>
I feel this reason could be more accurately stated as:
<ul>
 	<li>A Search service application administrator or site collection administrator added or changed a managed property. A full crawl of <span style="color: #339966"><strong>all affected content</strong> </span><span style="text-decoration: line-through;color: #999999">sources</span> is required for the new or changed managed property to take effect.
<ul>
 	<li>If this added/changed managed property impacts a very broad or global scope (such as the Title or Author managed property), a full crawl of the entire content source(s) may be required</li>
 	<li>However, if the added/changed managed property only impacts a smaller subset of content (e.g. a site collection or list/library), then only a full crawl of that subset requires the full crawl
<ul>
 	<li>In SharePoint 2013/2016 and SharePoint Online, this can be achieved with the “<em>Reindex this site</em>” or “<em>Reindex this list/library</em>” functionality <a href="https://support.office.com/en-us/article/Manually-request-crawling-and-re-indexing-of-a-site-a-library-or-a-list-9AFA977D-39DE-4321-B4CA-8C7C7E6D264E">as described here</a></li>
</ul>
</li>
</ul>
</li>
</ul>
In other words, the schema defines how an item gets stamped out when submitted to the Search index. Keep in mind, when a item gets written to the index, the item will only contain managed properties that have a value (if the MP is blank for an item, that item in the index will not contain any reference to this MP).

Let's say for example that a managed property mappings were updated to a crawled property for a column that only exists in a single library. If, after making this schema change, you started a full crawl, then only items in this library would get impacted by this schema change (*and all other items that did not have a value for this MP would also get crawled, but would see no change). In this case, the full crawl would generate a lot of load (e.g. crawling everything) just to update the relatively few items from that library. The same outcome could be achieved (after making the schema change) with MUCH less impact by setting this impacted library to be reindexed and starting an incremental.

I hope this helps...

----

(<span style="color: #00ccff">*</span>Hopefully this is self-obvious, but I assume that incremental and/or continuous crawls have been scheduled)]]></content:encoded>
    </item>
    <item>
      <title>Crawler Performance, Hosts, and Impact [Hit] Rules</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_strategery/crawler-performance-hosts-and-impact-hit-rules</link>
      <pubDate>Mon, 12 Jun 2017 12:06:24 GMT</pubDate>
      <dc:creator><![CDATA[bspender]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sharepoint_strategery/?p=795</guid>
      <description><![CDATA[As part of the crawl processing flow, the Crawl Component starts "robot" threads that orchestrate...]]></description>
      <content:encoded><![CDATA[As part of the crawl processing flow, the Crawl Component starts "robot" threads that orchestrate items from gathering to feeding and finally committing their final state (see <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/01/26/sp2013-crawling-explained-orchestration-part-1/">this previous post on Crawl Orchestration</a> for more details and an illustration of that flow). In this post, we focus more on the "robot" threads, Crawler impact rules, and the performance implications.

<a href="https://msdnshared.blob.core.windows.net/media/2017/06/RobotThreads.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/06/RobotThreads.png" alt="" class="alignnone wp-image-825" height="339" width="607" /></a>

SharePoint provides some farm-wide Search settings including one named <em>PerformanceLevel</em> that (from <a href="https://technet.microsoft.com/en-us/library/ff608126.aspx">TechNet for the cmdlet Set-SPEnterpriseSearchService</a>) "[s]pecifies the relative number of [robot] threads for the crawl component performance. The type must be one of the following values: <em>Reduced</em>, <em>PartlyReduced</em>, or <em>Maximum</em> (The default value is <em>Maximum)</em>", where:<em>
</em>
<ul>
 	<li><strong>Reduced</strong>: Total number of threads = number of processors, Max Threads/host = number of processors.</li>
 	<li><strong>Partly Reduced</strong>: Total number of threads = 16 times the number of processors , Max Threads/host = 8 plus the number of processors. Threads are assigned <strong>Below Normal</strong> priority.</li>
 	<li><strong>Maximum</strong>: Total number of threads = 32 times the number of processors, Max Threads/host = 8 plus the number of processors. Threads are assigned <strong>Normal</strong> priority.</li>
</ul>
<p style="padding-left: 30px"><span style="color: #ff6600"><strong>*Side note:</strong></span> Although no longer documented, a single Crawl Component can only start a maximum of 256 threads regardless of how many CPU cores the server possesses.</p>
Or more simply, the number of CPU cores and the <em>PerformanceLevel</em> determines the total number of threads that a single Crawler can create (e.g. the upper bound of threads for a given Crawler). This also defines the default Crawler Impact rule for each host being crawled (e.g. "Max Threads/host"). For example, assuming a Crawl server with 4 CPU cores, the Crawler can create up to 12 threads for a given host being crawled. In this same environment, you can also create specific Crawler Impact rules to increase or decrease the number of threads allowed for a given host.

<a href="https://msdnshared.blob.core.windows.net/media/2017/06/CrawlerImpactHitRules.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/06/CrawlerImpactHitRules-1024x572.png" alt="" class="alignnone size-large wp-image-805" height="572" width="1024" /></a>

When talking crawl health and performance, <strong>the number of hosts being crawled</strong> at any given time plays a huge roll in the load generated by the Crawler because this will directly influence the number of threads created at any given time. In other words, the more hosts (e.g. start addresses) you crawl concurrently, the more resources the Crawl Component(s) will consume...
<ul>
 	<li><strong>First, for a bit of clarity:</strong> "host" in this blog post refers to the domain portion of a URL and should not be confused with the underlying servers <em>hosting </em>a web site.
<ul>
 	<li>For example, assume I have one web application (e.g. https://foo.url.com) that is load balanced across ten SharePoint servers.</li>
 	<li>From the Crawler perspective, <strong>I only have one host</strong> ("foo.url.com") being crawled in this example.</li>
</ul>
</li>
</ul>
Next, as an exaggerated example, assume an environment with one crawl component and we want to crawl…
<ul>
 	<li>1 web application with 10 million items</li>
 	<li>Versus 100 web applications each with 100,000 items</li>
</ul>
Even though both cases are 10 million items to be crawled, <span style="color: #ff6600"><strong>the Crawl Component will consume SIGNIFICANTLY more resources</strong></span> for the second scenario than the first because the first scenario is effectively capped by the “max threads per host” limit defined by the <em>PerformanceLevel </em>(or by individual crawler impact rules). In other words, the Crawler would only allocate 12 threads (*assuming a 4 core server) for the first web application but saturate all available threads in the second example (e.g. 100 hosts * 12 threads)
<ul>
 	<li>Keep in mind that this exaggerated scenario is quite feasible with Host Named Site Collections where each site collection is a unique host.</li>
</ul>
The point above may become a problem when you have the <strong>Admin Component running on the Crawl Component</strong>, the <strong><em>PerformanceLevel</em> is Maximum</strong> *(in which case, the crawler’s robot threads are started with a <em>normal</em> thread priority …which is higher than the threads for the Admin Component), and you are <strong>crawling many, many hosts</strong> concurrently
<ul>
 	<li>In this case, the Crawl Component dominates the resources on the server</li>
 	<li>And this may prevent [the Generation Controller in] the Admin Component from committing generations across the Index replicas in a timely fashion (which would show in the "Content Processing Activity" chart as <em>Indexing</em> time</li>
 	<li>Which in turn, slows down crawls and commonly results in Index replicas getting out of sync.</li>
</ul>
And same goes for the Indexer... because the Crawl Component can be so heavy handed when crawling as described above, I would also generally recommend NOT putting them on the same server as an Indexer (and this advice is echoed in almost any of the TechNet documentation talking about Search performance and/or scaling)

-----
<strong>Workaround to minimize the impact of the Crawler:</strong>

When the Crawl Component is running with other components (especially when crawling a lot of hosts concurrently), you should consider setting <span style="color: #00ccff">(Get-SPEnterpriseSearchService).PerformanceLevel </span>to “PartlyReduced” to help prevent the Crawler from dominating all resources on this server...
<ul>
 	<li>With the default “<em>Maximum</em>” setting, the threads started by the Crawl component run with <em>Normal</em> priority (i.e. <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms685100(v=vs.85).aspx">CPU thread scheduling priority</a> : THREAD_PRIORITY_NORMAL)
<ul>
 	<li>Have you ever had a Crawl server that was too busy to remote into during a crawl? If the Crawler was running with "Maximum" (meaning, threads with Normal priority), the remote desktop session was most likely not able to preempt the crawl threads and thus not getting sufficient CPU cycles for your remote session</li>
 	<li>With “<em>PartlyReduced</em>” and “<em>Reduced</em>”, the threads are started with <em>Below Normal</em> CPU thread prioritization</li>
</ul>
</li>
</ul>
And, if crawling a lot of start address hosts, then you should also consider setting crawler impact rules, too. I typically recommend a prioritization of each start address (e.g. the “hosts” being crawled) where:
<ul>
 	<li>High priority content is allowed to use the default number of threads (*which is the number of physical CPU cores + 8)</li>
 	<li>The normal priority content is something less…</li>
 	<li>And any know-to-be-slow content sources (think: file share in another geography), set a crawler impact rule of just 1 or 2</li>
</ul>
-----
<strong>Other things to consider for Crawl performance </strong>(but not directly related to Crawler Impact rules)
<ul>
 	<li>Gigantic Index schema can also have a really big [negative] impact to Search performance (particularly to crawl performance)</li>
 	<li>AV can wreck your performance:
<ul>
 	<li>See my post here: <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2016/04/27/search-performance-a-case-of-av-slowing-down-crawls/">https://blogs.msdn.microsoft.com/sharepoint_strategery/2016/04/27/search-performance-a-case-of-av-slowing-down-crawls/</a></li>
</ul>
</li>
 	<li>Insufficient disk space for the Indexers can lead to silent failures of the replicas…
<ul>
 	<li>This definitely impacts performance …and the longer this [silently] continues to fail, the worse the problem gets</li>
 	<li>Eventually, the only way out is to add more disk space or reset the index</li>
 	<li>See my post here: <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/07/08/sp2013-using-get-spindexreports-to-troubleshoot-failed-master-merge/">https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/07/08/sp2013-using-get-spindexreports-to-troubleshoot-failed-master-merge/</a>
<ul>
 	<li>For what it’s worth, I have an updated version of the script I reference in that post in our since created “Search Health Reports (SRx)” project which has a LOT of search troubleshooting tests</li>
 	<li>I need to get a recent version uploaded to the TechNet gallery, but I can get you a more recent copy if you are interested</li>
</ul>
</li>
</ul>
</li>
 	<li>When assessing the Crawl performance and looking for bottlenecks, I tend to start with the “Crawl Load” report
<ul>
 	<li>At Ignite 2015, I talked about this chart, too <a href="https://channel9.msdn.com/Events/Ignite/2015/BRK3176">(around the 47m 30s mark)</a></li>
 	<li>And recently blogged about this point <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2017/04/21/search-performance-troubleshooting-with-the-crawl-load-reports/">here</a>.</li>
</ul>
</li>
</ul>
I hope this helps...]]></content:encoded>
    </item>
    <item>
      <title>Search Performance: Troubleshooting with the Crawl Load reports</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_strategery/search-performance-troubleshooting-with-the-crawl-load-reports</link>
      <pubDate>Fri, 21 Apr 2017 11:35:57 GMT</pubDate>
      <dc:creator><![CDATA[bspender]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sharepoint_strategery/?p=785</guid>
      <description><![CDATA[Last year, I dove into a case of AV slowing down crawls and within that post, I provided guidance...]]></description>
      <content:encoded><![CDATA[Last year, I dove into <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2016/04/27/search-performance-a-case-of-av-slowing-down-crawls/">a case of AV slowing down crawls</a> and within that post, I provided guidance for leveraging the Crawl Load report to troubleshoot crawl performance. Since then, I've copied out that section into countless emails, so wanted to carve it out into its own blog post...

--I hope this helps...

------------------------------------
<h2>Follow the<span style="color: #999999"> <del>money</del> </span>crawl flow…</h2>
As we dive in, I will refer to <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/01/26/sp2013-crawling-explained-orchestration-part-1/">the following high level flow for a crawl</a> when describing a particular point of a crawl:

<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/41/metablogapi/8551.012615_1602_SP2013Crawl1.png" alt="" height="407" width="760" />

The <em>Crawl Load</em> report (found in Central Admin -&gt; Crawl Health Reports -&gt; in the Crawl Latency tab) illustrates the number of items being processed by the system at any a given moment in time, whereas the <em>Crawl Latency</em> chart (in the same tab, but presented under the <em>Crawl Load</em> chart) shows you the latency for various stages. <a href="https://channel9.msdn.com/Events/Ignite/2015/BRK3176">At Ignite (around the 47m 30s mark)</a>, I talked about the <em>Crawl Load</em> report and noted that I use it as my starting point when troubleshooting any crawl performance issue.

<a href="https://msdnshared.blob.core.windows.net/media/2016/04/crawlLoad-v-latency.png"><img class="alignnone wp-image-555" src="https://msdnshared.blob.core.windows.net/media/2016/04/crawlLoad-v-latency-1024x448.png" alt="crawlLoad-v-latency" height="350" width="800" /></a>

For the <em>Crawl Load</em>, I use the analogy of cars on the road. If you take an aerial photo of rush hour traffic, you would see a lot of cars on the road, but have no real measure of how fast each car is actually moving. Being said, if in that photo you could see that lots of cars where packing in between mile marker 10 and 11, then there was likely something between mile marker 11 and 12 causing a slow-down (e.g. all the cars on the road are backed up by some bottleneck further down the road).

This <em>Crawl Load</em> chart is similar in that we can see where the items are in the system as they are being processed. Although overly simplified, it may also help to think about this <em>Crawl Load</em> chart as an indicator of where the Crawl Component’s [gatherer, aka “robot”] threads are currently working (e.g. each thread is working on some batch of items at any given time, which is why the chart shows number of items in the Y axis instead of threads). To take out the previous analogy further, each car [thread] is moving a batch of people [items] down the road [crawl flow].

When a crawl is flowing well, you’d typically expect to see a roughly even split of items in the “In Crawler Queue” and “Submitted to CTS”. In other words, about half of the threads are busy gathering new items to process and the other half of threads are waiting for callbacks on items being processed.

However…

<a href="https://msdnshared.blob.core.windows.net/media/2016/04/backedupInPlugin.jpg"><img class="alignnone size-full wp-image-556" src="https://msdnshared.blob.core.windows.net/media/2016/04/backedupInPlugin.jpg" alt="backedupInPlugin" height="376" width="621" /></a>

…here we see the threads are mostly pooling in “Waiting in Content Plugin” (e.g. between <strong>steps 2b</strong> and <strong>3</strong> from the flow illustration above) and in “Submitted to CTS” (which means the threads are waiting on a callback until the processing in <strong>steps 3</strong> to <strong>6b</strong> completed). Going back to the traffic analogy again, we would expect to see corresponding bottlenecks somewhere <em>down the road</em>, which we can see using the “Content Processing Activity” report.]]></content:encoded>
    </item>
    <item>
      <title>Search Health Reports (SRx) - Digging in further with PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_strategery/search-health-reports-srx-digging-in-further-with-powershell</link>
      <pubDate>Mon, 06 Mar 2017 07:41:10 GMT</pubDate>
      <dc:creator><![CDATA[bspender]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sharepoint_strategery/?p=725</guid>
      <description><![CDATA[After introducing the Search Health Reports (SRx) last year, we continued to extend the battery of...]]></description>
      <content:encoded><![CDATA[After introducing <a href="https://gallery.technet.microsoft.com/SRx-Core-SharePoint-Search-d60113e9">the Search Health Reports (SRx)</a> last year, we continued to extend the battery of PowerShell tests for analyzing and troubleshooting a SharePoint 2013 and SharePoint 2016 on-premises search farm. Because most of these efforts resulted in new or improved tests, we largely suggested and recommended the <em>RunAllTests</em> report and <em>Indexer Disk</em> report to leverage the SRx in the vast majority of troubleshooting scenarios. However, sometimes you need (or simply want) to dig in a bit further and expose more detail about the Search system.

In this post, I want to share some of the most common building blocks - the lower level custom functionality - used within the tests and help uncover the richness built into the SRx. I encourage you to [download the SRx Core,] initialize the shell by running the <span style="color: #00ccff">.\initSRx.ps1 </span>script, and try out these in your environment... and let us know what you think.
<pre><span style="color: #008000">#Options when initializing SRx </span>
 <span style="color: #00ccff"><span style="color: #000000"><span style="color: #00ccff">.\initSRx.ps1</span> -SSA </span><span style="color: #993300">"Name-of-an-SSA"</span><span style="color: #008000">    # &gt; For handling multiple SSAs in a farm</span>
 </span><span style="color: #000000"><span style="color: #00ccff">.\initSRx.ps1</span> -Verbose </span><span style="color: #008000">                # &gt; Enables verbose logging in the console
 </span><span style="color: #000000"><span style="color: #00ccff">.\initSRx.ps1</span> -RebuildSRx</span><span style="color: #00ccff"><span style="color: #008000">              # &gt; Re-initializes the SRx shell, which
                                        #   rebuilds the $SRxEnv and $xSSA objects
                                        #   (e.g. useful after a topology change)</span>
</span></pre>
<pre><span style="color: #008000">#Run all tests with detailed output:</span> 
<strong><span style="color: #33cccc">New-SRxReport</span></strong><span style="color: #000000"> -RunAllTests -Details</span> 

<span style="color: #008000">#Run a specific test (in this case, "OSPingSearchServer") 
</span><strong><span style="color: #33cccc">New-SRxReport </span></strong><span style="color: #000000">-Test OSPingSearchServer</span> <span style="color: #00ccff"><span style="color: #008000"> 
    #Hint: After the <em>-Test</em> parameter, use &lt;tab&gt; key to iterate 
    #      through each test names or auto-complete a test name

</span></span><span style="color: #008000">#New-SRxReport acts as a wrapper for Test-SRx, which invokes a 
#PowerShell script with a corresponding name. For example: 
</span><span style="color: #33cccc"><strong>Test-SRx</strong> <span style="color: #000000">-Name OSPingSearchServer 
</span></span><span style="color: #008000"></span><span style="color: #008000">#Invokes: &lt;SRxPath&gt;\lib\tests\core\Test-OSPingSearchServer.ps1 </span><span style="color: #008000"> 

    # &gt; Test-SRx returns a "standardized" object, which can be 
    #   pipelined to other custom functionality 
    # &gt; New-SRxReport provides standardized formatting of the 
    #   output object from the test 

#To run all tests and generate an array of test result objects: 
<span style="color: #00ccff"><span style="color: #33cccc"><strong>Test-SRx</strong></span> <span style="color: #000000">-RunAllTests</span></span> </span></pre>
<pre><span style="color: #008000">#Detailed indexer reports...
</span><span style="color: #00ccff"><strong><span style="color: #33cccc">Get-SRxIndexReports</span> </strong><span style="color: #000000">-DiskReport</span></span></pre>
<pre><span style="color: #008000">#The extended and customized SSA Object ($xSSA)
</span><span style="color: #ff00ff">$xSSA</span> |<span style="color: #000000"> gm |</span><span style="color: #00ccff"><span style="color: #000000"> ?</span> </span>{<span style="color: #ff00ff">$_</span><span style="color: #000000">.Name -like </span><span style="color: #00ccff"><span style="color: #993300">"_*"</span></span>}    <span style="color: #008000">#In SRx, custom properties and methods appended 
                                       #to any out-of-the-box objects are named </span><span style="color: #008000">with an</span><span style="color: #008000">
                                       #underscore "_" as their prefix to differentiate</span></pre>
<pre><span style="color: #008000">#To get Search Servers details... </span><span style="color: #00ccff"><span style="color: #ff00ff"> 
 $xSSA</span><span style="color: #000000">._Servers </span></span>                       <span style="color: #008000"># &gt; An array of all search servers discovered</span><span style="color: #008000">
                                       #   during initialization of SRx, where each
                                       #   server is represented as a custom object</span>
<span style="color: #00ccff"><span style="color: #ff00ff">$xSSA</span><span style="color: #000000">._GetServer</span></span>(<span style="color: #00ccff"><span style="color: #993300">"-Name-of-Server-"</span></span>) <span style="color: #008000">  # &gt; Gets a specific server by name
</span><span style="color: #ff00ff">$xSSA</span><span style="color: #000000">._GetServerEx</span>(<span style="color: #993300">"-Name-of-Server-"</span>) <span style="color: #008000"># &gt; Similar to above, but returns an extended
                                       #   server object by fetching the applicable
                                       #   </span><span style="color: #008000">registry keys and system</span><span style="color: #008000"> properties (from
                                       #   Get-WMI for various classes)</span>

<span style="color: #008000">#--------------------------------</span> 
<span style="color: #008000">#Example of tools available for a specific server...</span><span style="color: #ff00ff"> 
 $server</span> = <span style="color: #ff00ff">$xSSA</span><span style="color: #000000">._GetServer</span>(<span style="color: #993300">"-Name-of-Server"</span>) <span style="color: #ff00ff"> 
 $server</span>.<span style="color: #000000">canPing(</span>)           <span style="color: #008000"># &gt; Wrapper: Test-Connection &lt;severname&gt;</span>
 <span style="color: #ff00ff">$server</span>.<span style="color: #000000">GetProcesses</span>()      <span style="color: #008000"># &gt; Under the covers, runs "Get-Process" with a list of</span> 
                             <span style="color: #008000">#   applicable Search processes (e.g. noderunner, mssearch)
 
 </span><span style="color: #ff00ff">$server</span> = <span style="color: #ff00ff">$xSSA</span><span style="color: #000000">._GetServerEx</span>(<span style="color: #993300">"-Name-of-Server"</span>) <span style="color: #ff00ff"> </span><span style="color: #008000">
</span> <span style="color: #ff00ff">$server</span> | <span style="color: #00ccff"><span style="color: #000000">gm</span>                <span style="color: #008000">#View the other extended properties and methods for this
</span></span></pre>
<pre><span style="color: #008000">#Topology Visualization...
 <span style="color: #ff00ff">$xSSA</span></span><span style="color: #000000">._ShowTopologyReport</span>()</pre>
<pre><span style="color: #008000">#Component fun...
 <span style="color: #ff00ff">$xSSA</span></span><span style="color: #000000">._GetCC</span>()<span style="color: #008000">       #Get the list of Crawl Components 
 <span style="color: #ff00ff">$xSSA</span></span><span style="color: #000000">._GetCPC</span>()<span style="color: #008000">      #Get the list of Content Processing Components 
 <span style="color: #ff00ff">$xSSA</span></span><span style="color: #000000">._GetAPC</span>()<span style="color: #008000">      #Get the list of Analytics Processing Components 
 <span style="color: #ff00ff">$xSSA</span></span><span style="color: #000000">._GetQPC(</span>)<span style="color: #008000">      #Get the list of Query Processing Components 
 <span style="color: #ff00ff">$xSSA</span></span><span style="color: #000000">._GetIndexer</span>()<span style="color: #008000">  #Get the list of Index Components     

#Assuming you have an component named "CrawlComponent2" or "IndexComponent4", run: 
 <span style="color: #ff00ff">$xSSA</span></span><span style="color: #000000">._GetCC</span>(<span style="color: #ff0000">2</span>)<span style="color: #008000">      #Gets "CrawlComponent2" from the Active topology
 <span style="color: #ff00ff">$xSSA</span></span><span style="color: #000000">._GetIndexer(</span><span style="color: #ff0000">4</span>)<span style="color: #008000"> #Gets "IndexComponent4" from the Active topology

#Each component object also has extended methods and properties... 
 <span style="color: #ff00ff">$i4</span> = <span style="color: #ff00ff">$xSSA</span><span style="color: #000000">._GetIndexer(</span><span style="color: #ff0000">4</span><span style="color: #000000">)</span> 
 <span style="color: #ff00ff">$i4</span><span style="color: #000000">._GetProcess()</span>                 # &gt; Wrapper: Get-Process noderunner -computer &lt;name&gt;
 <span style="color: #ff00ff">$i4</span>.<span style="color: #000000">_GetHealthReport()</span>            # &gt; Wrapper: Get-SPEnterpriseSearchStatus -SSA &lt;SSA&gt;
                                   #              -Component IndexComponent4 -HealthReport
 <span style="color: #ff00ff">$i4</span><span style="color: #000000">._BuildDiskReportData()</span>        # &gt; Runs underlying processing for an index disk report
 <span style="color: #ff00ff">$i4</span><span style="color: #000000">._CellPath </span>                    # &gt; An extended property with the index cell path
 <span style="color: #ff00ff">$i4</span> <span style="color: #000000">| gm | ? {</span><span style="color: #ff00ff">$_</span><span style="color: #000000">.Name -like</span> <span style="color: #993300">"_*"</span><span style="color: #000000">} <span style="color: #008000"># &gt; View the list of properties and methods for this</span> 
</span></span></pre>
<pre><span style="color: #008000">#To get more Content Sources details, which aggregates data from the following:</span>
<span style="color: #008000">#  - The out-of-the-box content source object</span>
<span style="color: #008000">#  - MSSCrawlHistory</span>
<span style="color: #008000">#  - MSSCrawlComponentsState</span>
<span style="color: #008000">#  - Web Application info [if in the same farm as the SSA]</span>

 <span style="color: #ff00ff">$xSSA</span>.<span style="color: #000000">_GetContentSource</span>()<span style="color: #008000">       # &gt; Wrapper: Get-SPEnterpriseSearchCrawlContentSource</span>
 <span style="color: #ff00ff">$xSSA</span>.<span style="color: #000000">_GetContentSourceEx(</span>)<span style="color: #008000">     # &gt; Returns an extended content source object</span>
<span style="color: #008000">                                 #   Hint: To view the extended properties, pipe the 
                                 #         output object to: | SELECT *</span>
 <span style="color: #ff00ff">$xSSA</span>.<span style="color: #000000">_GetContentSourceReport</span>() <span style="color: #008000">#Equivalent to: $xSSA._GetContentSourceEx() | SELECT *</span>

<span style="color: #008000">#Get a specific content source (either by Content Source ID or by name) 
 <span style="color: #ff00ff">$cs1</span><span style="color: #000000"> =</span> </span><span style="color: #ff00ff">$xSSA</span>.<span style="color: #000000">_GetContentSource</span>(<span style="color: #993300">"Local SharePoint Sites"</span>) 
<span style="color: #008000">#And this is the equivalent (assuming "Local SharePoint Sites" has an ID of 1)</span> 
 <span style="color: #ff00ff">$cs1</span> = <span style="color: #ff00ff">$xSSA</span>.<span style="color: #000000">_GetContentSource</span>(<span style="color: #ff0000">1</span>)

<span style="color: #008000">#Working with a specific content source</span> 
 <span style="color: #ff00ff">$xCS1</span> = <span style="color: #ff00ff">$xSSA</span>.<span style="color: #000000">_GetContentSourceEx</span>(<span style="color: #ff0000">1</span>)
<span style="color: #ff00ff"> $xCS1</span>.<span style="color: #000000">StartAddresses.AbsoluteUri
</span> <span style="color: #ff00ff">$xCS1</span>.<span style="color: #000000">StartIncrementalCrawl</span>()
 <span style="color: #ff00ff">$xCS1</span>.<span style="color: #000000">_CrawlStatusDetailed</span>

<span style="color: #008000">#Note: Fulfilling the extended properties can incur higher overhead for environments</span> 
<span style="color: #008000">#      with many content sources. Therefore, when running GetContentSourceEx for all
</span><span style="color: #008000">#      content sources (e.g. by not specifying a parameter value () or by using "*"), </span>
<span style="color: #008000">#      this method implements an in-memory caching mechanism for 20 minutes.</span> 
<span style="color: #008000">#       - However, the cache is bypassed when requesting a specific content source </span></pre>
<pre><span style="color: #008000">#Crawl Visualization...</span>
<span style="color: #008000"> <span style="color: #ff00ff">$xSSA</span></span>.<span style="color: #000000">_ShowRecentCrawlVisualization</span>(<span style="color: #ff0000">2</span>,<span style="color: #ff0000">1</span>)  <span style="color: #008000">#Displays a visualization of crawl activity</span>
<span style="color: #008000">                                           #for the last 2 hours where each character</span>
<span style="color: #008000">                                           #represents a 1 minute block of time</span></pre>
&nbsp;

Other key blog posts about this tool:
<ul>
 	<li><strong><a href="https://blogs.msdn.com/b/sharepoint_strategery/archive/2016/02/01/announcing-search-health-reports-srx-for-sharepoint-search-diagnostics.aspx">Announcement of SRx</a></strong> - <strong>Please read the blog post for install and usage directions</strong></li>
 	<li><strong><a href="https://blogs.technet.com/b/onsearch/archive/2016/03/25/search-health-reports-srx-documentation-for-each-test.aspx">Summary for each 'Test'</a></strong> - Provides an overview for each test</li>
 	<li><strong><a href="https://blogs.msdn.microsoft.com/russmax/2016/03/11/need-to-evaluate-sharepoint-search-topology/">Search Topology Report and Assessment</a> </strong>- Extension for the SRx that helps assess the Search architecture, topology, and scale out</li>
</ul>
----------------------

I hope this helps...

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>A shift from SRx back to blogging all things SP Search...</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_strategery/a-shift-from-srx-back-to-blogging-all-things-sp-search</link>
      <pubDate>Fri, 24 Feb 2017 23:22:24 GMT</pubDate>
      <dc:creator><![CDATA[bspender]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sharepoint_strategery/?p=755</guid>
      <description><![CDATA[Over the last year, I've been putting far more focus into the Search Health Reports (SRx) and...]]></description>
      <content:encoded><![CDATA[Over the last year, I've been putting far more focus into the <a href="https://gallery.technet.microsoft.com/SRx-Core-SharePoint-Search-d60113e9">Search Health Reports (SRx)</a> and incorporating my lessons learned into this PowerShell tool-kit to empower anyone using it. As such, my time for blogging has suffered and let this site get a bit stale.

That is soon going to change now that the SRx is fairly robust and moving into more of a maintenance mode. Now, I'm actively working on several new blog posts using the SRx for more effective troubleshooting and to help you get more out of the knowledge baked into it. I also plan to highlight and demo some of the alerting/reporting functionality provided by the SRx Dashboard that we <em>sell</em> as a Premier [Axis] engagement (*have your TAM reach out to us at <a href="mailto:SearchEngineers@microsoft.com">SearchEngineers@microsoft.com </a>for any additional details in the meantime). To branch out a bit, I'm also working on a new <em>Crawl Freshness</em> test for SPO/On-Premises using Azure Functions and the Graph API. And finally, I'm working to build out several new tests specifically for Cloud Hybrid Search... so much more to come.

<strong>I appreciate anyone reading this blog</strong> and finding value from this.

Best,<strong></strong><strong></strong>
--Brian Pendergrass (<a href="https://twitter.com/bspndr">@bspndr</a>)
Premier Field Engineer - SharePoint Search

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>SP2013 Crawling *Explained: Enumeration/Discovery (Part 3b)</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_strategery/sp2013-crawling-explained-enumerationdiscovery-part-3b</link>
      <pubDate>Thu, 11 Aug 2016 07:00:16 GMT</pubDate>
      <dc:creator><![CDATA[bspender]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sharepoint_strategery/?p=655</guid>
      <description><![CDATA[With VerboseEx logging enabled, the crawl of a single item (or interchangeably, a “document”) can...]]></description>
      <content:encoded><![CDATA[<p style="text-align: left"><span>With VerboseEx logging enabled, the crawl of a single item (or interchangeably, a “document”) can generate </span><strong>more than 6000 ULS events</strong><span>, at times making troubleshooting a particular document analogous to finding the needle in the haystack. In this series of posts, I first described </span><a href="https://blogs.msdn.com/b/sharepoint_strategery/archive/2015/01/26/sp2013-crawling-explained-orchestration-part-1.aspx">the high level orchestration for crawling a document</a><span>, </span><a href="https://blogs.msdn.com/b/sharepoint_strategery/archive/2015/03/24/sp2013-crawling-explained-starting-the-crawl-deep-dive-part-2.aspx">deep dived on the steps involved with starting a crawl</a><span>, and then in <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/08/17/sp2013-crawling-explained-enumerationdiscovery-part-3a/">part 3a covered the concept of enumeration</a>. In this part 3b, I'll follow the concepts from part 3a to follow the same ULS logs picking up where I left off in part 2. Finally, in upcoming posts, I’ll continue to show the same overall flow using key ULS events to illustrate a deep dive through an expected path when crawling an item.</span></p>
<p style="padding-left: 30px"><span style="color: #333399"><strong>Semi-unrelated side note:</strong> Since the last post, our MSDN blogs got migrated over to WordPress. Although it is a better interface on the authoring front, I haven't [taken the time to] figured out how to replicate some of the formatting in our previous tool set. Being said, I will do my best to keep colors consistent from those previous posts to this and those directly related going forward... (but I admit that you'll see subtle differences if comparing old-to-new posts in this series).</span></p>

<h2>Recap: Starting the crawl (Part 2)</h2>
<span>In this scenario, I first performed a full crawl, added a new document (OfficeSpace.docx), increased logging to VerboseEx, and then captured ULS while performing an incremental crawl. From the Crawl Log, we can see this item has a DocID 1047491, which becomes a valuable data point as we progress through these ULS events.</span>

<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/41/metablogapi/5611.032315_2147_SP2013Crawl1.png" alt="" />

<span>In part 2, we followed events in ULS by the <em>Legacy [Crawl] Admin</em> component (e.g. <strong><span style="color: #800080">$SSA</span><span style="color: #00b0f0">.AdminComponent</span></strong></span><span><span>) and then by the "<em>master</em>" Crawl Component to illustrate the detailed steps to start a crawl, which included:</span></span>
<ul>
 	<li><span><span><strong>Seeding the Crawl Queue with the the start addresses</strong> </span></span></li>
 	<li><strong>Notifying the Crawl Components to join this crawl</strong></li>
</ul>
<span>Up to this point in the series, the concept of “crawling” was in regards to the content source level operation (e.g. starting the crawl on </span><span style="color: #ff6600"><strong style="line-height: 1.5">C</strong></span><span style="line-height: 1.5">ontent </span><span style="color: #ff6600"><strong style="line-height: 1.5">S</strong></span><span style="line-height: 1.5">ource </span><span style="color: #ff6600"><strong style="line-height: 1.5">ID 2</strong></span><span style="line-height: 1.5">). </span>

<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/41/metablogapi/0456.032315_2147_SP2013Crawl2.png" alt="" />

<span>But from here, any reference to “crawling” should typically refer to an action done on a specific item (e.g. crawling a document such as "https://foo/page.aspx"</span><span>).</span>

With this crawl <span>(</span><span><span style="color: #ff6600"><strong>CrawlID 228</strong></span><span>)</span></span> now <em>Started</em> (e.g. Central Admin displays the state of this Content Source as “Crawling”), the <em>Gatherer</em> thread in the "master" Crawl Component then spawns a new thread intended to start loading batches of items from the crawl queue.

<span style="color: #333399">02/27/2015 18:11:12.17    <strong>mssearch.exe</strong> (0x17F8)    <span style="color: #ff00ff">0x2620</span>
SharePoint Server Search    Crawler:Gatherer Plugin    e5jl    Verbose
gatherer <strong>SQL thread</strong> <span style="color: #ff00ff">0x2620 </span>started</span>

<span style="color: #333399">02/27/2015 18:11:12.17    <strong>mssearch.exe</strong> (0x17F8)    <span style="color: #ff00ff">0x2620</span>
SharePoint Server Search    Crawler:Gatherer Plugin    e5jp    Verbose
</span><span><span style="color: #333399">Gatherer <strong>LoadTransactions</strong> thread running,</span> <span style="color: #ff6600"><strong>Crawl 228</strong></span></span>
<h2>Recap: Enumeration/Discovery (Part 3a)</h2>
Going back to <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/01/26/sp2013-crawling-explained-orchestration-part-1/">part 1 of this series</a>, I simplistically defined <strong>Enumeration/Discovery</strong> as the process where the crawl component:
<ul>
 	<li><span>Asks the content repository for the links to items from a container in that content repository (e.g. what items do you have within <em>this</em> start address? ...within <em>this</em> folder? ...etc)</span></li>
 	<li><span>And then stores these emitted/discovered [child] links in the “crawl queue” (the <span><span style="color: #00ccff">MSSCrawlQueue</span> <span>table in the Crawl Store Database)</span></span></span></li>
</ul>
In <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/08/17/sp2013-crawling-explained-enumerationdiscovery-part-3a/">part 3b</a>, I attempted to provide a deep dive conceptual explanation for the enumeration process by expanding this concept of <strong><em>container</em> </strong>objects and their child items. To reiterate, <em>container</em><span> can be a folder in a file share, a root entity in a BDC model, an HTML web page seed list, a SharePoint Web Application, Site Collection, Site [web], or List/Library. When defining a SharePoint Content Source, each of the start addresses is a root <em>container</em> (e.g. the web application URL).</span>

During the crawl start phase, the crawl queue gets seeded with the start addresses for this Content Source. Additionally, when starting an incremental crawl, the crawl queue be seeded with additional links such as items marked for re-crawl or items that were failed in the previous crawl <span>(e.g. the </span><strong>ACTION_MASTER_SEED_INC_CRAWL</strong> <span>step described in <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/03/24/sp2013-crawling-explained-starting-the-crawl-deep-dive-part-2/">part 2</a>).</span>

<span>From this point, each of the </span><em>Gatherers</em><span> [Crawl Components] work independently by calling the stored procedure <span><span style="color: #00ccff">proc_MSS_GetNextCrawlBatch</span> in the Crawl Store DB to</span> earmark a “batch” of documents from the crawl queue. Simplistically, consider the crawl queue as a table of links-to-be-crawled ...that is, <em>links we have discovered, but have <strong>not yet retrieved</strong> from the content repository</em>.</span>

<span>Once a batch of documents has earmarked by a <em>Gatherer</em>, this is considered the start of a [search] <i>transaction</i> for these documents. This batch of documents links is returned to the applicable <em>Gatherer </em>thread, which will begin retrieving each from the content repository.</span>

<span>Conceptually, we spilling over into the concept of <em>Gathering</em> at this point ...and the reason is that the <em>Gatherer </em>has no actual code path that differentiates gathering an item versus enumerating a container. Although it is way beyond the scope of this particular post, I described this before in <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2014/08/28/crushing-the-1-million-item-limit-myth-with-net-search-connector-bdc/">a much older post of mine about custom Search connectors</a>: </span>
<blockquote>-----------------------------------------------------
<span style="color: #333399">The [Gatherer thread in the] crawler logically works the *same regardless of the type of content it’s crawling – web, file shares, SP (there are a few slight *nuances for SP content), etc. The [Gatherer] just processes links (aka, “documents”), and<strong> it is up to the [protocol handler] to understand <em>*how</em> to talk to the content or know <em>*what</em> to do with that link</strong> (e.g. [to determine whether to] enumerate it using the <em>finder()</em> method or retrieve it using the <em>specificFinder()</em>).</span>

<span><span style="color: #333399">Thinking of everything – both containers and items – generically as a “document” and realizing the details to handle this “document” get implemented in the [protocol handler] was actually an aha! moment that helped me generalize this problem and better helped get my mind wrapped around it.</span>
-----------------------------------------------------
</span></blockquote>
In other words, enumeration is simply the by-product of gathering an <em>container</em> object such as a SharePoint Web Application (or folder, or HTML web page, <span>a root entity in a BDC model, etc). </span>

And in this part 3, I'm keeping the focus on the ULS events related to enumeration and those events showing the crawl queue getting populated. Then, in part 4 related to "Gathering", I will dive into a bit more nuance around the various protocol handlers used to interface with different types of content repositories.
<h2>Enumeration ...a view from ULS</h2>
With this incremental crawl started and queue initially seeded, we are at the point where the new <em>Gatherer</em> thread calls the <span>stored procedure </span><span><span style="color: #00ccff">proc_MSS_GetNextCrawlBatch</span> to get</span><span> a “batch” of document links from the crawl queue:</span>

<span style="color: #333399">02/27/2015 18:11:12.17    <strong>mssearch.exe</strong> (0x17F8)    <span style="color: #ff00ff">0x2620</span>
SharePoint Server Search    Crawler:Gatherer Plugin    e5jp    Verbose
</span><span><span style="color: #333399">Gatherer <strong>LoadTransactions</strong> thread running,</span> <span style="color: #ff6600"><strong>Crawl 228</strong></span></span>

In the response to this request, we see an event for each link in the batch, such as these first few listed below including:
<p style="padding-left: 30px"><span>-- The root page of the web application (*notice it starts with "http")
<span style="color: #333399">02/27/2015 18:11:12.17    <strong>mssearch.exe</strong> (0x17F8)    <span style="color: #ff00ff">0x2620</span></span>
<span style="color: #333399"> SharePoint Server Search    Crawler:Gatherer Plugin    e5e7    VerboseEx
CCGatherer::<strong>LoadTransactionsFromCrawl</strong>, Application=SSA,
Project=Portal_Content<strong>, <span style="color: #ff6600">crawlID=228</span></strong>,
<span style="color: #008080"><strong>docID</strong></span>=1500, <strong>URL</strong>=https://taxes.chotchkies.lab,
dwTransactionLoaded=<strong>1</strong></span></span></p>
<p style="padding-left: 30px"><span>-- The web application object (*notice it starts with the SharePoint protocol for content , "sts4")
<span style="color: #333399">02/27/2015 18:11:12.17    <strong>mssearch.exe</strong> (0x17F8)    <span style="color: #ff00ff">0x2620</span></span>
</span><span style="color: #333399">SharePoint Server Search    Crawler:Gatherer Plugin    e5e7    VerboseEx CCGatherer::<strong>LoadTransactionsFromCrawl</strong>, Application=SSA,
Project=Portal_Content, <span style="color: #ff6600"><strong>crawlID=228</strong></span>,
<span style="color: #008080"><strong>docID</strong></span>=1501, <strong>URL</strong>=<span style="color: #33cccc">sts4</span>://taxes.chotchkies.lab,
dwTransactionLoaded=<strong>2</strong></span></p>
<p style="padding-left: 30px">...along with several other specific items marked for re-crawl.</p>
With these transactions loaded, the Gatherer "robot" threads can begin their work <em>gathering</em> these items from the content repository and then <em>feeding</em> to the CPC for processing.
<p style="padding-left: 30px"><strong>As a side note: </strong>The "PerformanceLevel" setting at the Search Service level determines the total number of robot threads that an individual Crawl Component can run. This setting also determines the default crawler impact rule (e.g. the maximum number of robot threads that can be used for any given host domain being crawled). Use the following PowerShell cmdlet for the current <em>PerformanceLevel</em> setting:
<a href="https://technet.microsoft.com/en-us/library/ff608126.aspx">[Get|Set]-SPEnterpriseSearchService</a></p>
At this point in the ULS, no robot threads were started/available for the SSA, so we begin to see several started in messages such as:

<span style="color: #333399">02/27/2015 18:11:12.19 mssearch.exe (0x17F8) <span style="color: #00ff00">0x06AC</span> SharePoint Server Search Crawler:Gatherer Service dsg8 Verbose </span>
<span style="color: #333399"><strong>robot thread</strong> <span style="color: #00ff00">0x06AC</span> started</span>

Followed by the <em>Gatherer</em> delegating the actual task of retrieval to the <em>Filter Daemon</em> (mssdmn.exe):

<span style="color: #333399">02/27/2015 18:11:12.19 mssearch.exe (0x17F8) <span style="color: #00ff00">0x06AC</span> SharePoint Server Search Crawler:Gatherer Service ds86 VerboseEx
<strong>url</strong> <span style="color: #33cccc">sts4</span>://taxes.chotchkies.lab/ data 300000 connect 300000
<span style="color: #00ff00">f561161d-2242-4fc0-a067-2b513d692bcd</span></span>

From this message:
<ul>
 	<li>You have a correlation ID...
<ul>
 	<li>In this case <span>f561161d-2242-4fc0-a067-2b513d692bcd</span></li>
 	<li>Filter the ULS on this correlation ID</li>
</ul>
</li>
 	<li>The filtered ULS will have events from both the <em>mssearch.exe</em> and <em>mssdmn.exe</em> processes</li>
 	<li>But there are still several events missing - to expose those:
<ul>
 	<li>For events by the <em>mssdmn.exe</em>, the first effectively reports what task the <em>Gatherer</em> delegated to it</li>
 	<li>In this case:</li>
</ul>
</li>
</ul>
<p style="padding-left: 90px"><span style="color: #333399">02/27/2015 18:11:12.19 mssdmn.exe (0x1774) <span style="color: #800000">0x14B0 </span>SharePoint Server Search Connectors:SharePoint dvb0 VerboseEx
<strong>New url:</strong> <span style="color: #33cccc">sts4</span>://taxes.chotchkies.lab/,
<strong>crawl type = incremental</strong>,
HighDateTime = 00000000, LowDateTime = 00000001 [sts3handler.cxx:279]
<span style="color: #00ff00">f561161d-2242-4fc0-a067-2b513d692bcd</span></span></p>

<ul>
 	<li>In ULSViewer, change the filter to include events that either:
<ul>
 	<li>Match the correlation ID (<span>f561161d-2242-4fc0-a067-2b513d692bcd</span>)</li>
 	<li><strong>OR</strong> that match the thread ID of the <em>mssdmn.exe</em> process (e.g. <span>0x14B0)</span><span></span></li>
</ul>
</li>
 	<li>These resulting filtered ULS events will cover the <em>Gathering</em>, <em>Feeding</em>, and the completion of the Search transaction for this particular item:
<ul>
 	<li>In other words, all the events related to steps 1b, 1c, 2a, 2b, 3 ...and then 6b and 6c</li>
 	<li><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/41/metablogapi/8551.012615_1602_SP2013Crawl1.png" /></li>
</ul>
</li>
</ul>
<span style="color: #333399"></span>As I referenced above, this is <em>REALLY</em> where the concepts of <em>gathering</em> and <em>enumeration</em> cross-over, so I'm intentionally cherry-picking the next events below that highlight enumeration.

In <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/08/17/sp2013-crawling-explained-enumerationdiscovery-part-3a/">part 3a of this series</a>, I explained that for SharePoint content, the Crawl Component interfaces with the Site Data Web Service hosted by the Web Application being crawled. In ULS, we see right before this <strong>w</strong>eb <strong>s</strong>ervice gets called:

<span style="color: #333399">02/27/2015 18:11:12.20 mssdmn.exe (0x1774) <span style="color: #800000">0x14B0</span> SharePoint Server Search Connectors:SharePoint dm0c Verbose
<strong>GetVirtualServerPolicy</strong> is about to call <strong>WS</strong> for virtual server, <strong>strVirtualServerUrl</strong> https://taxes.chotchkies.lab
<span style="color: #00ff00">f561161d-2242-4fc0-a067-2b513d692bcd</span></span>

Followed by the response:

<span style="color: #333399">02/27/2015 18:11:12.23 mssdmn.exe (0x1774) <span style="color: #800000">0x14B0</span> SharePoint Server Search Connectors:SharePoint ac3jn Verbose
<strong>GetContent</strong> CorrelationID 0702ee9c-39f7-00ee-fb00-520e2e2e7ed9
<strong>ObjectType</strong> VirtualServer
<strong>Url</strong> https://taxes.chotchkies.lab/<strong>_vti_bin/sitedata.asmx</strong>
Search <strong>RequestDuration</strong> 45 SPIISLatency 0 SP RequestDuration 13
<span style="color: #00ff00">f561161d-2242-4fc0-a067-2b513d692bcd</span></span>

And the full SOAP response from the Site Data Web Service:

<span style="color: #333399">02/27/2015 18:11:12.25 mssdmn.exe (0x1774) <span style="color: #800000">0x14B0</span> SharePoint Server Search Connectors:SharePoint dm0d VerboseEx </span>
<span style="color: #333399"><strong>GetVirtualServerPolicy received WS response</strong> </span>
<span style="color: #333399">&lt;VirtualServer&gt;</span>
<span style="color: #333399"> &lt;Metadata ID="{d525ed46-79a7-4b86-8f55-917322baf1a9}" Version="15.0.4675.1000" URL="https://taxes.chotchkies.lab/" <strong>URLZone="Default"</strong> URLIsHostHeader="False" /&gt;</span>
<strong><span style="color: #333399"> &lt;ContentDatabases&gt;</span></strong>
<span style="color: #333399"> &lt;ContentDatabase ID="{4bb174f0-b860-4848-9b06-b1b3c0a0b4d0}" /&gt;</span>
<span style="color: #333399"> &lt;/ContentDatabases&gt;</span>
<span style="color: #333399"> &lt;Policies AnonymousGrantMask="0" AnonymousDenyMask="0"&gt;</span>
<span style="color: #333399"><strong> &lt;PolicyUser</strong> LoginName="NT AUTHORITY\LOCAL SERVICE" BinaryIdentifier="S-1-5-19" Sid="S-1-5-19" BinaryIdentifierType="SecurityIdentifier" GrantMask="4611686224789442657" DenyMask="0" /&gt;</span>
<span style="color: #333399"><strong> &lt;PolicyUser</strong> LoginName="i:0#.w|chotchkies\crawlsvc" BinaryIdentifier="i:0).w|s-1-5-21-643199992-1059713991-1699802858-1127" Sid="" BinaryIdentifierType="UserKey" GrantMask="4611686224789442657" DenyMask="0" /&gt;</span>
<span style="color: #333399"><strong> &lt;PolicyUser</strong> LoginName="CHOTCHKIES\spwebsvc" BinaryIdentifier="S-1-5-21-643199992-1059713991-1699802858-1112" Sid="S-1-5-21-643199992-1059713991-1699802858-1112" BinaryIdentifierType="SecurityIdentifier" GrantMask="9223372036854775807" DenyMask="0" /&gt;</span>
<span style="color: #333399"><strong> &lt;PolicyUser</strong> LoginName="i:0#.w|chotchkies\spwebsvc" BinaryIdentifier="i:0).w|s-1-5-21-643199992-1059713991-1699802858-1112" Sid="" BinaryIdentifierType="UserKey" GrantMask="9223372036854775807" DenyMask="0" /&gt;</span>
<span style="color: #333399"><strong> &lt;PolicyUser</strong> LoginName="i:0#.w|chotchkies\farmsvc" BinaryIdentifier="i:0).w|s-1-5-21-643199992-1059713991-1699802858-1110" Sid="" BinaryIdentifierType="UserKey" GrantMask="9223372036854775807" DenyMask="0" /&gt;</span>
<span style="color: #333399"><strong> &lt;PolicyUser</strong> LoginName="CHOTCHKIES\farmSvc" BinaryIdentifier="S-1-5-21-643199992-1059713991-1699802858-1110" Sid="S-1-5-21-643199992-1059713991-1699802858-1110" BinaryIdentifierType="SecurityIdentifier" GrantMask="9223372036854775807" DenyMask="0" /&gt;</span>
<span style="color: #333399"> &lt;/Policies&gt;</span>
<span style="color: #333399"> &lt;Servers /&gt;</span>
<strong><span style="color: #333399"> &lt;AlternateDomains Count="2" Name="SharePoint Taxes Host"&gt;</span></strong>
<span style="color: #333399"> &lt;AlternateDomain&gt;</span>
<span style="color: #333399"> &lt;IncomingUrl&gt;https://taxes.chotchkies.lab&lt;/IncomingUrl&gt;</span>
<strong><span style="color: #333399"> &lt;UrlZone&gt;Default&lt;/UrlZone&gt;</span></strong>
<span style="color: #333399"> &lt;MappedUrl&gt;https://taxes.chotchkies.lab&lt;/MappedUrl&gt;</span>
<span style="color: #333399"> &lt;RedirectUrl /&gt;</span>
<span style="color: #333399"> &lt;/AlternateDomain&gt;</span>
<span style="color: #333399"> &lt;AlternateDomain&gt;</span>
<span style="color: #333399"> &lt;IncomingUrl&gt;https://offthebooks.chotchkies.lab&lt;/IncomingUrl&gt;</span>
<strong><span style="color: #333399"> &lt;UrlZone&gt;Custom&lt;/UrlZone&gt;</span></strong>
<span style="color: #333399"> &lt;MappedUrl&gt;https://offthebooks.chotchkies.lab&lt;/MappedUrl&gt;</span>
<span style="color: #333399"> &lt;RedirectUrl /&gt;</span>
<span style="color: #333399"> &lt;/AlternateDomain&gt;</span>
<span style="color: #333399"> &lt;/AlternateDomains&gt;</span>
<span style="color: #333399">&lt;/VirtualServer&gt;</span>
<span style="color: #00ff00">f561161d-2242-4fc0-a067-2b513d692bcd</span>

<span>From this response, the SP Protocol Handler emits a link representing each Content database (e.g. the child items within the web application container). In this case from the XML above, we can see that this web application only had one Content DB:
<span style="color: #333399">&lt;<strong>ContentDatabase</strong> ID="{<span style="color: #999999">4bb174f0-b860-4848-9b06-b1b3c0a0b4d0</span>}" /&gt;</span>
</span>

And from this, the <em>Gatherer</em> generates a link that gets inserted to a TempTable in the Crawl Store DB:

<span style="color: #333399">02/27/2015 18:11:12.28 mssearch.exe (0x17F8) <span style="color: #800000">0x06AC</span> SharePoint Server Search Crawler:Gatherer Plugin dw3a VerboseEx
CGatherAddLink::InsertLink: <strong>InsertRow on TempTable</strong> succeeded,
<strong>URL</strong> <span style="color: #33cccc">sts4</span>://taxes.chotchkies.lab/<strong><span style="color: #33cccc">contentdbid</span></strong>={<span style="color: #999999">4bb174f0-b860-4848-9b06-b1b3c0a0b4d0</span>}, <strong><span style="color: #ff6600">CrawlID 228</span></strong>, <strong>SourceDocID 1501</strong>
<span style="color: #00ff00">f561161d-2242-4fc0-a067-2b513d692bcd</span></span>

Assuming no crawl rules or boundaries (e.g. for web crawls, page depth or server hops) are exceeded, the item is considered a "crawl candidate" and moved from the TempTable into the crawl queue (but that processing all occurs within the context of the Crawl Store DB).
<h2>Shampoo, rinse... repeat (with conditioner)</h2>
<span>Eventually, in another thread (very possibly in another Crawl Component), a <em>Gatherer</em> thread will pull a batch of items from the crawl queue that includes the previously emitted link above to the Content DB. However, because this is an incremental crawl, the call to the Site Data Web Service changes from <em>GetContent()</em> to <em>GetChanges().</em></span>

Using the same strategies above to find a robot thread picking up the link for the Content DB:

<span style="color: #333399">02/27/2015 18:11:12.19 mssearch.exe (0x17F8) 0x08B4 SharePoint Server Search Crawler:Gatherer Service ds86 VerboseEx
<strong>url</strong> <span style="color: #33cccc">sts4</span>://taxes.chotchkies.lab/contentdbid={<span style="color: #999999">4bb174f0-b860-4848-9b06-b1b3c0a0b4d0</span>}/ data 300000 connect 300000 </span>
<span style="color: #ff00ff">e64f034a-6d40-42bd-958e-0bef8e0d2dee</span>

Then filter the ULS on this new correlation ID, find the new thread ID of the mssdmn.exe handling this particular item...

<span style="color: #333399">02/27/2015 18:11:12.19 mssdmn.exe (0x1774) <span style="color: #3366ff">0x0C34 </span>SharePoint Server Search Connectors:SharePoint dvb0 VerboseEx </span>
<span style="color: #333399"><strong>New url:</strong> sts4://taxes.chotchkies.lab/contentdbid={4bb174f0-b860-4848-9b06-b1b3c0a0b4d0}/, crawl type = incremental, HighDateTime = 00000000, LowDateTime = 00000001 </span>
<span style="color: #99ccff">e64f034a-6d40-42bd-958e-0bef8e0d2dee</span>

...and then i<span>n ULSViewer, change the filter to include events that either:</span>
<ul>
 	<li>Match the correlation ID (<span>e64f034a-6d40-42bd-958e-0bef8e0d2dee</span>)</li>
 	<li><strong>OR</strong> that match the thread ID of the <em>mssdmn.exe</em> process (e.g. <span>0x0C34</span><span>)</span></li>
</ul>
In this filtered view, we once again see just before a call is made to the Site Data Web Service for this Content DB using the change log cookie (e.g. see the <em>LastChange </em>value in the request parameters below)

<span style="color: #333399">02/27/2015 18:11:12.27 mssdmn.exe (0x1774) <span style="color: #3366ff">0x0C34</span> SharePoint Server Search Connectors:SharePoint dm19 Verbose </span>
<span style="color: #333399"><strong>GetChanges</strong>(before ws call) </span>
<span style="color: #333399">URL https://taxes.chotchkies.lab, </span>
<span style="color: #333399"><strong>Content Database</strong> {<span style="color: #999999">4bb174f0-b860-4848-9b06-b1b3c0a0b4d0</span>}, <strong>AmountOfChanges</strong> 100, </span>
<span style="color: #333399"><strong>LastChange</strong> 1;0;<span style="color: #999999">4bb174f0-b860-4848-9b06-b1b3c0a0b4d0</span>;635601068426200000;665848,
<strong>CurrentChange</strong></span>

Upon completion of the request, we see:

<span style="color: #333399"> 02/27/2015 18:11:12.59 mssdmn.exe (0x1774) <span style="color: #3366ff">0x0C34</span> SharePoint Server Search Connectors:SharePoint aiwts Verbose
GetChanges CorrelationID 0702ee9c-19fa-00ee-fb00-5aab8c4613ff
<strong>Url</strong> https://taxes.chotchkies.lab/<strong>_vti_bin/sitedata.asmx</strong>
Search <strong>RequestDuration</strong> 332 SPIISLatency 0 SP RequestDuration 315 </span>
<p style="padding-left: 30px"><strong>Quick reminder:</strong> And as a brief recap around this whole s<span>cenario, I first performed a full crawl, <strong>added a new document</strong> (<span style="color: #3366ff">OfficeSpace.docx</span>), increased logging to VerboseEx, and then captured ULS while performing an <strong>incremental crawl</strong>... so this new document is pretty much the only change to process. </span></p>
And again, we see the SOAP response for this request.

<span style="color: #333399">02/27/2015 18:11:12.59 mssdmn.exe (0x1774) <span style="color: #3366ff">0x0C34</span> SharePoint Server Search Connectors:SharePoint allng VerboseEx </span>
<strong><span style="color: #333399">GetChanges received WS response </span></strong>
<span style="color: #333399">&lt;GetChangesResult&gt;</span>
<span style="color: #333399"> &lt;SPContentDatabase Change="Unchanged" ItemCount="2"&gt;</span>
<span style="color: #333399"> &lt;SPSite Change="Unchanged" ItemCount="2" Id="{8f746e28-dca0-40f4-aa78-86e7db9f3ceb}"&gt;</span>
<span style="color: #333399"> &lt;Messages /&gt;</span>
<span style="color: #333399"> &lt;SPWeb Change="UpdateShallow" ItemCount="1" UpdateSecurity="False" UpdateSecurityScope="False" Id="{e2ea4e1e-6546-453c-b8b8-d4ffd1679ef0}" ParentId="{8f746e28-dca0-40f4-aa78-86e7db9f3ceb}" InternalUrl="/siteurl=/siteid={8f746e28-dca0-40f4-aa78-86e7db9f3ceb}/weburl=/webid={e2ea4e1e-6546-453c-b8b8-d4ffd1679ef0}/" DisplayUrl="/" ServerUrl="https://taxes.chotchkies.lab" CRC="742474233" SequenceNumber="0"&gt;</span>
<span style="color: #333399"> &lt;<strong>SPList</strong> Change="Unchanged"<strong> ItemCount="1"</strong>&gt;</span>
<span style="color: #333399"> &lt;<strong>SPListItem Change="Add"</strong> ItemCount="0" UpdateSecurity="False" UpdateSecurityScope="False" Id="{9cc0ebdf-3704-408f-a7b6-b2029e0f969b}" ParentId="{a107482c-b902-441a-9863-450254f10a96}_" InternalUrl="/siteurl=/siteid={8f746e28-dca0-40f4-aa78-86e7db9f3ceb}/weburl=/webid={e2ea4e1e-6546-453c-b8b8-d4ffd1679ef0}/listid={a107482c-b902-441a-9863-450254f10a96}/folderurl=/itemid=1060" <strong>DisplayUrl="/Shared Documents/<span style="color: #3366ff">OfficeSpace.docx</span>"</strong> ServerUrl="https://taxes.chotchkies.lab" CRC="0" SequenceNumber="1" Url="<span style="color: #3366ff"><strong>OfficeSpace.docx</strong></span>"&gt;</span>
<span style="color: #333399"> &lt;ListItem&gt;</span>
<em><span style="color: #999999"><span style="color: #333399">...list item details and schema trimmed for brevity...</span></span></em>
<span style="color: #333399"> &lt;/ListItem&gt;</span>
<span style="color: #333399"> &lt;/SPListItem&gt;</span>
<span style="color: #333399"> &lt;/SPList&gt;</span>
<span style="color: #333399"> &lt;/SPWeb&gt;</span>
<span style="color: #333399"> &lt;/SPSite&gt;</span>
<span style="color: #333399"> &lt;/SPContentDatabase&gt;</span>
<span style="color: #333399"> &lt;MoreChanges&gt;False&lt;/MoreChanges&gt;</span>
<span style="color: #333399"><strong> &lt;StartChangeId&gt;</strong>1;0;4bb174f0-b860-4848-9b06-b1b3c0a0b4d0;635606861984470000;665850&lt;/StartChangeId&gt;</span>
<span style="color: #333399"><strong> &lt;EndChangeId&gt;</strong>1;0;4bb174f0-b860-4848-9b06-b1b3c0a0b4d0;635606861984470000;665850&lt;/EndChangeId&gt;</span>
<span style="color: #333399">&lt;/GetChangesResult&gt;</span>

And from this, the <em>Gatherer</em> emits a link for the changed item to the crawl queue:

<span style="color: #333399">02/27/2015 18:11:12.61 mssdmn.exe (0x1774) <span style="color: #3366ff">0x0C34</span> SharePoint Server Search Connectors:SharePoint dv9u VerboseEx </span>
<span style="color: #333399"><strong>Emit change log crawl link</strong> <span style="color: #33cccc">sts4</span>://taxes.chotchkies.lab/siteurl=/siteid={8f746e28-dca0-40f4-aa78-86e7db9f3ceb}/weburl=/webid={e2ea4e1e-6546-453c-b8b8-d4ffd1679ef0}/listid={a107482c-b902-441a-9863-450254f10a96}/folderurl=/itemid=1060, </span>
<span style="color: #333399"><strong>DisplayURL</strong> = https://taxes.chotchkies.lab/Shared Documents/<strong><span style="color: #3366ff">OfficeSpace.docx</span></strong>, </span>
<span style="color: #333399"><strong>url</strong>=sts4://taxes.chotchkies.lab/contentdbid={<span style="color: #999999">4bb174f0-b860-4848-9b06-b1b3c0a0b4d0</span>} </span>

And you might have guessed... but eventually<span>, in another thread (very possibly in another Crawl Component), a </span><em>Gatherer</em><span> thread will pull a batch of items from the crawl queue that includes the previously emitted link above to this document <strong><span style="color: #3366ff">OfficeSpace.docx </span></strong>where it will be retrieved from SharePoint, fed to the CPC, processed, and submitted to the index.</span>
<h2>In coming posts: Continuing to peel back the onion…</h2>
So far in this series, we covered:
<ol>
 	<li><a href="https://blogs.msdn.com/b/sharepoint_strategery/archive/2015/01/26/sp2013-crawling-explained-orchestration-part-1.aspx">A high-level view to orchestrating the crawl</a></li>
 	<li><a href="https://blogs.msdn.com/b/sharepoint_strategery/archive/2015/03/24/sp2013-crawling-explained-starting-the-crawl-deep-dive-part-2.aspx">A deep dive look at starting the crawl</a></li>
 	<li>Enumeration/Discovery
<ol>
 	<li><a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/08/17/sp2013-crawling-explained-enumerationdiscovery-part-3a/">Concepts</a></li>
 	<li>Illustrating through ULS              <span> <span style="color: #3366ff"><strong>/* this post */</strong></span></span></li>
 	<li>Simulating with PowerShell</li>
</ol>
</li>
</ol>
And in coming posts, we will then deep dive into each of the following areas in separate posts:
<ul>
 	<li>
<div><strong>Enumeration/Discovery</strong>: The process where the Crawl Component:</div>
<ul>
 	<li>Asks for the links to items from the content repository (e.g. “what items do you have within this start address?”)</li>
 	<li>And then stores these emitted/discovered links in the “crawl queue” (the <span>MSSCrawlQueue</span> table in the Crawl Store Database)</li>
</ul>
</li>
 	<li>
<div><strong>Gathering:</strong> The process of the Crawl Component retrieving [think: downloading] the enumerated items (e.g. using links from the crawl queue)</div>
<ul>
 	<li>Each Crawl Component independently earmarks a small sub-set of items from the <span>MSSCrawlQueue</span> to be gathered/processed; once earmarked, the item is considered part of a “search transaction”</li>
</ul>
</li>
 	<li><strong>Feeding:</strong> The process of the Crawl Component submitting the gathered items to the Content Processing Component(s)</li>
 	<li>
<div><strong>Processing:</strong> The process of the Content Processing Component converting the documents into a serialized object of Managed Properties (aka: “Mars Document”)</div>
<ul>
 	<li>The CPC will produce one Mars Document for each item gathered/fed for processing. In other words, the Mars Document is the end product from processing</li>
</ul>
</li>
 	<li>
<div><strong>Index Submission: </strong>The process of submitting the processed document (e.g. the Mars Document) to Index Components where it will be inserted into the index</div>
<ul>
 	<li>Just before submission, a collection of Mars Documents get batched into a “Content Group”, which gets submitted to the Index as an atomic operation</li>
</ul>
</li>
 	<li>
<div><strong>Callback Handling: </strong>Following Index Submission:</div>
<ul>
 	<li>A callback message gets returned back to Content Processing Component regarding the status of the Index Submission</li>
 	<li>Then, another callback gets returned from the Content Processing Component back to the Crawl Component regarding the status of processing (which implicitly includes the status from Index Submission as well – In other words, processing cannot report success if Index Submission failed)</li>
 	<li>
<div>Finally, the transaction for the item completes when its status is persisted to the <span><span>MSSCrawlUrl</span> </span>table and the item gets cleared from the <span><span>MSSCrawlQueue</span> </span>table</div>
&nbsp;</li>
</ul>
</li>
</ul>
<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/41/metablogapi/5861.081415_0248_SP2013Crawl2.png" alt="" width="648" height="347" />

<span>…to be continued :-)</span>

<span></span>]]></content:encoded>
    </item>
    <item>
      <title>Search Performance: A case of AV slowing down crawls</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_strategery/search-performance-a-case-of-av-slowing-down-crawls</link>
      <pubDate>Wed, 27 Apr 2016 05:00:27 GMT</pubDate>
      <dc:creator><![CDATA[bspender]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sharepoint_strategery/?p=525</guid>
      <description><![CDATA[In the services world supporting Search, I commonly see the nasty impact of Anti-Virus (AV) on the...]]></description>
      <content:encoded><![CDATA[In the services world supporting Search, I commonly see the nasty impact of Anti-Virus (AV) on the performance of SharePoint Search. Before diving into this scenario, I want to first reiterate the following KB:

<strong>Certain folders may have to be excluded from antivirus scanning when you use file-level antivirus software in SharePoint</strong>
<a title="https://support.microsoft.com/en-us/kb/952167" href="https://support.microsoft.com/en-us/kb/952167">https://support.microsoft.com/en-us/kb/952167</a>
<p style="padding-left: 30px">Which states:
<em>These folders may have to be excluded from antivirus scanning when you use file-level antivirus software in SharePoint. <span style="color: #ff0000">If these folders are not excluded, you may see unexpected behavior</span>. For example, you may receive "access denied" error messages when files are uploaded.</em></p>
Admittedly, that statement seems a bit ambiguous, but I  whole-heartedly recommend the exceptions and hope to convince you of their need with the all-too-common scenario described below.
<h2>The [representative] scenario...</h2>
The consequence of Anti-Virus locking out files can manifest in many different ways. In some cases, the signs are obvious (e.g. the IO Exception "<span style="color: #ff0000">The process cannot access the file because it is being used by another process</span>"), whereas others throw no particular exception, but instead exhibit terrible performance (e.g. very low documents per second processed). Further, I've also seen several cases where AV ultimately led to Index replicas regularly cycling through degraded states.

The point... there is no single path to failure caused by AV, but I'll try to walk you through some representative scenarios. Conversely, other factors can cause similar performance impacts, too (e.g. saturated network, poor disk, etc)

<a href="https://msdnshared.blob.core.windows.net/media/2016/04/AVImpact.png"><img class="alignnone  wp-image-545" src="https://msdnshared.blob.core.windows.net/media/2016/04/AVImpact-1024x551.png" alt="AVImpact" width="799" height="430" /></a>

...but for now, we'll focus on AV (and for anyone asking... that is a great example of AV totally wrecking the performance in my lab).
<h2>Follow the <span style="color: #999999"><del>money</del> </span>crawl flow...</h2>
As we dive in, I will refer to <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/01/26/sp2013-crawling-explained-orchestration-part-1/">the following high level flow for a crawl</a> when describing a particular point of a crawl:

<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/41/metablogapi/8551.012615_1602_SP2013Crawl1.png" alt="" width="760" height="407" />

The <em>Crawl Load</em> report (found in Central Admin -&gt; Crawl Health Reports -&gt; in the Crawl Latency tab) illustrates the number of items being processed by the system at any a given moment in time, whereas the <em>Crawl Latency</em> chart (in the same tab, but presented under the <em>Crawl Load</em> chart) shows you the latency for various stages. <a href="https://channel9.msdn.com/Events/Ignite/2015/BRK3176">At Ignite (around the 47m 30s mark)</a>, I talked about the <em>Crawl Load</em> report and noted that I use it as my starting point when troubleshooting any crawl performance issue.

<a href="https://msdnshared.blob.core.windows.net/media/2016/04/crawlLoad-v-latency.png"><img class="alignnone  wp-image-555" src="https://msdnshared.blob.core.windows.net/media/2016/04/crawlLoad-v-latency-1024x448.png" alt="crawlLoad-v-latency" width="800" height="350" /></a>

For the <em>Crawl Load</em>, I use the analogy of cars on the road. If you take an aerial photo of rush hour traffic, you would see a lot of cars on the road, but have no real measure of how fast each car is actually moving. Being said, if in that photo you could see that lots of cars where packing in between mile marker 10 and 11, then there was likely something between mile marker 11 and 12 causing a slow-down (e.g. all the cars on the road are backed up by some bottleneck further down the road).

This <em>Crawl Load</em> chart is similar in that we can see where the items are in the system as they are being processed. Although overly simplified, it may also help to think about this <em>Crawl Load</em> chart as an indicator of where the Crawl Component’s [gatherer, aka “robot”] threads are currently working (e.g. each thread is working on some batch of items at any given time, which is why the chart shows number of items in the Y axis instead of threads). To take out the previous analogy further, each car [thread] is moving a batch of people [items] down the road [crawl flow].

When a crawl is flowing well, you'd typically expect to see a roughly even split of items in the "In Crawler Queue" and "Submitted to CTS". In other words, about half of the threads are busy gathering new items to process and the other half of threads are waiting for callbacks on items being processed.

However...

<a href="https://msdnshared.blob.core.windows.net/media/2016/04/backedupInPlugin.jpg"><img class="alignnone size-full wp-image-556" src="https://msdnshared.blob.core.windows.net/media/2016/04/backedupInPlugin.jpg" alt="backedupInPlugin" width="621" height="376" /></a>

...here we see the threads are mostly pooling in "Waiting in Content Plugin" (e.g. between <strong>steps 2b</strong> and <strong>3</strong> from the flow illustration above) and in “Submitted to CTS” (which means the threads are waiting on a callback until the processing in <strong>steps 3</strong> to <strong>6b</strong> completed). Going back to the traffic analogy again, we would expect to see corresponding bottlenecks somewhere <em>down the road</em>, which we can see using the "Content Processing Activity" report.

The very first chart at the top of this post (e.g. the "Content Processing Activity" report dominated by <span style="color: #800080">purple</span> [<em>DocumentRetrieval</em>] and <span style="color: #ffcc00">gold</span> [<em>Indexing</em>] values) best illustrates the negative impact that AV can have on crawling...
<h3>Scenario 1: DocumentRetrieval</h3>
In <a title="SP2013: Understanding storage locations for files gathered by the Crawl Component" href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2014/12/04/sp2013-understanding-storage-locations-for-files-gathered-by-the-crawl-component/">my post here</a> describing the various paths used during a crawl, we can see that the Content Processing Component reaches back to the Crawl Component (via the <strong>GathererDataShare</strong>) during the <em>DocumentParsing</em> stage in the processing flow (during <strong>step 4</strong> above) to retrieve an item's blob. For example:

<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/41/1373.gathererDataShare.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/41/1373.gathererDataShare.png" alt="" width="698" height="288" border="0" /></a>

When AV interferes with this retrieval over the <strong>GathererDataShare</strong> file share... well, you see lots of <span style="color: #800080">purple</span> [<em>DocumentRetrieval</em>] in the "Content Processing Activity" report.
<h3>Scenario 2: Indexing</h3>
For this particular customer, the DocumentRetrieval stage was playing nice. Instead, we found GIGANTIC delays in "Indexing" (<strong>steps 5</strong> and <strong>6a</strong> in the flow above)
<p style="padding-left: 30px"><em>   <span style="color: #003366">*(apologies for the grainy images, but that is ~170 seconds for each item)</span>
</em><a href="https://msdnshared.blob.core.windows.net/media/2016/04/indexingSpikes.jpg"><img class="alignnone size-full wp-image-565" src="https://msdnshared.blob.core.windows.net/media/2016/04/indexingSpikes.jpg" alt="indexingSpikes" width="623" height="412" /></a></p>
After disabling AV, the very same system processed most items in ~200-300 milliseconds as seen below:
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/04/normalCPCactivity.jpg"><img class="alignnone  wp-image-575" src="https://msdnshared.blob.core.windows.net/media/2016/04/normalCPCactivity.jpg" alt="normalCPCactivity" width="622" height="486" /></a></p>

<h2>Into the weeds...</h2>
As I described further <a href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/07/08/sp2013-using-get-spindexreports-to-troubleshoot-failed-master-merge/"><em>in this post</em></a> (in the section labeled <em>Glimpse into the Mechanics for Managing the Index</em> about 25% into that post), the Index regularly creates, merges, and deletes many small files as part of the normal processing.

<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/41/metablogapi/5428.070815_0025_SP2013Troub3.png" alt="" width="730" height="296" />
<p style="padding-left: 30px"><em>"Index files are never directly modified. Instead, when the Index parts on one level become &gt;10% of the level above, they are "<strong>merged</strong>" into a new part file at that next level above. After the merging has completed, the parts on the lower levels (now merged into the higher level) can then be deleted from disk. During normal operation, the master part typically accounts for &gt;90% of the active documents in the given partition (100% when everything is fully merged into the master part) and the levels below for the other ~10%."</em></p>
When AV gets involved, these low level Index files get locked - at times temporarily and sometimes indefinitely (until the noderunner.exe gets recycled) leading to longer than expected processing times (read: poor performance) and/or degraded components.

For example, exceptions such as the following commonly (but not always) occurs when AV locks out a file needed by Search:
<p style="padding-left: 30px"><span style="color: #003366">NodeRunnerIndex10-bc8226eb-4f3e      Search      Search Component      ajkma      <strong>Unexpected</strong>
<strong>JournalReceiverWorker[SPae590e863ac2]: Generation redo failed with exception.:
</strong> <strong><span style="color: #ff0000">System.IO.IOException: The process cannot access the file because it is being used by another process.</span>
</strong>  <span style="color: #003366">      </span>at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
<span style="color: #003366">  <span style="color: #003366">      </span></span>at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
<span style="color: #003366">        </span>at Microsoft.Ceres.CoreServices.Storage.LocalDisk.LocalDiskStorage.MoveFile(StoragePath oldPath, StoragePath newPath)
<em>  <span style="color: #003366">  <span style="color: #003366">  </span><span style="color: #003366">  </span></span><span style="color: #999999">…etc…</span></em></span></p>
In this particular scenario, one of the Journal files were locked out preventing the secondary replica from fully synchronizing with the primary replica. Eventually, this caused the secondary replica to get "left behind" by the primary replica where the problem manifested itself as a degraded Index component.

Keep in mind a few points here:
<ul>
	<li>The index has lots of different types of files that can be impacted (e.g. Journal files, mfs files, parts, merges, generation state files, and so on) and the exception can happen with any of them. Being said, when hunting in ULS, search for the exception (i.e. "it is being used by another process") rather than this specific event ID.</li>
	<li>This exception does not always occur (so "no message" does not mean "no interference from AV"). But if it does appear in your ULS, AV is most certainly at play (and <a href="https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx">Process Monitor </a>can help verify).</li>
	<li>With the redundancy built into Search, a single degraded component does not result in any sort of query outage meaning the failure may "silently" occur. In this specific scenario, the customer noticed the degraded components several hours after this event occurring in ULS.</li>
	<li>When this specific scenario occurred, the thread in this Index component was blocked from moving forward and thus stuck on a particular Generation. On a recycle of the noderunner.exe process (by restarting the HostController service), this secondary replica could then be re-seeded and caught up.</li>
</ul>
As noted above, the "<em>used by another process</em>" exception does not always occur. In other times, we may also see excessively long operations that simply time out. For example:
<p style="padding-left: 30px"><span style="color: #003366">NodeRunnerIndex10-bc8226eb-4f3e      Search      General      ainw9      Medium</span>
<span style="color: #003366">Remote service invocation: method=GetRecoveryAction(lastPreparedGeneration) Service = {  </span>
<span style="color: #003366">      <strong>Implementation type=Microsoft.Ceres.SearchCore.JournalShipper.JournalShipper </strong>
</span><span style="color: #003366">Component: SPd9a8b223b429I.2.0.JournalShipper
</span><span style="color: #003366">Exposer Name: JournalStreamControl
} <strong>terminated with exception: </strong></span>
<span style="color: #003366"><span style="color: #003366">  </span><span style="color: #003366">  </span><span style="color: #003366">  </span><span style="color: #ff0000"><strong>System.Threading.ThreadInterruptedException: Thread was interrupted from a waiting state.</strong></span></span>
<span style="color: #003366"><span style="color: #003366">  </span><span style="color: #003366">  </span><span style="color: #003366">  </span><span style="color: #003366">  </span><span style="color: #003366">  </span><span style="color: #003366">  </span>at System.Threading.Monitor.Enter(Object obj)</span>
<span style="color: #003366">            at Microsoft.Ceres.SearchCore.Journal.Journal.get_LastPreparedGeneration()</span>
<span style="color: #003366">            at Microsoft.Ceres.SearchCore.JournalShipper.JournalShipper.GetRecoveryAction(UniqueGeneration generationId)</span></p>
<p style="padding-left: 30px">Followed by:<span style="color: #003366">
NodeRunnerIndex10-bc8226eb-4f3e      Search      Search Platform Services      ajhl2      Monitorable</span>
<span style="color: #003366">Microsoft.Ceres.CoreServices.Remoting.InvokerService : </span><span style="color: #003366"><strong><span style="color: #ff0000">Service invocation timed out after 179999 ms</span></strong>, </span>
<span style="color: #003366">method=GetRecoveryAction(lastPreparedGeneration) Service = {  </span>
<span style="color: #003366">            <strong>Implementation type=Microsoft.Ceres.SearchCore.JournalShipper.JournalShipper  </strong></span>
<span style="color: #003366">            Component: SPd9a8b223b429I.2.0.JournalShipper  </span>
<span style="color: #003366">            Exposer Name: JournalStreamControl</span>
<span style="color: #003366">}</span></p>
If you're actually still reading at this point, the 179 seconds reported in the timeout should trigger memories of a "Content Processing Activity" chart above where the average time was ~170 seconds (aka: the wall of yellow).
<h2>The takeaway...</h2>
If you see anything like this:

<a href="https://msdnshared.blob.core.windows.net/media/2016/04/AVImpactToo.png"><img class="alignnone  wp-image-585" src="https://msdnshared.blob.core.windows.net/media/2016/04/AVImpactToo-1024x731.png" alt="AVImpactToo" width="657" height="469" /></a>

Be thinking...
<ul>
	<li>Verify AV exclusions  <span style="color: #008000"><em>/* this is by far the most typical root cause that I've seen */</em></span></li>
	<li>Check for <a title="SP2013: Using Get-SPIndexReports to Troubleshoot Failed Master Merge" href="https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/07/08/sp2013-using-get-spindexreports-to-troubleshoot-failed-master-merge/">failing Master Merge</a></li>
	<li>Disable TCP Chimney Offload and IP Task Offload <span style="color: #008000"> <em>/* rare, but it can make an impact */</em></span></li>
	<li>And then dive into the other typical resources constraints (e.g. Disk, Network, CPU)</li>
</ul>
I hope this helps...]]></content:encoded>
    </item>
    <item>
      <title>Announcing the Search Health Reports (SRx) for SharePoint Search Diagnostics</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_strategery/announcing-the-search-health-reports-srx-for-sharepoint-search-diagnostics</link>
      <pubDate>Mon, 01 Feb 2016 02:45:00 GMT</pubDate>
      <dc:creator><![CDATA[bspender]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sharepoint_strategery/2016/02/01/announcing-the-search-health-reports-srx-for-sharepoint-search-diagnostics/</guid>
      <description><![CDATA[Brought to you by SearchEngineers@microsoft.com, the Search Health Reports (SRx) is a...]]></description>
      <content:encoded><![CDATA[<a href="https://msdnshared.blob.core.windows.net/media/2016/02/SRxIcon.png"><img width="50" height="48" class="wp-image-675 alignleft" alt="srxicon" src="https://msdnshared.blob.core.windows.net/media/2016/02/SRxIcon.png" /></a>Brought to you by <a href="mailto:SearchEngineers@microsoft.com">SearchEngineers@microsoft.com</a>, the <a href="https://gallery.technet.microsoft.com/SRx-Core-SharePoint-Search-d60113e9"><strong>Search Health Reports (SRx)</strong></a> is a PowerShell-driven tool for surfacing complex diagnostics for SharePoint Search through new multifaceted reports. The <strong><em>SRx</em></strong> includes a battery of tests that leverage a customized SSA object extended with contextual data from many disparate sources.

Our goal with this project is straightforward – empower users to <strong>troubleshoot Search more effectively</strong> so they can focus on solving business problems using Search.
<h2>Getting Started</h2>
First, <a href="https://gallery.technet.microsoft.com/SRx-Core-SharePoint-Search-d60113e9"><strong>download the SRxCore.zip</strong></a><strong> from TechNet Gallery</strong> to your SharePoint Search Farm and unzip the files on a SharePoint Server. Then, initialize the <strong><em>SRx</em></strong> environment by simply running the <span style="color: #00b0f0;font-family: Consolas">.\initSRx.ps1</span> script (which exists in the root of the unzipped <em>SRx</em> folder) as demonstrated in the screen shot below:

<a href="https://msdnshared.blob.core.windows.net/media/2016/02/SRxCore-Init.png"><img width="788" height="800" class="alignnone  wp-image-685" alt="srxcore-init" src="https://msdnshared.blob.core.windows.net/media/2016/02/SRxCore-Init.png" /></a>

This initialization script loads the custom PowerShell modules and creates a globally scoped <span style="color: #00b0f0;font-family: Consolas">$xSSA</span>, an extended Search Service Application object with many custom properties and methods.
<table style="border-color: #191970;border-width: 0px;background-color: #d3d3d3" border="0">
<tbody>
<tr>
<td><strong>Worth noting:
</strong>The SRx does not persist after closing a PowerShell window, so <strong>each time you open a new PowerShell window, start by running <span style="color: #00b0f0;font-family: Consolas">.\initSRx.ps1</span> to initialize the SRx</strong> and you'll be good to go from there.</td>
</tr>
</tbody>
</table>
<h2>Generating Test Results</h2>
<strong>[UPDATE 3/25/2016]</strong>  For a summary on each test, please refer to the following post: <a href="https://blogs.technet.com/b/onsearch/archive/2016/03/25/search-health-reports-srx-documentation-for-each-test.aspx">Search Health Reports (SRx) - Summary for each 'Test'</a>

From an initialized environment, you can then run a report including all of the tests with the following command:
<span style="color: #00b0f0;font-family: Consolas">New-SRxReport -RunAllTests</span>

<a href="https://msdnshared.blob.core.windows.net/media/2016/02/SRxHealth-TheHappyPath.png"><img width="800" height="758" class="alignnone  wp-image-695" alt="srxhealth-thehappypath" src="https://msdnshared.blob.core.windows.net/media/2016/02/SRxHealth-TheHappyPath-1024x971.png" /></a><a href="https://msdnshared.blob.core.windows.net/media/2016/02/SRxHealth-TheHappyPath.png"></a>

As seen above, this battery of tests verifies that applicable servers can be pinged, component-related processes and services are running, component states are all 'Active', internal Search WCF EndPoints can be browsed, Index components have sufficient space to complete a Master Merges, the Legacy Admin is synchronized with the Admin Component, and more.

When running this set of tests, you can also output more details about the test results by adding the <em>Details</em> flag, such as (and this is also an example of handling when things go bad):
<span style="color: #00b0f0;font-family: Consolas">New-SRxReport -RunAllTests -Details</span>

<a href="https://msdnshared.blob.core.windows.net/media/2016/02/SRxHealth-ThingsGoneBad.png"><img width="799" height="1391" class="alignnone wp-image-483" alt="SRxHealth-ThingsGoneBad" src="https://msdnshared.blob.core.windows.net/media/2016/02/SRxHealth-ThingsGoneBad-588x1024.png" /></a>

The SRx also extends and replaces my <a href="https://blogs.msdn.com/b/sharepoint_strategery/archive/2015/07/08/sp2013-using-get_2d00_spindexreports-to-troubleshoot-failed-master-merge.aspx">previously published Indexer Reports</a>, which you can generate in the SRx using the following:
<span style="color: #00b0f0;font-family: Consolas">$xSSA | Get-SRxIndexReports -DiskReport</span>

<a href="https://msdnshared.blob.core.windows.net/media/2016/02/SRx-IndexReport.png"><img width="800" height="596" class="alignnone  wp-image-705" alt="srx-indexreport" src="https://msdnshared.blob.core.windows.net/media/2016/02/SRx-IndexReport-1024x763.png" /></a>

----
<h2>Looking Forward…</h2>
As Search PFEs, we are working with several of our dedicated customers to build upon the <em>SRx Core</em> by developing the <strong>Search Health Reports Dashboard (SRx)</strong>, which entails a custom SharePoint hosted site collection for rendering diagnostic gauges, KPIs, and proactive reporting. Over the last few months, this project significantly matured with expanding functionality and robustness – for that<strong>, a giant thank you goes out for the heavy lifting from Eric Dixon, Brent Groom, and Russ Maxwell</strong>.

Over the coming weeks, expect to see many more <strong><em>SRx</em></strong> related posts here (<a href="https://blogs.msdn.com/b/sharepoint_strategery/">SharePoint Strategery</a>), on <a href="https://blogs.msdn.com/b/russmax/">SharePoint Brew (Russ Maxwell)</a>, and on <a href="https://blogs.msdn.com/b/ericdixon/">Eric Dixon's Search Blog</a> …all of which roll up to <a href="https://blogs.technet.com/b/onsearch/">our team blog (On Search)</a>. In these coming posts, anticipate more details on individual tests, announcements of new functionality, and recordings that demonstrate advanced usage (*including sneak peeks of the <em>SRx Dashboard</em>). Finally, we'll continue to update the <a href="https://gallery.technet.microsoft.com/SRx-Core-SharePoint-Search-d60113e9"><strong>SRx Core on TechNet Gallery with the latest enhancements</strong></a><strong>.</strong>

For any questions or feedback regarding this, please feel free to contact us at:
<a href="mailto:SearchEngineers@microsoft.com">SearchEngineers@microsoft.com</a>

...and to learn more about the <strong>Search Health Reports Dashboard (SRx)</strong>, contact your TAM to help get us engaged.

&nbsp;

&nbsp;

&nbsp;

---
And the legalese:<strong>
Disclaimer:</strong> As the "Search Engineers", we are a group of Microsoft PFEs focused primarily on SharePoint Search. We released the Search Health Reports (SRx) to help others get more out of Search, but the SRx should not be considered an official product . ALL information in this blog is provided "AS IS" with no warranties and confers no rights. This blog does not represent the thoughts, intentions, plans or strategies of my employer. All content is solely my opinion and provided with a best effort to be based in reality.

All examples, code samples, demonstrations, or anything resembling a “how-to” are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. Inappropriate comments will be deleted at the authors discretion. And yes, the spelling of <em>strategery</em> was intentional.]]></content:encoded>
    </item>
    <item>
      <title>SharePoint Search Topology Limits Clarified for the Crawl Component</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_strategery/sharepoint-search-topology-limits-clarified-for-the-crawl-component</link>
      <pubDate>Mon, 30 Nov 2015 02:30:00 GMT</pubDate>
      <dc:creator><![CDATA[bspender]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/11/30/sharepoint-search-topology-limits-clarified-for-the-crawl-component/</guid>
      <description><![CDATA[As more environments begin scaling out to the documented limits for Search, a common question tends...]]></description>
      <content:encoded><![CDATA[<p>As more environments begin scaling out to the documented limits for Search, a common question tends to get asked... "Does the Crawl Component count against the 64 component limit?" The short answer is... no,<strong> the Crawl Component does not count against the 64 component limit</strong>, and the documentation stating this has now been updated here (see the limits described for "Crawl Components" and "Search Components"):</p>
<p style="padding-left: 30px;"><strong>Software boundaries and limits for SharePoint 2013</strong><br /><a title="Software boundaries and limits for SharePoint 2013" href="https://technet.microsoft.com/en-us/library/cc262787.aspx#Search">https://technet.microsoft.com/en-us/library/cc262787.aspx#Search</a></p>
<p>For the longer answer, it makes sense to go back to see what&nbsp;the "Limits and Boundaries" formerly stated (until recently last week) to describe the limits for the Crawl Component...</p>
<table style="border: 1px solid #000000; border-image: none; background-color: #eeeeee;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="border-bottom: 1px solid #444444;" valign="top" width="100">
<p><strong>&nbsp;Limit </strong></p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="150">
<p><strong>Maximum value </strong></p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="105">
<p><strong>Limit type </strong></p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="500">
<p><strong>Notes </strong></p>
</td>
</tr>
<tr>
<td style="border-bottom: 1px solid #444444;" valign="top" width="100">
<p><strong>&nbsp;Crawl<br />&nbsp;components</strong></p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="150">
<p>&nbsp;1 per server</p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="105">
<p>Supported</p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="500">
<p><strong>There is no individual limit for the number of crawl components</strong> per Search service application. Instead the limit for <strong>the total <span style="background-color: #ffff00;">number of search components per Search service application</span> limits the number of crawl components</strong>.</p>
</td>
</tr>
<tr>
<td style="border-bottom: 1px solid #444444;" valign="top" width="100">
<p><strong>&nbsp;Search<br />&nbsp;components</strong></p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="150">
<p><span style="background-color: #ffff00;">64 per Search Service Application</span></p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="105">
<p>Supported</p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="500">
<p><strong>&nbsp;</strong></p>
</td>
</tr>
</tbody>
</table>
<p>Before going forward, let's tangent with a brief bit of background on the 64 component limit. With SharePoint 2013, the legacy SharePoint 2010 Search and FAST Search code bases were merged under a single umbrella. However, if you pull back the covers far enough, we can still see two systems at play where each resembles its predecessor and each with its own Admin Component.</p>
<p>The Crawl Component and the parent SSA object are largely managed by the Legacy Admin component that existed in SP2010. This is also referred to as the "Crawl Admin" because much of the object model calls for managing content sources and starting/stopping crawls gets handled by this Legacy Admin component. You can see the Legacy Admin component with<span style="font-family: courier new,courier; color: #3366ff;"> $SSA.AdminComponent</span>, but the object to which this refers is different than the Admin Component presented in the Topology web part you see in the Central Admin &gt; Search Administration page.</p>
<p>The parts of Search that evolved from FAST are internally known as the Juno system (e.g. all the components in the Topology other than the Crawl Component). The Admin Component seen in the Central Admin &gt; Search Administration page (or listed in the output of <span style="color: #3366ff; font-family: courier new,courier;">$SSA.ActiveTopology.GetComponents()</span>) primarily manages the state of the Search Index as well as all of the Juno components (again, everything but the Crawl Component).</p>
<p><strong>The 64 component limit is tied to the [Juno] Admin Component's ability to manage/synchronize all the other Juno components in a timely manner.</strong> Given that the Crawl Component is not part of the Juno system, it did not make sense to include the Crawl Component when considering this 64 component limit.</p>
<p>Being said, the Limits and Boundaries documentation has been updated accordingly, which now states:</p>
<table style="border: 1px solid #000000; border-image: none; background-color: #eeeeee;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="border-bottom: 1px solid #444444;" valign="top" width="100">
<p><strong>&nbsp;Limit </strong></p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="150">
<p><strong>Maximum value </strong></p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="105">
<p><strong>Limit type </strong></p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="500">
<p><strong>Notes </strong></p>
</td>
</tr>
<tr>
<td style="border-bottom: 1px solid #444444;" valign="top" width="100">
<p><strong>&nbsp;Crawl<br />&nbsp;components</strong></p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="150">
<p><span style="background-color: #99cc00;">16 per Search <br />service application</span>; <br />1 per server</p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="105">
<p>Supported</p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="500">&nbsp;</td>
</tr>
<tr>
<td style="border-bottom: 1px solid #444444;" valign="top" width="100">
<p><strong>&nbsp;Search<br />&nbsp;components</strong></p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="150">
<p>64 per Search <br />Service Application</p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="105">
<p>Supported</p>
</td>
<td style="border-bottom: 1px solid #444444;" valign="top" width="500">
<p><span style="background-color: #99cc00;"><strong>This limit does not include crawl components. </strong></span>The sum of the other search components must stay within this limit.</p>
</td>
</tr>
</tbody>
</table>
<p><br />In other words, you can now have a topology with, lets say, 68 total components (e.g. <span style="color: #3366ff; font-family: courier new,courier;">$SSA.ActiveTopology.GetComponents().Count</span>) that would be considered supported as long as there were no more than 64 Juno components (e.g. the number of Admin, CPC, Index, QPC, and APC components). So. for this particular example where the topology has 68 components, at least four of them would need to be Crawl Components (e.g. 68 total components - 4 Crawl Components = 64 Juno Components).</p>
<p>I hope this helps...</p>]]></content:encoded>
    </item>
    <item>
      <title>PowerShell: Getting Link Counts per Host Domain</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_strategery/powershell-getting-link-counts-per-host-domain</link>
      <pubDate>Thu, 03 Sep 2015 17:58:00 GMT</pubDate>
      <dc:creator><![CDATA[bspender]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sharepoint_strategery/2015/09/03/powershell-getting-link-counts-per-host-domain/</guid>
      <description><![CDATA[Let's consider this throwback Thursday. A couple of years ago, I posted this "PowerShell to...]]></description>
      <content:encoded><![CDATA[<p>Let's consider this throwback Thursday. A couple of years ago, I posted this "<a href="https://blogs.msdn.com/b/sharepoint_strategery/archive/2013/01/28/powershell-to-rebalance-crawl-store-dbs-in-sp2013.aspx">PowerShell to Rebalance Crawl Store DBs in SP2013</a>". As a side note, I mentioned the following PowerShell to leverage the CrawlLog object for viewing some Crawl Store level statistics about crawled documents, such as the "<em>Document Count</em>". For example:</p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;"><span style="color: #ff00ff;"><strong>$crawlLog</strong></span><strong> = New-Object Microsoft.Office.Server.Search.Administration.CrawlLog <span style="color: #ff00ff;">$SSA</span></strong></span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;"><span style="color: #ff00ff;"><strong>$dbHashtable</strong></span><strong> = <span style="color: #ff00ff;">$crawlLog</span>.GetCrawlDatabaseInfo()</strong></span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;"><span style="color: #ff00ff;"><strong>$dbHashtable</strong></span><strong>.Keys</strong></span><br /><span style="font-family: courier new,courier;"> &nbsp;&nbsp;&nbsp;&nbsp;Guid</span><br /><span style="font-family: courier new,courier;"> &nbsp;&nbsp;&nbsp; ----</span><br /><span style="font-family: courier new,courier;"> &nbsp;&nbsp;&nbsp; 2152167e-9dac-4d45-9724-4ed67f5d9643<span style="color: #008000;">&nbsp; #GUID of CrawlStoreOne</span></span><br /><span style="font-family: courier new,courier;"> &nbsp;&nbsp;&nbsp; ecd49946-2bde-4ccc-a2b2-c523554bd923<span style="font-family: courier new,courier; color: #008000;">&nbsp; #GUID of CrawlStoreTwo</span></span></p>
<p>The Crawl Store is perfect for any ongoing analysis and monitoring, but there are times when troubleshooting where it is incredibly helpful to capture counts directly from the <span style="font-family: courier new,courier; color: #3366ff;">MSSCrawlUrl</span> and <span style="color: #3366ff; font-family: courier new,courier;">MSSCrawlQueue</span> tables in the Crawl Store DB(s). In that same&nbsp;<em>rebalancing Crawl Store DBs</em>post, I demonstrated the following SQL Query (for each crawl store):</p>
<p style="padding-left: 30px;"><span class="ms-rteFontFace-2" style="font-family: courier new,courier; font-size: small;"><span class="ms-rteThemeForeColor-5-4" style="color: #3366ff;">SELECT </span>ContentSourceID, HostID, <span class="ms-rteThemeForeColor-9-3" style="color: #ff00ff;">COUNT</span>(*) <span class="ms-rteThemeForeColor-5-4" style="color: #3366ff;">AS </span>linkCount <span class="ms-rteThemeForeColor-5-4" style="color: #3366ff;"><br />FROM </span>[<strong>V5_SSA_CrawlStore</strong>].[dbo].[MSSCrawlURL] </span><span class="ms-rteFontFace-2" style="font-family: courier new,courier; font-size: small;"><span class="ms-rteThemeForeColor-5-4" style="color: #3366ff;">with </span>(nolock) <span class="ms-rteThemeForeColor-5-4" style="color: #3366ff;"><br />Group by </span>ContentSourceID, HostID<br /><span class="ms-rteThemeForeColor-5-4" style="color: #3366ff;">Order by</span> ContentSourceID, HostID</span></p>
<p>Which generated a report such as the following:</p>
<table class="ms-rteTable-4" style="width: 100%;" cellspacing="0">
<tbody>
<tr class="ms-rteTableHeaderRow-4" style="background-color: #1e90ff;"><th class="ms-rteTableHeaderEvenCol-4" style="width: 25%; text-align: left;" rowspan="1" colspan="1"><span class="ms-rteThemeForeColor-1-0" style="color: #ffffff;"><strong>Crawl Store DB Name</strong></span></th><th class="ms-rteTableHeaderOddCol-4" style="width: 25%; text-align: center;" rowspan="1" colspan="1"><span class="ms-rteThemeForeColor-1-0" style="color: #ffffff;"><strong>​ContentSourceID</strong></span></th><th class="ms-rteTableHeaderEvenCol-4" style="width: 25%; text-align: center;" rowspan="1" colspan="1"><span class="ms-rteThemeForeColor-1-0" style="color: #ffffff;"><strong>HostID​</strong></span></th><th class="ms-rteTableHeaderOddCol-4" style="width: 25%; text-align: center;" rowspan="1" colspan="1"><span class="ms-rteThemeForeColor-1-0" style="color: #ffffff;"><strong>linkCount​</strong></span></th></tr>
<tr style="background-color: #dcdcdc;">
<td class="ms-rteTableEvenCol-4"><strong>​V5_SSA_CrawlStore</strong></td>
<td class="ms-rteTableOddCol-4" style="text-align: center;">​1</td>
<td class="ms-rteTableEvenCol-4" style="text-align: center;">​4</td>
<td class="ms-rteTableOddCol-4" style="text-align: center;">​20,558</td>
</tr>
<tr style="background-color: #dcdcdc;">
<td class="ms-rteTableEvenCol-4"><strong>​V5_SSA_CrawlStore</strong></td>
<td class="ms-rteTableOddCol-4" style="text-align: center;">6</td>
<td class="ms-rteTableEvenCol-4" style="text-align: center;">​2</td>
<td class="ms-rteTableOddCol-4" style="text-align: center;">​14,813</td>
</tr>
<tr style="background-color: #dcdcdc;">
<td class="ms-rteTableEvenCol-4"><strong>​V5_SSA_CrawlStore</strong></td>
<td class="ms-rteTableOddCol-4" style="text-align: center;">6</td>
<td class="ms-rteTableEvenCol-4" style="text-align: center;">​3</td>
<td class="ms-rteTableOddCol-4" style="text-align: center;">​10,818</td>
</tr>
<tr class="ms-rteTableEvenRow-4">
<td class="ms-rteTableEvenCol-4"><strong>​V5_SSA_CrawlStore2</strong></td>
<td class="ms-rteTableOddCol-4" style="text-align: center;">​4</td>
<td class="ms-rteTableEvenCol-4" style="text-align: center;">​1</td>
<td class="ms-rteTableOddCol-4" style="text-align: center;">77,836</td>
</tr>
<tr class="ms-rteTableOddRow-4" style="background-color: #dcdcdc;">
<td class="ms-rteTableEvenCol-4" rowspan="1"><strong>​V5_SSA_CrawlStore3</strong></td>
<td class="ms-rteTableOddCol-4" style="text-align: center;" rowspan="1">​4</td>
<td class="ms-rteTableEvenCol-4" style="text-align: center;" rowspan="1">​1</td>
<td class="ms-rteTableOddCol-4" style="text-align: center;" rowspan="1">​79,835</td>
</tr>
</tbody>
</table>
<div class="ExternalClassB92F849354FC4A1A874D5A698E0411F4">&nbsp;</div>
<p>...but there are times where you just don't have access to SQL and don't have a DBA handy. For this, fear not for we have PowerShell to the rescue.</p>
<p>I recently <a href="https://gallery.technet.microsoft.com/office/Domain-Count-Extraction-e0c247e6">developed/posted the Get-SPCrawlURLCounts-v2.0.psm1 module here</a> (it's version 2.0 because this is a replacement to the one previously published by Brent Groom and Eric Dixon), which enables us to make the query from PowerShell.</p>
<p>In this first screen shot, we can see the comparable results from the CrawlLog versus the output from the custom module (and just to re-iterate, <span style="background-color: #ffff00;"><strong>the CrawlLog is the preferred option for everyday use</strong></span> and creates the least impact) :</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/41/2474.GetURLCountsFromCrawlLog.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-41/2474.GetURLCountsFromCrawlLog.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/41/2474.GetURLCountsFromCrawlLog.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-41/2474.GetURLCountsFromCrawlLog.PNG" alt="" border="0" /></a></p>
<p>As I noted before (and as the script will prompt you the first time it runs), be mindful when running this module as it can have impact to the performance of your SSA. In other words, <span style="background-color: #ffff00;">this script is intended for troubleshooting scenarios</span> <span style="color: #ff0000;"><strong>...do not regularly run or schedule this query.</strong></span></p>
<p style="padding-left: 30px;">In fact, it's time to bring back my standard <span><strong>disclaimer:&nbsp;</strong><span style="color: #3366ff;"><br />ALL information in this blog is provided "AS IS" with no warranties and confers no rights. This blog does not represent the thoughts, intentions, plans or strategies of my employer. All content is solely my opinion and provided with a best effort to be based in reality.<strong> All examples, code samples, demonstrations, or anything resembling a &ldquo;how-to&rdquo; are provided <span style="color: #000000;">"<em>AS IS</em>"</span> without warranty of any kind</strong>, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. Inappropriate comments will be deleted at the authors discretion. And yes, the spelling of <em>strategery</em> was intentional. <br /></span></span></p>
<p>OK, being said... In the screen shot below, we see further examples of how to use this new custom module:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/41/5444.GetURLCountsPerContentDB.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-41/5444.GetURLCountsPerContentDB.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/41/5444.GetURLCountsPerContentDB.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-41/5444.GetURLCountsPerContentDB.PNG" alt="" border="0" /></a></p>
<p>The benefit to crafting this into a module (versus a script) is that the cmdlet can be invoked as any of the following:</p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;"><span style="color: #3366ff;">Get-SPCrawlURLCounts</span> -ByContentSource</span><br /><span style="font-family: courier new,courier;"><span style="color: #3366ff;">Get-SPCrawlURLCounts</span> -ByHostId</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;"><span style="color: #3366ff;"><span style="font-family: courier new,courier; color: #008000;">#"detailed" is equivalent to: Get-SPCrawlURLCounts -ByContentSource -ByHostId</span><br />Get-SPCr<em></em>awlURLCounts</span> &ndash;Detailed<br /></span></p>
<p>We can even pipeline an $SSA object directly to it, such as:</p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;"><span style="color: #3366ff;"><span style="color: #ff00ff;">$SSA</span><span style="color: #000000;"> |</span> Get-SPCr<em></em>awlURLCounts</span> &ndash;Detailed</span></p>
<p>Also, we can easily substitute in the <em>MSSCrawlQueue</em> table instead of the <em>MSSCrawlUrl</em> on the fly and get counts from the queue instead. For example:</p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;"><span style="color: #3366ff;">Get-SPCrawlURLCounts</span> &ndash;Detailed -inQueue</span></p>
<p>But the real reason for writing this version 2.0 was to have the end product be an array of objects that could be further manipulated (and there is still the option to export the CSV). For example:</p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;"><span style="color: #3366ff;">Get-SPCrawlURLCounts</span> -Detailed |&nbsp; <span style="color: #3366ff;"><strong>WHERE</strong></span> {<span style="color: #ff00ff;">$_</span>.HostName -match "<span style="color: #800000;">chotchkies.lab</span>"}</span></p>
<p>And exporting to CSV is easily accomplished by tacking on the flag &ldquo;-toCSV&rdquo; (optionally, you can specify a custom path with the &ldquo;&ndash;Path c:\custom\&rdquo; parameter ...otherwise the CSV file is created in the local path), such as:</p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;"><span style="color: #3366ff;">Get-SPCrawlURLCounts</span> -Detailed -toCSV</span></p>
<p>--------------------</p>
<p>To run this:<strong></strong></p>
<p style="padding-left: 30px;"><strong>1. Import </strong>the module, such as:<strong><br /></strong><span style="font-family: courier new,courier; color: #3366ff;">Import-Module</span><span style="font-family: courier new,courier;"> ".\Get-SPCrawlURLCounts-v2.0.psm1"</span></p>
<p style="padding-left: 30px;"><strong>2. Then run</strong> it as the examples above:<br /><span style="font-family: courier new,courier;"><span style="color: #ff00ff;">$SSA</span> | <span style="color: #3366ff;">Get-SPCrawlURLCounts</span> &ndash;Detailed -toCSV</span></p>
<p>(<strong>And, for what it&rsquo;s worth: </strong>I plan to add more into this crawl diagnostics module later&hellip;)</p>
<p>I hope this helps...</p>]]></content:encoded>
    </item>
  </channel>
</rss>