“You can’t control what you can’t measure”1 and you want to control things, you don’t want to just bet on luck. Nonetheless measuring is not enough, you also need to know how to interpret results of such measurements.
It’s not hard to find examples of misinterpreted measurement results with the free2 command output being the most commonly misinterpreted one. Often lack of understanding of used terminology or its ambiguity can be accounted for it. For example, let’s look at jstat output for a Java process:
Anyone knowing JVM Garbage Collection basics should have no trouble telling what those values mean, shouldn’t he? Well let’s try: EC stands for Eden space Capacity, EU denotes Eden space Usage, S0C - Survivor space 0 Capacity, YGC - the number of Young generation Garbage Collections, YGCT - Young generation Garbage Collection Time, and so on.
Pretty obvious, isn’t it? So let’s gather statistics for the old generation (and metaspace) and answer the question how many Full GCs were performed?
If your answer is 4 you might be correct or far from being correct.It all depends on which garbage collector monitored Java process is using. For Parallel GC 4 is the correct answer, but for CMS, the correct3 answer is 2. If you don’t believe me, check the GC logs from the same Java process run:
jstat man-pages say that FGC stands for the number of Full GC events, so let’s take another look at the GC logs, this time limiting them to single CMS cycle:
You can clearly see that CMS performs its work in several phases but just 2 of them (Initial Mark and Final Remark) count as GC events, only those that are stop-the-world phases.
Should you measure something be sure what you really measure otherwise the results can keep you far from reality. Always validate your assumptions and RTFM!
Developers! Quickly and easily gain access to the tools and information you need! Explore, test and combine our data quality APIs at Melissa Developer Portal – home to tools that save time and boost revenue. Our APIs verify, standardize, and correct the Big 4 + more – name, email, phone and global addresses – to ensure accurate delivery, prevent blacklisting and identify risks in real-time.