Running cherrypy as a WSGI webserver

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Running cherrypy as a WSGI webserver

Rita Morgan
Running cherrypy along with flask. I know a certain web request takes ~15 secs. So, when I run it concurrently (10 threads). I would expect the time to be around 15 secs. But the time is 15*10 seconds so I believe the requests are going syncrnously. Is there a way to verify this?

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Running cherrypy as a WSGI webserver

Ralph Heinkel-2

If the requests are very much CPU bound then this number (10 * 15) seems right - python (due to the global interpreter lock) will not be able to process those threads in (real) parallel .

If your requests however are mainly i/o bound then parallel processing via threads should actually show in a reduction of the overall (wall clock) time.

In case of CPU intensive requests I would suggest to run multiple processes (in case your server has more than one CPU) -- this should actually speed up things.

Ralph


On 07/07/2017 06:46 PM, Rita Morgan wrote:
Running cherrypy along with flask. I know a certain web request takes ~15 secs. So, when I run it concurrently (10 threads). I would expect the time to be around 15 secs. But the time is 15*10 seconds so I believe the requests are going syncrnously. Is there a way to verify this?

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Running cherrypy as a WSGI webserver

Rita Morgan
what would I need to handle requests asyncnously? multiple processing makes sense but not sure how I can handle that with cherrypy.


On Friday, July 7, 2017 at 1:11:58 PM UTC-4, Ralph Heinkel wrote:

If the requests are very much CPU bound then this number (10 * 15) seems right - python (due to the global interpreter lock) will not be able to process those threads in (real) parallel .

If your requests however are mainly i/o bound then parallel processing via threads should actually show in a reduction of the overall (wall clock) time.

In case of CPU intensive requests I would suggest to run multiple processes (in case your server has more than one CPU) -- this should actually speed up things.

Ralph


On 07/07/2017 06:46 PM, Rita Morgan wrote:
Running cherrypy along with flask. I know a certain web request takes ~15 secs. So, when I run it concurrently (10 threads). I would expect the time to be around 15 secs. But the time is 15*10 seconds so I believe the requests are going syncrnously. Is there a way to verify this?

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="xGWd8jGNFAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">cherrypy-user...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="xGWd8jGNFAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">cherryp...@googlegroups.com.
Visit this group at <a href="https://groups.google.com/group/cherrypy-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/cherrypy-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/cherrypy-users&#39;;return true;">https://groups.google.com/group/cherrypy-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Running cherrypy as a WSGI webserver

Stephan Semerad
it depends what you are trying to do. 

you can let things be processed on the different servers that communicate with each other on resful services... Spreads around computing power.
not sure why you are running 2 frameworks though... 

On Friday, July 7, 2017 at 7:53:17 PM UTC+2, Rita Morgan wrote:
what would I need to handle requests asyncnously? multiple processing makes sense but not sure how I can handle that with cherrypy.


On Friday, July 7, 2017 at 1:11:58 PM UTC-4, Ralph Heinkel wrote:

If the requests are very much CPU bound then this number (10 * 15) seems right - python (due to the global interpreter lock) will not be able to process those threads in (real) parallel .

If your requests however are mainly i/o bound then parallel processing via threads should actually show in a reduction of the overall (wall clock) time.

In case of CPU intensive requests I would suggest to run multiple processes (in case your server has more than one CPU) -- this should actually speed up things.

Ralph


On 07/07/2017 06:46 PM, Rita Morgan wrote:
Running cherrypy along with flask. I know a certain web request takes ~15 secs. So, when I run it concurrently (10 threads). I would expect the time to be around 15 secs. But the time is 15*10 seconds so I believe the requests are going syncrnously. Is there a way to verify this?

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-user...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="https://groups.google.com/group/cherrypy-users" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/group/cherrypy-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/cherrypy-users&#39;;return true;">https://groups.google.com/group/cherrypy-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Loading...