45 messages in com.googlegroups.pylons-discussRe: Reducing pylons app memory usage?| From | Sent On | Attachments |
|---|---|---|
| Marcin Kasperski | 16 Oct 2007 07:21 | |
| Max Ischenko | 16 Oct 2007 10:46 | |
| Marcin Kasperski | 17 Oct 2007 02:59 | |
| Dalius Dobravolskas | 17 Oct 2007 03:04 | |
| Christoph Haas | 17 Oct 2007 07:12 | |
| Max Ischenko | 17 Oct 2007 11:02 | |
| Ben Bangert | 17 Oct 2007 13:19 | |
| Christoph Haas | 17 Oct 2007 14:23 | |
| Ben Bangert | 17 Oct 2007 16:32 | |
| Graham Dumpleton | 17 Oct 2007 16:56 | |
| Ian Bicking | 17 Oct 2007 16:58 | |
| Marcin Kasperski | 18 Oct 2007 03:18 | |
| Ben Bangert | 18 Oct 2007 11:34 | |
| Philip Jenvey | 18 Oct 2007 12:22 | |
| Ben Bangert | 18 Oct 2007 12:32 | |
| Ian Bicking | 18 Oct 2007 12:37 | |
| Marcin Kasperski | 19 Oct 2007 02:35 | |
| Marcin Kasperski | 19 Oct 2007 02:42 | |
| Graham Dumpleton | 21 Oct 2007 16:12 | |
| Jon Rosebaugh | 21 Oct 2007 16:48 | |
| Graham Dumpleton | 21 Oct 2007 18:20 | |
| Marcin Kasperski | 22 Oct 2007 05:11 | |
| Bob Ippolito | 22 Oct 2007 05:28 | |
| Bob Ippolito | 22 Oct 2007 05:33 | |
| Graham Dumpleton | 22 Oct 2007 16:23 | |
| Graham Dumpleton | 22 Oct 2007 16:25 | |
| Cliff Wells | 22 Oct 2007 17:52 | |
| Graham Dumpleton | 22 Oct 2007 17:59 | |
| Cliff Wells | 22 Oct 2007 18:53 | |
| Graham Dumpleton | 22 Oct 2007 22:58 | |
| Marcin Kasperski | 31 Oct 2007 08:39 | |
| Ben Bangert | 31 Oct 2007 08:56 | |
| Marcin Kasperski | 31 Oct 2007 09:38 | |
| Marcin Kasperski | 31 Oct 2007 09:40 | |
| Ben Bangert | 31 Oct 2007 12:08 | |
| Graham Dumpleton | 31 Oct 2007 15:52 | |
| Graham Dumpleton | 31 Oct 2007 16:44 | |
| Ben Bangert | 31 Oct 2007 17:04 | |
| Ben Bangert | 31 Oct 2007 17:08 | |
| Marcin Kasperski | 05 Nov 2007 03:53 | |
| Marcin Kasperski | 05 Nov 2007 04:08 | |
| Marcin Kasperski | 05 Nov 2007 04:33 | |
| Alberto Valverde | 05 Nov 2007 04:57 | |
| Marcin Kasperski | 05 Nov 2007 06:03 | |
| Ian Bicking | 05 Nov 2007 06:58 |
| Subject: | Re: Reducing pylons app memory usage?![]() |
|---|---|
| From: | Ian Bicking (ianb...@public.gmane.org) |
| Date: | 10/17/2007 04:58:24 PM |
| List: | com.googlegroups.pylons-discuss |
Ben Bangert wrote:
On Oct 17, 2007, at 2:24 PM, Christoph Haas wrote:
Why am I still confused by the top columns after 15 years of UNIX usage. Yes, the virtual usage is around 100 MB while the resident size is at about 18 MB.
Of course, since most of this ram use is from the libraries, it means it will increase very little should you run multiple Pylons apps in a single process. You can do this with the ini file to tell Paste to load multiple apps, and even host them on different virtual hosts, that'll save you some ram if you're running multiple Pylons apps on the same machine.
It'd be hot if you could load up Pylons and then fork for each app, sharing a bunch of the libraries.
You can't. But such a thing is not impossible. Mmm... a whole entry point:
[app:otherprocapp] use = egg:DeploySubprocess app = config:%(here)s/myapp.ini # maybe also: add_libraries = /path/to/some/virtualenv-or-workingenv/
It'd fork, use that add_libraries to do a site.addsitedir(), and maybe start up with flup's scgi or fcgi server, with s/fcgi_app on the unforked site, forwarding any requests over, and doing a little process management (just passing over signals, so that you can kill both as a unit by killing the parent).
I'm guessing 200 lines of code. Who wants to write it?
Note you won't notice the memory savings unless you look closely; it's hard to see shared memory. Surprisingly hard. But much of the memory will be shared between the master process and the forked subprocess.
--
Ian Bicking : ianb...@public.gmane.org :
http://blog.ianbicking.org
: Write code, do good : http://topp.openplans.org/careers




