1

CPU time Cloud Profile

Wall time Cloud Profile

Using Cloud Profiler I found out that my service is spending more than 99% of the time waiting. The difference between CPU time and Wall time is massive as you can see in the above linked images.

This is the first time I'm using Cloud Profiler and the Google documentation says the following:

If the wall-clock time is significantly longer than the CPU time, then that is an indication the code spends a lot of time waiting. This might be an indication of a resource bottleneck.

If the CPU time is close to the wall time, then that indicates the block of code is CPU intensive; almost all the time it takes to run is spent by the CPU. Long-running CPU-intensive blocks of code might be candidates for optimization.

This makes sense, however,

  1. I'm looking for a list of common mistakes that can lead to Wall time >>> CPU Time and the best practices to be followed to reduce that gap.
  2. What could be the reasons for a resource bottleneck in AppEngine? (if you can point out a specific root cause by referring to the linked images, that'll be much help)

My service is deployed on AppEngine standard environment over an F4 instance class with a runtime of Java 11.

Jorn Vernee
  • 31,735
  • 4
  • 76
  • 93
  • The situation, in which the **Wall time** is significantly longer than the **CPU Time** is indicating a possible resource bottleneck, as per the [documentation](https://cloud.google.com/profiler/docs/concepts-profiling#time_measurements) you found. Therefore, you'll need to focus on resolving the bottleneck. – Deniss T. Nov 27 '20 at 12:05
  • It is hard to say for sure what exactly is causing a bottleneck in your application only based on the description. However, since your app already has the F4 [instance class](https://cloud.google.com/appengine/docs/standard#instance_classes), I think the issue might be coming from your code. – Deniss T. Nov 27 '20 at 12:05

0 Answers0