Network security is becoming more and more important because there is a lot of anomaly traffic information in some websites such as online education. In order to detect the anomaly traffic effectively, we can use some cloud computing tools such as Hadoop. For the sake of good performance of Hadoop, we need to do performance tuning. This paper mainly focused on the two aspects of performance tuning: 1. This paper deeply researched the phases of Hadoop (like Map and Reduce) and the effective of Hadoop had been greatly improved with the help of performance tuning. 2. This paper pointed out a compressed Trie algorithm to replace the hash table during the map phase and solved the problem of low efficiency.