DOI QR코드

DOI QR Code

Improving Haskell GC-Tuning Time Using Divide-and-Conquer

분할 정복법을 이용한 Haskell GC 조정 시간 개선

  • 안형준 (부산대학교 전기전자컴퓨터공학과) ;
  • 김화목 (부산대학교 전기전자컴퓨터공학과) ;
  • 류샤오 (부산대학교 전기전자컴퓨터공학과) ;
  • 김연어 (부산대학교 전기전자컴퓨터공학과) ;
  • 변석우 (경성대학교 컴퓨터공학부) ;
  • 우균 (부산대학교 전기전자컴퓨터공학과)
  • Received : 2017.07.21
  • Accepted : 2017.08.02
  • Published : 2017.09.30

Abstract

The performance improvement of a single core processor has reached its limit since the circuit density cannot be increased any longer due to overheating. Therefore, the multicore and manycore architectures have emerged as viable approaches and parallel programming becomes more important. Haskell, a purely functional language, is getting popular in this situation since it naturally supports parallel programming owing to its beneficial features including the implicit parallelism in evaluating expressions and the monadic tools supporting parallel constructs. However, the performance of Haskell parallel programs is strongly influenced by the performance of the run-time system including the garbage collector. Though a memory profiling tool namely GC-tune has been suggested, we need a more systematic way to use this tool. Since GC-tune finds the optimal memory size by executing the target program with all the different possible GC options, the GC-tuning time takes too long. This paper suggests a basic divide-and-conquer method to reduce the number of GC-tune executions by reducing the search area by one-quarter for every searching step. Applying this method to two parallel programs, a maximally independent set and a K-means programs, the memory tuning time is reduced by 7.78 times with accuracy 98% on average.

발열 때문에 더이상 회로 집적도를 높일 수 없기 때문에 단일 코어 프로세서의 성능 향상은 한계에 달했다. 그래서 코어를 여러 개 사용하는 멀티 코어, 매니 코어 형태의 프로세서가 등장했으며 병렬 프로그래밍이 중요해졌다. 이러한 상황에서 병렬 프로그래밍에 여러 장점이 있는 순수 함수형 언어 Haskell이 주목받고 있다. Haskell은 식 계산 방식에서 이미 병렬성이 내재되어 있으며 병렬 구조를 지원하는 모나드 도구를 제공한다. 그런데 Haskell 병렬 프로그램의 성능은 메모리 재사용 시스템을 포함한 실행시간 시스템에 큰 영향을 받는다. 이미 Haskell이 제공하는 메모리 프로파일링 도구로 GC-tune이 있지만, GC-tune은 가능한 모든 GC 옵션에 대해 프로그램 실행 시간을 반복 측정하기 때문에 GC 조정 시간이 너무 오래 걸린다. 그래서 본 연구에서는 기본적인 분할 정복법을 이용해서 GC-tune의 탐색 영역을 매 단계마다 4분의 1로 줄이는 방법을 제안한다. 제안하는 방법을 두 가지 병렬 프로그램(극대 독립 집합 프로그램과 K-평균 프로그램)에 적용한 결과, 평균 98%의 정확도로 실행 시간을 평균 7.78배 단축시켰다.

Keywords

References

  1. Marc Airhart. Hot Chips: Managing Moore's Law, 2015. [Online; accessed 22-may-2017]. URL: https://news.utexas.edu/2015/04/15/hot-chips-managing-moores-law.
  2. L. Chai, Q. Gao, and D. K. Panda. "Understanding the impact of multi-core architecture in cluster computing: A case study with intel dual-core system," Cluster Computing and the Grid 2007. Seventh IEEE International Symposium on. IEEE, pp.471-478, 2007.
  3. Y. Kim and S. Kim, "Technology and Trends of High Performance Processors," Electronics and Telecommunications Trends, No.6, pp.123-136, 2014.
  4. J. Kim, S. Byun, K. Kim, J. Jung, K. Koh, S. Cha, and S. Jung, "Technology Trends of Haskell Parallel Programming in the Manycore Era," Electronics and Telecommunications Trends, No.29, pp.167-175, 2014.
  5. H. Kim, H. An, S. Byun, and G. Woo, "An Approach to Improve the Scalability of Parallel Haskell Programs," Proceedings of 2016 International Conference on Computing Convergence and Applications (ICCCA 2016), pp.175-178, 2016.
  6. T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, "Introduction to algorithms," 3rd ed., MIT press, 2009.
  7. G. Brassard and P. Bratley, "Fundamentals of algorithmics," Vol.33. Englewood Cliffs: Prentice Hall, 1996.
  8. P. M. Sansom and S. L. Peyton Jones, "Generational garbage collection for Haskell," Proceedings of the Conference on Functional Programming Languages and Computer Architecture, pp.106-116, 1993.
  9. The ghc-gc-tune package, Graph performance of Haskell programs with different GC flags [Internet], https://hackage.haskell.org/package/ghc-gc-tune, 2017.
  10. G. Chris and R. Gordon, "Algebraic Graph Theory," Springer New York, 2001.