FPGA vs. Multi-core CPUs vs. GPUs: Hands-On Experience with a Sorting Application

  • Cristian Grozea
  • Zorana Bankovic
  • Pavel Laskov
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6310)


Currently there are several interesting alternatives for low-cost high-performance computing. We report here our experiences with an N-gram extraction and sorting problem, originated in the design of a real-time network intrusion detection system. We have considered FPGAs, multi-core CPUs in symmetric multi-CPU machines and GPUs and have created implementations for each of these platforms. After carefully comparing the advantages and disadvantages of each we have decided to go forward with the implementation written for multi-core CPUs. Arguments for and against each platform are presented – corresponding to our hands-on experience – that we intend to be useful in helping with the selection of the hardware acceleration solutions for new projects.


parallel sort FPGA GPU CUDA multi-core OpenMP VHDL 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
  2. 2.
  3. 3.
    Project ReMIND (2007),
  4. 4.
  5. 5.
    Batcher, K.E.: Sorting networks and their applications. In: Proceedings of the Spring Joint Computer Conference, April 30-May 2, pp. 307–314. ACM, New York (1968)Google Scholar
  6. 6.
    Brodtkorb, A.R., Dyken, C., Hagen, T.R., Hjelmervik, J., Storaasli, O.O.: State-of-the-Art In Heterogeneous Computing. Journal of Scientific Programming (draft, accepted for publication)Google Scholar
  7. 7.
    Chamberlain, R.D., Ganesan, N.: Sorting on architecturally diverse computer systems. In: Proceedings of the Third International Workshop on High-Performance Reconfigurable Computing Technology and Applications, pp. 39–46. ACM, New York (2009)Google Scholar
  8. 8.
    Che, S., Li, J., Sheaffer, J.W., Skadron, K., Lach, J.: Accelerating compute-intensive applications with gpus and fpgas. In: Symposium on Application Specific Processors (2008)Google Scholar
  9. 9.
    Dagum, L., Menon, R.: Open MP: An Industry-Standard API for Shared-Memory Programming. IEEE Computational Science and Engineering 5(1), 46–55 (1998)CrossRefGoogle Scholar
  10. 10.
    Dongarra, J., Gannon, D., Fox, G., Kennedy, K.: The impact of multicore on computational science software. CTWatch Quarterly (February 2007)Google Scholar
  11. 11.
    Grozea, C., Gehl, C., Popescu, M.: ENCOPLOT: Pairwise Sequence Matching in Linear Time Applied to Plagiarism Detection. In: 3rd Pan Workshop. Uncovering Plagiarism, Authorship And Social Software Misuse, p. 10Google Scholar
  12. 12.
    Harkins, J., El-Ghazawi, T., El-Araby, E., Huang, M.: Performance of sorting algorithms on the SRC 6 reconfigurable computer. In: Proceedings of the 2005 IEEE International Conference on Field-Programmable Technology, pp. 295–296 (2005)Google Scholar
  13. 13.
    Hofstee, H.P.: Power efficient processor architecture and the Cell processor. In: Proceedings of the 11th International Symposium on High-Performance Computer Architecture, San Francisco, CA, pp. 258–262 (2005)Google Scholar
  14. 14.
    Hou, Q., Zhou, K., Guo, B.: BSGP: bulk-synchronous GPU programming. In: ACM SIGGRAPH 2008 papers, p. 19. ACM, New York (2008)Google Scholar
  15. 15.
    Klöckner, A., Pinto, N., Lee, Y., Catanzaro, B., Ivanov, P., Fasih, A., Sarma, A.D., Nanongkai, D., Pandurangan, G., Tetali, P., et al.: PyCUDA: GPU Run-Time Code Generation for High-Performance Computing. Arxiv preprint arXiv:0911.3456 (2009)Google Scholar
  16. 16.
    Korrenek, J., Sekanina, L.: Intrinsic evolution of sorting networks: A novel complete hardware implementation for FPGAs. LNCS, pp. 46–55. Springer, HeidelbergGoogle Scholar
  17. 17.
    Koza, J.R., Bennett III, F.H., Hutchings, J.L., Bade, S.L., Keane, M.A., Andre, D.: Evolving sorting networks using genetic programming and the rapidlyreconfigurable Xilinx 6216 field-programmable gate array. In: Conference Record of the Thirty-First Asilomar Conference on Signals, Systems & Computers, vol. 1 (1997)Google Scholar
  18. 18.
    Krueger, T., Gehl, C., Rieck, K., Laskov, P.: An Architecture for Inline Anomaly Detection. In: Proceedings of the 2008 European Conference on Computer Network Defense, pp. 11–18. IEEE Computer Society, Los Alamitos (2008)CrossRefGoogle Scholar
  19. 19.
    Leischner, N., Osipov, V., Sanders, P.: GPU sample sort. Arxiv preprint arXiv:0909.5649 (2009)Google Scholar
  20. 20.
    Lindholm, E., Nickolls, J., Oberman, S., Montrym, J.: NVIDIA Tesla: A unified graphics and computing architecture. IEEE Micro, 39–55 (2008)Google Scholar
  21. 21.
    Martinez, J., Cumplido, R., Feregrino, C.: An FPGA-based parallel sorting architecture for the Burrows Wheeler transform. In: ReConFig 2005. International Conference on Reconfigurable Computing and FPGAs, p. 7 (2005)Google Scholar
  22. 22.
    Muller, M.S., Knupfer, A., Jurenz, M., Lieber, M., Brunst, H., Mix, H., Nagel, W.E.: Developing Scalable Applications with Vampir, VampirServer and VampirTrace. In: Proceedings of the Minisymposium on Scalability and Usability of HPC Programming Tools at PARCO (2007) (to appear)Google Scholar
  23. 23.
    Munshi, A.: The OpenCL specification version 1.0. Khronos OpenCL Working Group (2009)Google Scholar
  24. 24.
    Nickolls, J., Buck, I., Garland, M., Skadron, K.: Scalable parallel programming with CUDA (2008)Google Scholar
  25. 25.
    Owens, J.D., Houston, M., Luebke, D., Green, S., Stone, J.E., Phillips, J.C.: GPU computing. Proceedings-IEEE 96(5), 879 (2008)CrossRefGoogle Scholar
  26. 26.
    Rieck, K., Laskov, P.: Language models for detection of unknown attacks in network traffic. Journal in Computer Virology 2(4), 243–256 (2007)CrossRefGoogle Scholar
  27. 27.
    Satish, N., Harris, M., Garland, M.: Designing efficient sorting algorithms for manycore GPUs. In: Proceedings of the 2009 IEEE International Symposium on Parallel&Distributed Processing, pp. 1–10. IEEE Computer Society, Los Alamitos (2009)CrossRefGoogle Scholar
  28. 28.
    Sengupta, S., Harris, M., Zhang, Y., Owens, J.D.: Scan primitives for GPU computing. In: Proceedings of the 22nd ACM SIGGRAPH/EUROGRAPHICS Symposium on Graphics Hardware, p. 106. Eurographics Association (2007)Google Scholar
  29. 29.
    Smith, M.C., Vetter, J.S., Alam, S.R.: Scientific computing beyond CPUs: FPGA implementations of common scientific kernels. In: Proceedings of the 8th International Conference on Military and Aerospace Programmable Logic Devices, MAPLD 2005, Citeseer (2005)Google Scholar
  30. 30.
    Stone, H.S.: Parallel processing with the perfect shuffle. IEEE Transactions on Computers 100(20), 153–161 (1971)CrossRefzbMATHGoogle Scholar
  31. 31.
    Thomas, D.B., Howes, L., Luk, W.: A comparison of CPUs, GPUs, FPGAs, and massively parallel processor arrays for random number generation. In: Proceeding of the ACM/SIGDA International Symposium on Field Programmable Gate Arrays, pp. 63–72. ACM, New York (2009)CrossRefGoogle Scholar
  32. 32.
    Williams, S., Shalf, J., Oliker, L., Kamil, S., Husbands, P., Yelick, K.: The potential of the cell processor for scientific computing. In: Proceedings of the 3rd Conference on Computing Frontiers, pp. 9–20. ACM, New York (2006)Google Scholar
  33. 33.
    Wu, Y.L., Chang, D.: On the NP-completeness of regular 2-D FPGA routing architectures and a novel solution. In: Proceedings of the 1994 IEEE/ACM International Conference on Computer-Aided Design, pp. 362–366. IEEE Computer Society Press, Los Alamitos (1994)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Cristian Grozea
    • 1
  • Zorana Bankovic
    • 2
  • Pavel Laskov
    • 3
  1. 1.Fraunhofer Institute FIRSTBerlinGermany
  2. 2.ETSI TelecomunicaciónTechnical University of MadridMadridSpain
  3. 3.Wilhelm Schickard Institute for Computer ScienceUniversity of Tuebingen, Sand 1TuebingenGermany

Personalised recommendations