3 Strategi Developer Grab untuk Pengembangan Teknologi dan Layanan

Tiga tahun yang lalu, tepatnya pada tahun 2014, layanan transportasi online Grab masih merupakan startup di tahap awal yang hanya mempunyai sekitar sepuluh orang developer. Untuk mengumpulkan semua…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How to analyse GC logs

Java Garbage Collector (GC) logs are used for memory management and object allocation and promotion. GC logs consist of critical information such as the duration of the GC process, the number of objects promoted, and more. It includes details of the entire GC process and the resources it uses

What is GC?

When working with Java or any other JVM-based programming language we get certain functionalities for free. One of those functionalities is clearing the memory. If you’ve ever used languages like C/C++ you probably remember functions like malloc, calloc, realloc and free. We needed to take care of the assignment of each byte in memory and take care of releasing the assigned memory when it was no longer needed. Without that, we were soon running into a shortage of memory leading to instability and crashes.

With Java, we don’t have to worry about releasing the memory that was assigned to an object. We only need to stop using the object. It’s as simple as that. Once the object is no longer referenced from inside our code the memory can be released and re-used again.

The garbage collector log is a text file produced by the Java Virtual Machine that describes the work of the garbage collector. It contains all the information you could need to see how the memory cleaning process works. It also shows how the garbage collector behaves and how much resources it uses. Though we can monitor our application using an APM provider or in-house built monitoring tool, the garbage collector log will be invaluable to quickly identify any potential issues and bottlenecks when it comes to heap memory utilization.

We can enable GC logs for JAVA application . now when throttle happen we can analyse these logs to find out the cause.

your application should generate three logs:-

Now if your application is running on multiple machines (Kubernetees pods) than grep only one machine logs.

There is multiple sites to anaylze these GC logs in grapphical manner.

You can see various graphs formed on your GC logs . by seeing those you can identify the cause .

For more details :-

Add a comment

Related posts:

Now the mics

Have a really harsh look at your budget and consider how often you plan on recording and even if you need a lot of portability or if you plan to mostly keep your gear in one location. Gear can be…

Exploring Careers and Designing a Life of Consequence

A former board member of the American Conference of Academic Deans, Pareena Lawrence is a visiting fellow at Yale University and senior fellow at the Association of American Colleges & Universities…

Should your agency have a podcast?

The podcasting juggernaut shows no sign of slowing. Four years ago, when we started planning the idea behind Small Spark Theory I thought we were too late to the party. Yet here we are now and with…