Last year I was working on a system where we were creating a lot of sites. I mean, tens of thousands of sites, and all within one site collection (they’d all have a few documents and tasks, but not many). Anyway, we were told by a partner’s developer that:
- A Site Collection’s Root Site could only have 127 subsites before performance issues would start
- Each of those subsites could have up to 2000 subsites before performance issues would start
This seemed a bit suspicious to me. I had read on MSDN about the capacity boundaries and limits, and knew about the 2000 subsites per site note:
2,000 per site view
The interface for enumerating subsites of a given Web site does not perform well as the number of subsites surpasses 2,000. Similarly, the All Site Content page and the Tree View Control performance will decrease significantly as the number of subsites grows.
Okay, that’s fine. And I knew that the limit on the number of Sites per Site Collection is 250,000. But I couldn’t find anything about this ‘127’ subsites under the root site thing, and I couldn’t help but wonder if this was where the ‘127’ value had come from (125 x 2000 = 250,000) as I simply didn’t see why a root site should be any different to any other type of site. Thus, I decided to test it.
I created a site template that I’d use with all tests – it was pretty lightweight, with a documents library, announcements list, and task list. I then wrote a console application to create a large number of sites based on that template.
My first test was simply creating a large number of sites directly underneath the root site – I wanted to see if there was some ‘127’ subsite threshold. The graph below shows the creation time of each site (in milliseconds), and a moving average.
Well, that was pretty interesting. A flat average creation time per site until a little over 2000 sites, when there is a step change in the creation time. That suggests there is no problem with having more than 127 subsites of the root site.
My next question was about how to ‘avoid’ this limit. If we had ‘spreading’ sites underneath our root site, and then created up to 2000 sites under those spreading sites, could we create much more than 2000 sites? The technet documentation says that we should be able to, but I decided to test this anyway. So, the structure would be something like:
The following graph shows the result of creating a large number of sites using these ‘spreading sites’. The time is in milliseconds:
This shows a fairly flat average creation time (with a few spurious spikes – presumably something else was happening on the machine) for over 28,000 sites. There doesn’t seem to be much performance degradation.
Therefore, my conclusions:
- Root Sites are like any other site – and that if you put more than 2000 subsites within it, you may see a sudden performance drop.
- If you insert another layer of sites into your heirarchy – so that no site has more than 2000 subsites – SharePoint works quite happily.