Re: Proper cherrypy config to run multiple sites on same server
Thibault Nélis <[email protected]> Mon, 07 Nov 2016 11:40:47 +0100
| Newsgroups | gmane.comp.python.cherrypy |
|---|---|
| Organization | Osimis |
| Message-ID | <[email protected]> |
On Sat, 2016-11-05 at 13:35 -0700, Johan Hartzenberg wrote: > > > 1 Cherrypy process for all the sites (with thread pool taking > > advantage of multi core) > > > or > > > > Python thread pools cannot use multiple cores effectively because > > of the Python GIL > > > I have heard this alluded to before. I would like to understand this > limitation better - where can I read about it and about what can and > cannot be done about it? This presentation by David Beazley at the Chicago Python User Group is quite comprehensive and entertaining (June 2009): https://www.youtube.com/watch?v=ph374fJqFPE Threads cannot execute Python code simultaneously, so they're mostly used to simplify I/O bound concurrent tasks (like handling HTTP requests). C extensions can release the GIL and take advantage of multiple cores however, which is where the vagueness of some statements regarding the GIL comes from (i.e. some modules can take advantage of multiple cores, some can't). If your system is CPU-bound, do use one process per core. Using an application server to do that is a good idea. -t -- 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-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/cherrypy-users. For more options, visit https://groups.google.com/d/optout.
signature.asc
(application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJYIFovAAoJEKO4E8g1kQlC8+AQAJfI6955oG1PhiRv/tLFV0qC dYIZliGzrgQq492S5iQeXhyL4MA3j2o+Wy2bqJCI3d9ATIpsXgLLumRbfoQCIwep C99u8/D0jhHx00+adfazBSHbb8WdyxcobHjVAXQAMYmt30r06MUxRUDMRKIyyWwc AhqNQhy5lLKV2FMy5eKzAPG+B5q6Fo088IqTHc4dH++uwJvws81bxrpTGT5xNhUZ oaS49tzW+VtK3oPB8xQjgZin4T+Ny16e/SIUzvAGIFa/pYSyPcjmVcHTqcTr97rE IH7fbEXH+E5Kkcylci/W/VxK5K01Ho9zvDScB5V4Oapuj3JgEGl4EwwTpzOnc2Oa GrswshISR2YGIhSvTUzo2uQ7eu1XaTRXUnZcL8PVqv1JKGk3e30bjja2FD978ezT OAWmkCW0o2z6Z3vVTdmnEDHD0JmRAfJItpdaGY7atsFfUy/1PYCjr7eKUK/K6UWH 0SmxG/rFWgWLj7u4g8X8CN+enaDybwDTiVe6lvTYQpuxvmPf6xblhulYBC03Yhxa kj07/rUXhsh1MMF+ruxrdLT7b8/fs8vvsEbf4K0Ciin+YIHs39i4au3nRjKaENwh I9K0gjtI0godfyHWLgKuiDuYbAba7ZBGpLUsM3tCnZW9MPkzqZUiZ9MWmTQ8Y3PR Rj8K4TfqxyRj6sLUN6mL =CGpn -----END PGP SIGNATURE-----