Comparison of Evolutionary Algorithm and Heuristics for Flow Optimization in P2P Systems Nowadays, many Internet users make use of Peer-to-Peer (P2P) systems to download electronic content including music, movies, software, etc. Growing popularity in P2P based protocol implementations for file sharing purposes caused that the P2P traffic exceeds Web traffic and in accordance with to many statistics, P2P systems produce a more than 50% of the whole Internet traffic. Therefore, P2P systems provide remarkable income for Internet Service Providers (ISP). However, at the same time P2P systems generates many problems related to traffic engineering, optimization, network congestion. In this paper we focus on the problem of flow optimization in P2P file sharing systems. Corresponding to BitTorrent-based systems behaviour, the optimization of P2P flows is very complex and in this work we consider different heuristic strategies for content distribution and moreover we propose a new evolutionary algorithm (EA) for this problem. We compare results of the algorithms against optimal results yielded by CPLEX solver for networks including 10 peers and relation to random algorithm for 100-node systems. According to numerical experiments, the EA provides solutions close to optimal for small instances and all of the heuristics exhibit a superior performance over random search.