Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Cost Analysis of adding Java garbage Collection Log

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the cost analysis of adding Java garbage collection logs. The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn the cost analysis of Java garbage collection logs.

Environment

For our research, we chose to use open source spring boot pet Clinic applications. Pet Clinic is a typical application designed to demonstrate the functionality of the spring boot framework.

We run this application in OpenJDK 11. We deployed this application on an Amazon AWS t2.medium EC2 instance with 16GB RAM and 2 CPU. The tests are orchestrated using the Apache JMeter stress test tool. We use AWS Cloudwatch to measure CPU and memory utilization. In short, here are the tools / techniques we used to conduct this case study:

OpenJDK 11

AWS EC2

AWS Cloud observation

Apache JMeter

Test scenario

In this environment, we conducted two tests:

Baseline testing-in this scenario, we used the JMeter tool to run the pet clinic application for 20 minutes, but did not enable garbage collection (GC) logging, with 200 concurrent users

GC logging enable testing-in this scenario, we use the same JMeter script to run the pet clinic application and enable garbage collection (GC) logs for 20 minutes, with 200 concurrent users.

Note: if you don't know how to enable GC logging, refer to this article: 'how do I enable GC logging?'

Test result

We get the average CPU and memory utilization from AWS Cloudwatch and the average response time and throughput from the JMeter tool. The data collected from both cases is summarized in the following table.

Collected data baseline test enabled GC test average CPU usage 8.35% 10.10% average memory usage 20.80% 20.50% average response time 3901 milliseconds 3881 milliseconds average throughput 24.4 / s 24.5 / s

As you can see, there is no significant difference between CPU and memory consumption. Similarly, there is no significant difference in average response and transaction throughput.

Thank you for your reading. The above is the content of "overhead Analysis added by Java garbage Collection Log". After the study of this article, I believe you have a deeper understanding of the problem of overhead analysis added to Java garbage collection log, and the specific usage needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report