What algorithms (the simpler, the better) are there for balancing items across multiple containers? In this particular case, the "items" are actually SharePoint site collections and the "containers" are SharePoint content databases. We have some content databases that are very large, and some that are quite small. We'd like to figure out some way to migrate sites from heavily-loaded content databases to the smaller ones. I'm hoping I can do this automatically, like some script (IronRuby?) that I can trigger and then it will in turn trigger the movement of sites between the various content databases. Of course the end result should be that each content database would have roughly the same size. Thanks!
|
|
I think what you want is a solution for balancing the sizes of the content databases? I think your best bet would be create a script that you run N-times a day/week (N is determined by your project specifics) that would balance the size of your content databases by shifting sites to less used content databases. here is a link to a site that discusses how to export some of the content databases. http://www.mssqltips.com/tip.asp?tip=1777 from the said site link here
Although what the site shows is something to be done by someone, you can easily modify what he did and create a windows service out of it. You could simply add all sizes of all the content databases and transfer some of the entries of the large databases to the smaller ones, depends on your strategy. |
||||||
|
Now is a GREAT time to advertise!
Send us an email at sales{AT}nullpointer.ph|
|
Simplest would be round robin. Create a list of all the containers, store the last container used and pick the next one on the list. This is probably the easiest to implement but the end result will not guarantee similar sizes. The next simplest algo (IMO) would be to keep a counter of all the remaining spaces per container and pick the container with the most free space. |
||
|
|