skip to main content
research-article

Space profiling for parallel functional programs

Published:20 September 2008Publication History
Skip Abstract Section

Abstract

This paper presents a semantic space profiler for parallel functional programs. Building on previous work in sequential profiling, our tools help programmers to relate runtime resource use back to program source code. Unlike many profiling tools, our profiler is based on a cost semantics. This provides a means to reason about performance without requiring a detailed understanding of the compiler or runtime system. It also provides a specification for language implementers. This is critical in that it enables us to separate cleanly the performance of the application from that of the language implementation.

Some aspects of the implementation can have significant effects on performance. Our cost semantics enables programmers to understand the impact of different scheduling policies while hiding many of the details of their implementations. We show applications where the choice of scheduling policy has asymptotic effects on space use. We explain these use patterns through a demonstration of our tools. We also validate our methodology by observing similar performance in our implementation of a parallel extension of Standard ML.

Skip Supplemental Material Section

Supplemental Material

Video

References

  1. Shail Aditya, Arvind, Jan-Willem Maessen, and Lennart Augustsson. Semantics of pH: A parallel dialect of Haskell. Technical Report Computation Structures Group Memo 377, MIT, June 1995.Google ScholarGoogle Scholar
  2. Andrew W. Appel, Bruce Duba, and David B. MacQueen. Profiling in the presence of optimization and garbage collection. Technical Report CS-TR-197-88, Princeton University, November 1988.Google ScholarGoogle Scholar
  3. Arvind, Rishiyur S. Nikhil, and Keshav K. Pingali. I-structures: data structures for parallel computing. ACM Trans. Program. Lang. Syst., 11 (4): 598--632, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Guy Blelloch and John Greiner. Parallelism in sequential functional languages. In Proc. of the Int. Conf. on Funct. Program. Languages and Computer Architecture, pages 226--237, New York, NY, USA, 1995. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Guy E. Blelloch and John Greiner. A provable time and space efficient implementation of NESL. In Proc. of the Int. Conf. on Funct. Program., pages 213--225, May 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Guy E. Blelloch and Gary W. Sabot. Compiling collection-oriented languages onto massively parallel computers. J. Parallel Distrib. Comput., 8 (2): 119--134, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Guy E. Blelloch, Jonathan C. Hardwick, Jay Sipelstein, Marco Zagha, and Siddhartha Chatterjee. Implementation of a portable nested data-parallel language. J. Parallel Distrib. Comput., 21 (1): 4--14, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Guy E. Blelloch, Phillip B. Gibbons, and Yossi Matias. Provably efficient scheduling for languages with fine-grained parallelism. J. ACM, 46 (2): 281--321, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Robert D. Blumofe and Charles E. Leiserson. Space-efficient scheduling of multithreaded computations. SIAM J. Comp., 27 (1): 202--229, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Robert D. Blumofe and Charles E. Leiserson. Scheduling multithreaded computations by work stealing. J. ACM, 46 (5): 720--748, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Manuel M. T. Chakravarty and Gabriele Keller. More types for nested data parallel programming. In Proc. of the Int. Conf. on Funct. Program., pages 94--105, New York, NY, USA, 2000. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Nathan Charles and Colin Runciman. An interactive approach to profiling parallel functional programs. In Selected Papers of the Workshop on the Implementation of Funct. Languages, pages 20--37, London, UK, September 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Perry Cheng and Guy E. Blelloch. A parallel, real-time garbage collector. SIGPLAN Not., 36 (5): 125--136, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Silvain Conchon and Fabrice Le Fessant. Jocaml: Mobile agents for objective-caml. In Proc. of the Int. Symposium on Agent Systems and Applications, page 22, Washington, DC, USA, 1999. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Robert Ennals. Adaptive Evaluation of Non-Strict Programs. PhD thesis, University of Cambridge, 2004.Google ScholarGoogle Scholar
  16. Matthew Fluet, Nic Ford, Mike Rainey, John Reppy, Adam Shaw, and Yingqi Xiao. Status report: the manticore project. In Proc. of the Workshop on ML, pages 15--24, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Matthew Fluet, Michael Rainey, and John Reppy. A scheduling framework for general-purpose parallel languages. In Proc. of the Int. Conf. on Funct. Program., New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Jörgen Gustavsson and David Sands. A foundation for space-safe transformations of call-by-need programs. In Proc. of Workshop on Higher Order Operational Techniques in Semantics, number volume 26 of Electronic Notes in Theoretical Computer Science, September 1999.Google ScholarGoogle ScholarCross RefCross Ref
  19. Kevin Hammond and Simon L. Peyton Jones. Profiling scheduling strategies on the GRIP multiprocessor. In Int. Workshop on the Parallel Implementation of Funct. Languages, pages 73-98, RWTH Aachen, Germany, September 1992.Google ScholarGoogle Scholar
  20. Kevin Hammond, Hans-Wolfgang Loidl, and Andrew S. Partridge. Visualising Granularity in Parallel Programs: A Graphical Winnowing System for Haskell. In A. P. Wim Böhm and John T. Feo, editors, High Performance Functional Computing, pages 208--221, 1995.Google ScholarGoogle Scholar
  21. Robin Milner, Mads Tofte, Robert Harper, and David Macqueen. The Definition of Standard ML (Revised). MIT Press, Cambridge, MA, USA, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. John H. Reppy. Concurrent programming in ML. Cambridge University Press, New York, NY, USA, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Niklas Röjemo and Colin Runciman. Lag, drag, void and use - heap profiling and space-efficient compilation revisited. SIGPLAN Not., 31 (6): 34--41, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Mads Rosendahl. Automatic complexity analysis. In Proc. of the Int. Conf. on Funct. Program. Languages and Computer Architecture, pages 144--156, New York, NY, USA, 1989. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Colin Runciman and David Wakeling. Heap profiling of lazy functional programs. J. Funct. Program., 3 (2): 217--245, 1993.Google ScholarGoogle ScholarCross RefCross Ref
  26. Colin Runciman and David Wakeling. Profiling Parallel Functional Computations (Without Parallel Machines). In Functional Programming, Glasgow '93, pages 236--251. Springer-Verlag, 1993.Google ScholarGoogle Scholar
  27. David Sands. Calculi for Time Analysis of Functional Programs. PhD thesis, Department of Computing, Imperial College, University of London, September 1990.Google ScholarGoogle Scholar
  28. Patrick M. Sansom and Simon L. Peyton Jones. Profiling lazy functional programs. In Proc. of the Glasgow Workshop on Funct. Program., pages 227--239, London, UK, 1993. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Patrick M. Sansom and Simon L. Peyton Jones. Time and space profiling for non-strict, higher-order functional languages. In Proc. of the Symposium on Principles of Program. Languages, pages 355--366, New York, NY, USA, 1995. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Zhong Shao and Andrew W. Appel. Space-efficient closure representations. In Proc. of the Conf. on LISP and Funct. Program., pages 150--161, New York, NY, USA, 1994. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Daniel Spoonhower, Guy E. Blelloch, Robert Harper, and Phillip B. Gibbons. Space profiling for parallel functional programs. Technical Report CMU-CS-08-110, Carnegie Mellon University, April 2008.Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Stephen Weeks. Whole-program compilation in mlton. In Proc. of the Workshop on ML, page 1, New York, NY, USA, 2006. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Space profiling for parallel functional programs

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 43, Issue 9
            ICFP '08
            September 2008
            399 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/1411203
            Issue’s Table of Contents
            • cover image ACM Conferences
              ICFP '08: Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
              September 2008
              422 pages
              ISBN:9781595939197
              DOI:10.1145/1411204

            Copyright © 2008 ACM

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 20 September 2008

            Check for updates

            Qualifiers

            • research-article

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!