DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Spring Boot Pet Clinic App: A Performance Study
  • Overhead Added by Collecting Thread Dumps
  • How Java Apps Litter Beyond the Heap
  • Troubleshooting Memory Leaks With Heap Profilers

Trending

  • The Human Side of Logs: What Unstructured Data Is Trying to Tell You
  • Hybrid Cloud vs Multi-Cloud: Choosing the Right Strategy for AI Scalability and Security
  • Apache Doris vs Elasticsearch: An In-Depth Comparative Analysis
  • How to Practice TDD With Kotlin
  1. DZone
  2. Coding
  3. Frameworks
  4. Overhead Added by Garbage Collection Logging

Overhead Added by Garbage Collection Logging

Garbage collection logs have advantages, but we weren’t sure what overhead garbage collection logging adds to the application. Thus we set out to conduct a case study.

By 
Ram Lakshmanan user avatar
Ram Lakshmanan
DZone Core CORE ·
Aug. 28, 21 · Analysis
Likes (6)
Comment
Save
Tweet
Share
6.5K Views

Join the DZone community and get the full member experience.

Join For Free

Enabling Garbage collection logs on your application has certain advantages. In nutshell, Garbage collection logs will facilitate you to optimize Garbage Collection pause time, improve overall application response time, forecast production outages, reduce computing costs. Even though Garbage collection logs have these advantages, we weren’t sure what overhead does garbage collection logging adds to the application. Thus we set out to conduct the below case study.

Environment

For our study, we chose to use the open-source Spring Boot Pet Clinic application. Pet Clinic is a poster child application that was developed to demonstrate the spring boot framework features.

We ran this application in OpenJDK 11. We deployed this application on the Amazon AWS t2.medium EC2 instance which has 16GB RAM and 2 CPUs. The test was orchestrated using the Apache JMeter stress testing tool. We used AWS Cloudwatch to measure the CPU, Memory utilization. In nutshell here are the tools/technologies, we used to conduct this case study:

  • OpenJDK 11
  • AWS EC2
  • AWS Cloudwatch
  • Apache JMeter

Test Scenario

In this environment, we conducted 2 tests:

  1. Baseline Test — In this scenario, we ran the pet clinic application without enabling garbage collection (GC) logs using the JMeter tool for 20 minutes with 200 concurrent users.
  2. GC log Enabled Test — In this scenario, we ran the pet clinic application with enabling garbage collection(GC) logs using the same JMeter script for 20 minutes with 200 concurrent users.

Note: If you don’t know how to enable GC log, see this post: ‘How to enable GC logs?’

Test Results

We captured average CPU and memory utilization from the AWS Cloudwatch and average response time and throughput from the JMeter tool. Data collected from both scenarios are summarized in the below table.

Data Collected Baseline test Enabled GC test
Avg CPU Usage 8.35% 10.10%
Avg Memory Usage 20.80% 20.50%
Avg Response Time 3901 ms 3881 ms
Avg Throughput 24.4/sec 24.5/sec

As you can see there is no noticeable difference in the CPU and Memory consumption. Similarly, there is no noticeable difference in the average response and transaction throughput. 

Conclusion

Thus based on our study we can conclude that there is no noticeable overhead in enabling the garbage collection log file. Given the benefits we get by enabling the Garbage collection log, you can consider enabling GC logging on all your production instances.

garbage collection Garbage (computer science) application Overhead (computing) Spring Framework Testing

Opinions expressed by DZone contributors are their own.

Related

  • Spring Boot Pet Clinic App: A Performance Study
  • Overhead Added by Collecting Thread Dumps
  • How Java Apps Litter Beyond the Heap
  • Troubleshooting Memory Leaks With Heap Profilers

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!