On Aug 27, 2016 4:16 PM, "'Adam (Cloud Platform Support)' via Google App Engine" <google-a...@googlegroups.com> wrote:
>
> Multiple cores are not available to App Engine standard runtime instances. If you need access to multiple cores on the same instance, consider using the App Engine flexible runtime, which uses Compute Engine as the underlying VM and allows you to configure the number of cores available.
>
Yes, but i can't use multiprocess in Python flexible appengine. When I created a process, it was a fake process which is a thread like in appengine.
>
> On Wednesday, August 24, 2016 at 4:27:17 PM UTC-4, Jungho Ahn wrote:
>>
>> Hello,
>>
>> Is it allowed to use python multiprocessing in appengine?
>> I tried, but it looks like only one core is utilized.
>>
>> Thanks,
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/D6z_WoLsBH8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
> To post to this group, send email to google-a...@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/88dafadf-a328-423e-8ddc-7c4f585f88a9%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
On Aug 27, 2016 4:16 PM, "'Adam (Cloud Platform Support)' via Google App Engine" <google-appengine@googlegroups.com> wrote:
>
> Multiple cores are not available to App Engine standard runtime instances. If you need access to multiple cores on the same instance, consider using the App Engine flexible runtime, which uses Compute Engine as the underlying VM and allows you to configure the number of cores available.
>Yes, but i can't use multiprocess in Python flexible appengine. When I created a process, it was a fake process which is a thread like in appengine.
>
> On Wednesday, August 24, 2016 at 4:27:17 PM UTC-4, Jungho Ahn wrote:
>>
>> Hello,
>>
>> Is it allowed to use python multiprocessing in appengine?
>> I tried, but it looks like only one core is utilized.
>>
>> Thanks,
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/D6z_WoLsBH8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to google-appengine+unsubscribe@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/2fd63c21-f33f-48a2-932d-bd7db89cb56c%40googlegroups.com.
I'm using python:runtime: pythonruntime_config:python_version: 2
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/cc1bc1bd-188d-4490-a4dc-5c5138a68f2e%40googlegroups.com.
Yes, right. More than 2 cores.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/46012019-4c23-4e0f-a854-12449e34c1e7%40googlegroups.com.
$ sudo docker exec -it gaeapp /bin/bash
root@d0f61e0950fe:/home/vmagent/app# nproc
2
root@d0f61e0950fe:/home/vmagent/app# TERM=xterm top
...
runtime: python
vm: true
entrypoint: gunicorn -w 4 -b :$PORT main:app
resources:
cpu: 2.0
memory_gb: 2.6
disk_size_gb: 10
You mean the python in App Engine supports multiprocessing?multiprocessing.Process() was not a real process.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/8d4d650e-79b2-43ca-843b-02320c64dd4b%40googlegroups.com.
AFAIK, python threads cannot utilize all CPU cores due to GIL. So, I'm trying to fork processes for computationally heavy jobs.
Yes, there are no core restrictions, but multiprocessing.Process() is a fake thread.I received an answer from Google like'For security reasons, multiprocessing is not supported in App Engine Standard Environment. More specifically, the multiprocess module is replaced with a stub that provides limited compatibility (hence the "fake" PIDs you are seeing), but does not actually spawn processes.'AFAIK, python threads cannot utilize all CPU cores due to GIL. So, I'm trying to fork processes for computationally heavy jobs.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/e6f21a22-b0fa-4b55-917a-bf40c881fd24%40googlegroups.com.
When I tested in python flexible appengine, it wasn't supported.Do you mean it should be supported?