Hello Graham, whoever you are. You sound highly confused, clueless aboout how to present objective data and a fairly typical bombastic nerd of the type that clogs up and plagues forums.
Get a life John Heenan On Feb 12, 11:32 am, Graham Dumpleton <graham.dumple...@gmail.com> wrote: > On Feb 12, 9:59 am, John Heenan <johnmhee...@gmail.com> wrote: > > > How about web2py in a VPS using less than 40MB RAM? > > > You can reduce web2py memory usage by using a newer generation web > > server with web2py instead of the internal web server with web2py. > > Not really. > > > Apache gets trashed in tests by newer generation web servers such as > > lightttpd and nginx. > > Only for static file serving. > > > Apache also uses far more memory. > > For hosting a dynamic Python web application it doesn't have to. The > problem is that the majority of people have no clue about how to > configure Apache properly and will leave it as the default settings. > Worse, they load up PHP as well which forces use of prefork MPM which > compounds the problems. > > > The reason is simple. Apache services each request with a thread. > > Nginx amd lightttpd service each request with an event model. > > A WSGI application like web2py however isn't event based and requires > the threaded model. You are therefore still required to run web2py in > a threaded system, or at least a system which uses a thread pool on > top of an underlying thread system. Your arguments are thus moot, as > as soon as you have to do that, you end up with the same memory usage > profile issues as with Apache's threaded model. > > > I only use lightttpd for static pages and to remap URLs. > > > This is my memory usage with lighthttpd and web2py from command 'ps > > aux'. > > > resident memory units are in KB > > virtual memory units are 1024 byte units > > > lighttpd: resident memory 3660, virtual memory 59568 > > python for web2py: resident memory 32816, virtual memory 225824 > > So, 32MB for web2py. > > Now configure Apache with a comparable configuration, presumed single > process which is multithreaded and guess what, it will be pretty close > to 32MB still. > > If you are stupid enough to leave Apache with prefork MPM because of > PHP and use embedded mode with mod_python or mod_wsgi, then of course > you will get up to 100 processes each of 32MB, because that is what > the PHP biased configuration will give. > > Even in that situation you could used mod_wsgi daemon mode and shift > web2py to its own process, which means again that all it takes is > 32MB. The memory of Apache server child process handling static and > proxying will still be an issue if using prefork, but if you ditch PHP > and change to worker MPM you can get away with a single or maybe two > such processes and drastically cut back memory usage. > > For some background on these issues read: > > http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usa... > > Anyway, if you aren't up to configuring Apache properly, by all means > use lighttpd or nginx. > > Graham > > > This is the memory usage of a python console WITHOUT any imports: > > resident memory 3580, virtual memory 24316 > > > John Heenan > > > On Feb 11, 10:30 pm, raven <ravenspo...@yahoo.com> wrote: > > > > It seems that everyone is running with Apache and gobs of memory > > > available. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.