With the rapid growth of different massive applications and parallel flow requests in Data Center Networks (DCNs), today's providers are confronting challenges in flow forwarding decisions. Since Software Defined Networking (SDN) provides fine granular control, it can be intelligently programmed to distinguish between flow requirements. The present article proposes a knapsack model in which the link bandwidth and incoming flows are modeled as a knapsack capacity and items, respectively. Furthermore, each flow consists of two size and value aspects, acquired through flow size extraction and the type of service value assigned by the SDN controller decision. Indeed, the current work splits the incoming flow size range into Type of Service (ToS) decimal value numbers. The lower the flow size category, the higher the value dedicated to the flow. Particle Swarm Optimization (PSO) optimizes the knapsack problem and first forwards the selected flows by KP-PSO, and the non-selected-flows second. To address the shortcomings of these methods in the event of dense parallel flow detection, the present study puts the link under the threshold of a 70 percent load by simultaneous requests. Experimental results indicate that the proposed method outperforms Sonum, Hedera, and ECMP in terms of flow completion time, packet loss rate, and goodput regarding flow size requirements.