We investigate the trade-off between the risk-sharing gains enjoyed by more inter- connected firms and the large-scale costs resulting from an increased risk exposure. We find that when the distribution of the shocks displays “fat” tails, extreme segmentation into small components is optimal, while minimal segmentation and high density of connections are optimal when the distribution exhibits “thin” tails. For less regular distributions, intermediate degrees of segmentation and sparser connections are optimal. Also, a conflict typically arises between efficiency and pairwise stability, due to a “size externality” not internalized by firms. Finally, optimality requires perfect assortativity for firms in a component.