google-compute-engine"/>
  • 4
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I am experimenting with google compute engine (GCE) to run some scientific/engineering software. I have successfully tested the system on GCE using an 8 core, non-preemptible instance running over a long time period. I'm now testing with a 32 core preemptible instance but finding that the instance stops running after a relatively short time (certainly less than an hour). Although it's preemptible, I was under the impression from the docs that it was relatively unlikely to be stopped under typical circumstances.

I would like to know if there is some way to determine why the instance was stopped (I don't see any kind of log, at least in the web interface), get suggestions for causes of this, and suggestions for remedies or ways to prevent it.

In case it is relevant I'm in the trial period of GCE using free credit. By default you are only supposed to have a maximum of 24 cores, but I requested a quota increase to 32 cores so I could test my system on this instance type.

I am going to attempt a run with a non-preemptible instance to see if this makes any difference. I'll update this question with an edit later to report the results of this.

Preemptible VM's are subject to availability of excess capacity in Google's data-centers. Some regions/zones are more popular than the others (like us-central1 is more popular than asia-east1 and less likely to have that excess capacity over longer periods of time.

If you can use another region/zone for your instance, try to experiment with other regions and zones and empirically check if they have more preemptible instances available.

Keep in mind that preemptible instances should only be used for stateless applications, otherwise your data or service will be lost.

  • 2
Reply Report
    • Thanks, I will investigate alternative regions. In my case I can save the 'state' regularly in a small file and pick up from that state, but I'd like to get at least a few hours between instances stopping as restart time is non-negligible.
      • 2
    • @crobar You can utilize Instance Groups to automatically replace expiring preemptible instances with another one so that you don't have to individually control each instance in your project. You can even specify a min. number of instances in your group and Instance Group Manager will make sure you have this amount at all times. If your app is allowing that, think about running two 16-core preemptible instances instead of single 32-core to maintain better availability of your process.
      • 2
    • I will look into this as well, in my case I am running an optimisation program that uses HTCondor operating as a 'personal' installation on the instance to control multiple jobs. Ideally I could instead have multiple instances each being part of an HTCondor cluster. At first it would just be easier to restart a stopped instance though.

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags