Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Small case study of performance testing

Shulou Source: shulou.com Published: 2022-06-03 07:02:10 10月02日 Update

Many people find performance analysis difficult, but it's not difficult after you master the skills.

Mentality, thinking, layering, conjecture, etc. play a great role in analysis. On the contrary, technology only ranks second or even third. Unfortunately, too few people understand it.

=============================

Monitoring found phenomena:

Tps jitter is large

A lot of timeouts in log.

There are 500 errors.

Next, use jconsole to look at the memory (Java's east and east first think of memory), as shown below

Found that memory usage is not normal, FGC is very frequent, almost once every 5 minutes, and memory recycling is not thorough, probably guess may be memory problems, resulting in a series of unstable phenomena.

So the question is, who's taking up so much memory?

Then jstat command to check the system GC situation, as shown in the following figure

Sure enough, memory recycling is not complete, fgc lasted nearly 5s, verified our guess, then we have to find which bastard caused it.

Continue, jmap search, as shown below

See these three bastards? Maybe they caused it.

Finally, with the help of mat to analyze, as shown in the following figure

See, that's the three of them. Hurry up and find developers to take a look together and analyze the code.

So, isn't it hard? The key is thinking.

Tags: Memory analysis three that is ideas assholes phenomena problems guesses performance large frequent almost and then code role key command mindset performance analysis Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Linux vpn Microsoft macOS