1. A method for automatically assigning a plurality of resources in a distributed computing system to the same resource set, the method comprising: collecting a particular set of statistics about accesses to resources on a plurality of servers; determining an affinity context value for each resource of a plurality of resources for an application, the affinity context value corresponding to an amount of correlation between the allocation of each resource of the plurality of resources among the plurality of servers in a given context and the allocation of other resources of the plurality of resources among the plurality of servers in the given context; identifying a closely coupled plurality of resources among the plurality of resources for the application based on the affinity context values for the plurality of resources for the application, each resource of the closely coupled plurality of resources having a matching affinity context value; and assigning, by a grid switch, the closely coupled plurality of resources to a particular resource set on a particular server of the plurality of servers based on the particular set of statistics about accesses to resources on the plurality of servers.