Jeff-Lewis / vosao

Automatically exported from code.google.com/p/vosao
GNU Lesser General Public License v2.1
0 stars 0 forks source link

optimize for new billing #553

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
it's been a while ago when Google App Engine announced new billing. since that 
vosao is no longer running free at all. there are few steps which could be done 
to decrease the spendings. following two work for my site:

1. deprecate cron plugin and disable it by default or let it run e.g. only each 
15 minutes
2. create "pub" backend which will publish pages hourly
(both see cron.xml and backends.xml files attached)

Original issue reported on code.google.com by vl...@appsatori.eu on 31 Jan 2012 at 10:03

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1147.

Original comment by kinyelo@gmail.com on 4 Feb 2012 at 6:39

GoogleCodeExporter commented 9 years ago
Backends seem incompatible with AppStats (which I use a lot), unfortunately:

http://code.google.com/p/googleappengine/issues/detail?id=6601

Original comment by theb...@emanueleziglioli.it on 10 Feb 2012 at 1:30

GoogleCodeExporter commented 9 years ago
This is what happens when I enable appstats:

INFO: Successfully processed 
C:\Users\Emanuele\workspace\IridiumSiena\war\WEB-INF/web.xml
java.lang.ClassCastException: com.google.appengine.tools.appstats.Recorder 
cannot be cast to com.google.appengine.tools.development.ApiProxyLocal
    at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:235)
    at com.google.appengine.tools.development.BackendServers$ServerWrapper.startup(BackendServers.java:817)
    at com.google.appengine.tools.development.BackendServers.startupAll(BackendServers.java:305)
    at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:155)
    at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
    at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
    at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113)
    at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)

Original comment by theb...@emanueleziglioli.it on 10 Feb 2012 at 1:31

GoogleCodeExporter commented 9 years ago
can't you tell appstats to ignore some urls? (those running on backends)

Original comment by vl...@appsatori.eu on 10 Feb 2012 at 1:32

GoogleCodeExporter commented 9 years ago
Mmm, I don't think I'm monitoring all URLs, just specific ones.
Good suggestion though

Original comment by theb...@emanueleziglioli.it on 10 Feb 2012 at 1:35

GoogleCodeExporter commented 9 years ago
Another strategy can be tuning task queues so that they don't spin up more 
instances, see: 
http://code.google.com/appengine/articles/managing-resources.html

Configuring TaskQueue settings

The default settings for the Task Queue are tuned for performance. With these 
defaults, when you put several tasks into a queue simultaneously, they will 
likely cause new Frontend Instances to spin up. Here are some suggestions for 
how to tune the Task Queue to conserve Instance Hours:
Set the X-AppEngine-FailFast header on tasks that are not latency sensitive. 
This header instructs the Scheduler to immediately fail the request if an 
existing instance is not available. The Task Queue will retry and back-off 
until an existing instance becomes available to service the request. However, 
it is important to note that when requests with X-AppEngine-FailFast set occupy 
existing instances, requests without that header set may still cause new 
instances to be started.
Configure your Task Queue's settings(Java, Python).
If you set the "rate" parameter to a lower value, Task Queue will execute your 
tasks at a slower rate.
If you set the "max_concurrent_requests" parameter to a lower value, fewer 
tasks will be executed simultaneously.

Original comment by theb...@emanueleziglioli.it on 13 Feb 2012 at 9:25