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.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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)
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)
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)
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
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)
Campione, M., Walrath, K., Huml, A.: The Java Tutorial: A Short Course on the Basics, 3rd edn. Addison-Wesley, Reading (2001)
Sun Microsystems, Multithreaded programming guide. 806-5257-1 (January 2001)
Campione, M., Walrath, K.: The Java Tutorial: Object-Oriented Programming for the Internet, 1st edn. Addison-Wesley, Reading (1996) (Online Version)
Gagnon, R.: Ral’s how to: Java thread, http://www.rgagnon.com/javadetails/java-0140.html
Java Power, Java power scratch book, http://www.javapower.ru/faq/sb/javaio7.htm
Kramer, D., Chan, P., Lee, R.: The Java(TM) Class Libraries, 2nd edn., vol. 1. Addison-Wesley, Reading (1998)
Weber, J.: Special Edition Using Java. Que (November 1996)
Harold, E.R.: Java I/O. O’Reilly & Associates (March 1999)
Hyde, P.: Java Thread Programming. SAMS (August 1999)
Sun Microsystems, Java 2 SDK for solaris developer’s guide. 06-1367-10 (February 2000)
Austin, C.: Java technology on the Linux platform: A guide to getting started (October 2000), http://developer.java.sun.com/developer/technicalArticles/Programming/linux/
Sun Microsystems, Java on Solaris 7 developer’s guide, 805-4031 (1998)
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)
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)
Ruf, E.: Effective synchronization removal for java. In: ACM SIGPLAN Conference on Programming Language Design and Implementation (June 1999)
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)
Goetz, B.: Tweak your IO performance for faster runtime: increase the speed of Java programs by tuning IO performance, Java World (November 2000)
McCluskey, G.: Java I/O performance; login: - The Magazine of USENIX&SAGE (December 1998), http://www.usenix.org/publications/login/online.html
McCluskey, G.: Tuning Java I/O performance (March 1999), http://developer.java.sun.com/developer/technicalArticles/Programming/PerfTuning/
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)