Skip to main content

Optimizing the Java Piped I/O Stream Library for Performance

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 2481))

Abstract

The overall performance of Java programs has been significantly improved since Java emerged as a mainstream programming language. However, these improvements have revealed a second tier of performance bottlenecks. In this paper, we address one of these issues: the performance of Java piped I/O stream library. We analyze commonly used data transfer patterns in which one reader thread and one writer thread communicate via Java piped I/O streams. We consider data buffering and synchronization between these two threads, as well as the thread scheduling policy used in the Java virtual machine. Based on our observations, we propose several optimization techniques that can significantly improve Java piped I/O stream performance. We use these techniques to modify the Java piped I/O stream library. We present performance results for seven example programs from the literature that use the Java piped I/O stream library. Our methods improve the performance of the programs by over a factor of 4 on average, and by a factor of 27 in the best case.

This work was supported in part by the U.S. Department of the Navy, Office of Naval Research under Grant No. N00014-01-1-0744, and in part by National Science Foundation grants CCR-9912407, EIA-0000433, and EIA-0130724. This work was also supported in part by the Korean Ministry of Education under the BK21 program and by the Korean Ministry of Science and Technology under the National Research Laboratory program.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Badrinath, B.R., Bakre, A., Marantz, R., Imielinski, T.: Handling mobile hosts: A case for indirect interaction. In: Proc. Fourth Workshop on Workstation Operating Systems, Rosario, Washington. IEEE, Los Alamitos (1993)

    Google Scholar 

  2. Chawathe, Y., Fink, S., McCanne, S., Brewer, E.: Aproxy architecture for reliable multicast in heterogeneous environments. In: Proceedings of ACM Multimedia 1998, Bristol, UK (September 1998)

    Google Scholar 

  3. Roussopoulos, M., Maniatis, P., Swierk, E., Lai, K., Appenzeller, G., Baker, M.: Person-level routing in the mobile people architecture. In: Proceedings of the 1999 USENIX Symposium on Internet Technologies and Systems, Boulder, Colorado (October 1999)

    Google Scholar 

  4. Yang, L., Hofmann, M.: OPES architecture for rule processing and service execution (February 2001), Internet Draft draft-yang-opes-rule-processing-service-execution-00.txt

  5. McKinley, P.K., Padmanabhan, U.I., Ancha, N.: Experiments in composing proxy audio services for mobile users. In: Guerraoui, R. (ed.) Middleware 2001. LNCS, vol. 2218, pp. 99–120. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  6. Campione, M., Walrath, K., Huml, A.: The Java Tutorial: A Short Course on the Basics, 3rd edn. Addison-Wesley, Reading (2001)

    Google Scholar 

  7. Sun Microsystems, Multithreaded programming guide. 806-5257-1 (January 2001)

    Google Scholar 

  8. Campione, M., Walrath, K.: The Java Tutorial: Object-Oriented Programming for the Internet, 1st edn. Addison-Wesley, Reading (1996) (Online Version)

    Google Scholar 

  9. Gagnon, R.: Ral’s how to: Java thread, http://www.rgagnon.com/javadetails/java-0140.html

  10. Java Power, Java power scratch book, http://www.javapower.ru/faq/sb/javaio7.htm

  11. Kramer, D., Chan, P., Lee, R.: The Java(TM) Class Libraries, 2nd edn., vol. 1. Addison-Wesley, Reading (1998)

    Google Scholar 

  12. Weber, J.: Special Edition Using Java. Que (November 1996)

    Google Scholar 

  13. Harold, E.R.: Java I/O. O’Reilly & Associates (March 1999)

    Google Scholar 

  14. Hyde, P.: Java Thread Programming. SAMS (August 1999)

    Google Scholar 

  15. Sun Microsystems, Java 2 SDK for solaris developer’s guide. 06-1367-10 (February 2000)

    Google Scholar 

  16. Austin, C.: Java technology on the Linux platform: A guide to getting started (October 2000), http://developer.java.sun.com/developer/technicalArticles/Programming/linux/

  17. Sun Microsystems, Java on Solaris 7 developer’s guide, 805-4031 (1998)

    Google Scholar 

  18. Guyer, S.Z., Lin, C.: Optimizing the use of high performance software libraries. In: Midkiff, S.P., Moreira, J.E., Gupta, M., Chatterjee, S., Ferrante, J., Prins, J.F., Pugh, B., Tseng, C.-W. (eds.) LCPC 2000. LNCS, vol. 2017, pp. 227–243. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  19. Aldrich, J., Chambers, C., Sirer, E.G., Eggers, S.J.: Static analyses for eliminating unnecessary synchronization from Java programs. In: Static Analysis Symposium, pp. 19–38 (1999)

    Google Scholar 

  20. Ruf, E.: Effective synchronization removal for java. In: ACM SIGPLAN Conference on Programming Language Design and Implementation (June 1999)

    Google Scholar 

  21. Boyapati, C., Rinard, M.: A parameterized type system for race-free Javaprograms. In: 16th Annual Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (2001)

    Google Scholar 

  22. Goetz, B.: Tweak your IO performance for faster runtime: increase the speed of Java programs by tuning IO performance, Java World (November 2000)

    Google Scholar 

  23. McCluskey, G.: Java I/O performance; login: - The Magazine of USENIX&SAGE (December 1998), http://www.usenix.org/publications/login/online.html

  24. McCluskey, G.: Tuning Java I/O performance (March 1999), http://developer.java.sun.com/developer/technicalArticles/Programming/PerfTuning/

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Zhang, J., Lee, J., McKinley, P.K. (2005). Optimizing the Java Piped I/O Stream Library for Performance. In: Pugh, B., Tseng, CW. (eds) Languages and Compilers for Parallel Computing. LCPC 2002. Lecture Notes in Computer Science, vol 2481. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11596110_16

Download citation

  • DOI: https://doi.org/10.1007/11596110_16

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-30781-5

  • Online ISBN: 978-3-540-31612-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics