P2P network is the one of the most important application models in Internet. Numerous structured and unstructured P2P models have been proposed in the last ten years, and both models do have distinctive advantages and disadvantages. We proposed a hybrid model to strike a balance between these two models using peer grouping. Since the size of peer groups is essential to performance, we analyze the effect of group size on the maintenance cost, which is measured in terms of the number of maintenance messages. Experimental results suggest that the group size obtained from our theoretical analysis is very close to the actual best group size obtained from simulation, and the hybrid model uses less messages in maintaining a P2P network than Chord does.