At present traffic classification is widely concerned in many research fields such as network security, traffic scheduling and traffic accounting. How to identify network traffic fast and accurately is a very meaningful thing. But most machine learning based methods have a lower speed and efficiency, and cannot guarantee their stability and usability. For this reason a Principal Component Analysis (PCA) based method is proposed in the paper. At first the method use Fast Correlation-Based Filter (FCBF) algorithm to filter training data set to obtain suitable flow attributes.