Peer-to-peer (P2P) topology has a significant influence on the performance, search efficiency and functionality, and scalability of the application. In this paper, we investigate a multi-swarm approach to the problem of Neighbor Selection (NS) in P2P networks. Particle swarm optimization algorithm share some common characteristics with P2P in a dynamic social environment. Each particle encodes the upper half of the peer-connection matrix through the undirected graph, which reduces the search space dimension. The synergetic performance is achieved by the adjustment to the velocity influenced by the individual's cognition, the group cognition from multi-swarms, and the social cognition from the whole swarm. The performance of the proposed approach is evaluated and compared with two other different algorithms. The results indicate that it usually required shorter time to obtain better results than the other considered methods, specially for large scale problems.