Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3644032.3644466acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
short-paper

Identification of Java lock contention anti-patterns based on run-time performance data

Published: 10 June 2024 Publication History

Abstract

Locks play a crucial role in multi-threaded applications, offering an effective solution for synchronizing shared resources. Yet, mishandling locks and threads can result in contention, leading to performance deterioration and compromising the scalability of software applications. In this study, several machine learning models were evaluated on how well they could detect the Java lock contention anti-pattern that caused the lock contention fault based on run time performance data. We trained the machine learning models with performance data generated from the execution of eight Java lock contention anti-patterns and tested the prediction of the models against 30% of the training data as well as performance data from six applications in the Dacappo benchmark that exhibit lock contention. Our results show that we can accurately identify the lock contention anti-pattern based on runtime performance data with an accuracy close to 90%.

References

[1]
Mohammad Mejbah ul Alam, Tongping Liu, Guangming Zeng, and Abdullah Muzahid. 2017. SyncPerf: Categorizing, Detecting, and Diagnosing Synchronization Performance Bugs. In Proceedings of the Twelfth European Conference on Computer Systems (Belgrade, Serbia) (EuroSys '17). Association for Computing Machinery, New York, NY, USA, 298--313.
[2]
baeldung. 2018. Multiclass Classification Using Support Vector Machines. https://www.baeldung.com/cs/svm-multiclass-classification.
[3]
S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. 2006. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-Oriented Programing, Systems, Languages, and Applications (Portland, OR, USA). ACM Press, New York, NY, USA, 169--190.
[4]
Orit Edelstein, Eitan Farchi, Evgeny Goldin, Yarden Nir, Gil Ratsaby, and Shmuel Ur. 2003. Framework for testing multi-threaded Java programs. Concurrency and Computation: Practice and Experience 15, 3--5 (2003), 485--499. arXiv:https://onlinelibrary.wiley.com/doi/pdf/10.1002/cpe.654
[5]
H. H. Hallal, E. Alikacem, W. P. Tunney, S. Boroday, and A. Petrenko. 2004. Antipattern-based Detection of Deficiencies in Java Multithreaded Software. In Fourth International Conference on Quality Software, 2004. QSIC 2004. Proceedings (Braunschweig, Germany, 08--09 September 2004). IEEE.
[6]
Peter Hofer, David Gnedt, Andreas Schörgenhumer, and Hanspeter Mössenböck. 2016. Efficient tracing and versatile analysis of lock contention in Java applications on the virtual machine level. ICPE 2016 - Proceedings of the 7th ACM/SPEC International Conference on Performance Engineering 2016-March (2016), 263--274.
[7]
IBM. 1999. Java Lock Monitor. http://perfinsp.sourceforge.net/examples.html#jlm
[8]
Idil Ismiguzel. 2017. Naive Bayes Algorithm for Classification. https://towardsdatascience.com/naive-bayes-algorithm-for-classification-bc5e98bff4d7.
[9]
Kernel.org. 2015. Linux kernel profiling with perf., 39 pages. https://perf.wiki.kernel.org/index.php/Tutorial
[10]
Thin Locks. 1998. Thin Locks: Featherweight Synchronization for Java. In Proceeding of the ACM COnference on Programming Language Design and Implementation, SIGPLAN, Vol. 33. Association for Computing Machinery, New York, NY, USA, 258--268.
[11]
Md Abdullah Mamun, Aklima Khanam, Håkan Grahn, and Robert Feldt. 2010. Comparing Four Static Analysis Tools for Java Concurrency Bugs. In 2012 IEEE 23rd International Symposium on Software Reliability Engineering Workshops.
[12]
Naouel Moha, Gueheneuc Yann-Gael, Duchien Laurence, and Anne-Francoise Le Meur. 2010. DECOR: A Method for the Specification and Detection of Code and Design Smells. IEEE Transactions on Software Engineering 36 (2010), 20--36.
[13]
R Nasrin. 2020. Multiclass Classification Using Logistic Regression from Scratch in Python: Step by Step Guide. https://towardsdatascience.com/multiclass-classification-algorithm-from-scratch-with-a-project-in-pythonstep-by-step-guide-485a83c79992.
[14]
Ernest NG. 2020. XGBoost for Multi-class Classification. https://towardsdatascience.com/xgboost-for-multi-class-classification-799d96bcd368.
[15]
Oracle. 2015. Intrinsic Locks and Synchronization (The Java™ Tutorials > Essential Classes > Concurrency). https://docs.oracle.com/javase/tutorial/essential/concurrency/locksync.html
[16]
Joseph Robertson. 2023. Java Lock Contention Antipatterns and Their Detection within Java Code. https://ir.library.ontariotechu.ca/bitstream/handle/10155/1619/Robertson_Joseph.pdf?sequence=1
[17]
scikit learn. 2020. Grid Search Cross Validation. https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html.
[18]
A Shafi. 2021. Random Forest Classification with Scikit-Learn. https://www.datacamp.com/tutorial/random-forests-classifier-python.
[19]
Vatsal Sheth. 2018. MultiClass Classification Using K-Nearest Neighbours. https://towardsdatascience.com/multiclass-classification-using-k-nearest-neighbours-ca5281a9ef76.
[20]
sourceforge. 2019. DaCapo Benchmarks Home Page. https://dacapobench.sourceforge.net/.
[21]
Nathan R. Tallent, John M. Mellor-Crummey, and Allan Porterfield. 2010. Analyzing lock contention in multithreaded applications. ACM SIGPLAN Notices 45, 5 (2010), 269--279.
[22]
Chen Zhang, Jiaxin Li, Dongsheng Li, and Xicheng Lu. 2019. Understanding and Statically Detecting Synchronization Performance Bugs in Distributed Cloud Systems. IEEE Access 7 (2019), 99123--99135.

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
AST '24: Proceedings of the 5th ACM/IEEE International Conference on Automation of Software Test (AST 2024)
April 2024
235 pages
ISBN:9798400705885
DOI:10.1145/3644032
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 10 June 2024

Check for updates

Author Tags

  1. lock contention faults
  2. lock contention anti-patterns
  3. supervised machine learning

Qualifiers

  • Short-paper

Funding Sources

Conference

AST '24
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 19
    Total Downloads
  • Downloads (Last 12 months)19
  • Downloads (Last 6 weeks)2
Reflects downloads up to 18 Nov 2024

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media