Determine why the Google engine is slow

I developed a client application that uses Play framework 1.x and runs on GAE. The application works great, but sometimes insanely slow. It takes about 30 seconds to load a simple page, but sometimes it works faster - no code changes occur at all.

Is there a way to determine why it is slow? I tried to contact us, but I could not find a phone number or email. There is also no response to the official google group.

How do you approach this problem? At present, my client is very angry because of the slow loading time, but switching to another provider is the last option at the moment.

+7
source share
5 answers

Use the GAE Appstats to view your remote procedure calls. All RPCs are slow (Google Cloud Storage, Google Cloud SQL, ...), so if you can reduce the number of RPCs or use some caching data structures, use them -> your application will be much faster. But you can see using appstats, parts of which are slow, and if they need attention :).

For example, I created a Google Cloud Storage cache for my application and reduced the runtime from 2 minutes to 30 seconds. RPCs are the bottleneck in GAE.

+8
source

Combining some answers and adding a few things to check:

  • Debugging using application statistics. Look for ladder situations and RPC challenges. Perhaps something in your application is causing RPC calls at certain points that do not occur in your logic all the time.

  • Change your instance settings. Add some persistent / resident instances and see if this has changed. If you deploy new instances, everything will be slow, perhaps for about the time period (30 seconds or more) that you describe. This will seem random. This is not only the number of instances, but also what combinations of sliders you use (you can harm yourself too little / much).

  • Look at your app. Are you doing a lot of memory in the JVM? Allocating / freeing memory is inherently slow operation and can cause freezes. Are you sure your freeze is not a JVM problem? Try to replicate the problem locally and configure the JVM xmx and xms settings and see if you find this behavior. Also profile your application locally for memory / performance issues. You can reduce allocations using pool, DI containers, etc.

  • Do you do any cron jobs / processing on your front-end servers? Try to move as much as you can to background tasks such as sending emails. Intervals may seem random, but this may be the result of what happens depending on the settings of your work. 9am every day may not mean what you think, depending on the cron / task options. The consequence is to move things to server servers and output queues.

It is hard to give you a good answer without additional information. The best one can do here is to give you a starting point at which almost every answer already exists.

+2
source

Google usually does not provide contact support for many services. The problem described by the slow Google engine is probably caused by a cold start. Front-end app instances for Google apps sleep in about 15 minutes. You can write a cron job for ping instances every 14 minutes to keep the nodes up.

+1
source

Is this a paid application? When you do not pay for the application, instances have a very short lifespan.

0
source

By making at least one instance permanent, you will get a significant improvement on first use. It takes about 15 seconds. to load the application into the instance, so you experience a long request time when no one has been using the application for a while

0
source

All Articles