You would have a similar memory footprint running apache/mod_wsgi.

Mind you I am also running Ruby (mod_passenger) as well as mod_wsgi,
so the memory usage is a "tiny" bit higher because of the extra ruby
processes.

free -m
             total       used       free     shared    buffers     cached
Mem:           512        126        385          0          4         49
-/+ buffers/cache:         72        439
Swap:         1023          0       1023

ps aux | grep "wsgi" && ps aux | grep "postgres" && ps aux | grep "python"
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
www-data  3949  0.2  3.9 330988 20820 ?        Sl   15:27   0:00
(wsgi:web2py -k start
*********   4030  0.0  0.1   7528   892 pts/0    R+   15:30   0:00 grep wsgi
postgres  3768  0.3  1.2 102008  6620 ?        S    15:26   0:00
/usr/lib/postgresql/8.3/bin/postgres -D /var/lib/postgresql/8.3/main
-c config_file=/etc/postgresql/8.3/main/postgresql.conf
postgres  3771  0.0  0.3 102008  1756 ?        Ss   15:27   0:00
postgres: writer process
postgres  3772  0.0  0.2 102008  1572 ?        Ss   15:27   0:00
postgres: wal writer process
postgres  3773  0.0  0.3 102284  1992 ?        Ss   15:27   0:00
postgres: autovacuum launcher process
postgres  3774  0.0  0.3  72632  1692 ?        Ss   15:27   0:00
postgres: stats collector process
postgres  4025  0.1  1.2 104012  6604 ?        Ss   15:30   0:00
postgres: servant mediapanel 127.0.0.1(57909) idle
*********  4032  0.0  0.1   7532   908 pts/0    S+   15:30   0:00 grep postgres
*********   4034  0.0  0.1   7528   888 pts/0    R+   15:30   0:00 grep python

Notice, wsgi:web2py only takes 3.9 % memory, which calculates out to
19.968 MB of RAM on a 512 MB ram VPS.


-Thadeus





On Fri, Feb 19, 2010 at 12:19 PM, raven <ravenspo...@yahoo.com> wrote:
>
> Now that I have web2py working with lighttpd, instead of its own web
> server,
> my application runs much, much faster and requires just over half as
> much memory
> ( 39M for web2py, python and lighttpd  instead of 63M ) leaving me
> plenty of room in my 64M system
>
> This is great!
>
> Without lighttpd
>
> top - 21:54:56 up 11:53,  2 users,  load average: 0.00, 0.00, 0.00
> Tasks:  11 total,   1 running,  10 sleeping,   0 stopped,   0 zombie
> Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi, 0.0%si,
> 0.0%st
> Mem:     65536k total,    65536k used,        0k free,        0k
> buffers
> Swap:        0k total,        0k used,        0k free,        0k
> cached
>
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>    1 root      15   0  1936  888  628 S    0  1.4   0:00.44 init
> 28126 syslog    15   0  1972  668  536 S    0  1.0   0:00.29 syslogd
> 28141 root      15   0  5372 1096  700 S    0  1.7   0:00.07 sshd
> 28151 root      15   0  2468  880  712 S    0  1.3   0:00.00 xinetd
> 28194 root      15   0  2168  924  740 S    0  1.4   0:00.08 cron
> 28246 root      15   0  8176 2808 2240 S    0  4.3   0:00.97 sshd
> 28309 root      15   0  2952 1672 1316 S    0  2.6   0:00.02 bash
> 32170 root      15   0  8172 2804 2240 S    0  4.3   0:01.62 sshd
> 32194 root      15   0  2944 1616 1272 S    0  2.5   0:00.00 bash
> 14172 root      18   0 63088  25m 4252 S    0 40.2   0:04.13 python2.5
> 18279 root      15   0  2384 1104  908 R    0  1.7   0:00.16 top
>
>
> With lighttpd
>
> top - 13:10:21 up  1:06,  1 user,  load average: 0.03, 0.01, 0.00
> Tasks:  11 total,   2 running,   9 sleeping,   0 stopped,   0 zombie
> Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,
> 0.0%si,  0.0%st
> Mem:     65536k total,    40044k used,    25492k free,        0k
> buffers
> Swap:        0k total,        0k used,        0k free,        0k
> cached
>
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>    1 root      18   0  1936  888  628 S    0  1.4   0:00.35 init
> 16231 syslog    18   0  1976  676  536 S    0  1.0   0:00.01 syslogd
> 16253 root      18   0  5368 1092  700 S    0  1.7   0:00.00 sshd
> 16287 root      17   0  2472  880  712 S    0  1.3   0:00.00 xinetd
> 16317 root      15   0  2164  924  740 S    0  1.4   0:00.00 cron
> 25711 root      15   0  8332 2772 2220 R    0  4.2   0:00.14 sshd
> 25763 root      15   0  2980 1684 1300 S    0  2.6   0:00.03 bash
> 15513 root      17   0  2980  684  300 S    0  1.0   0:00.00 bash
> 15515 www-data  18   0 33344  12m 3820 S    0 19.8   0:00.34 python
> 26153 www-data  18   0  5248 2064  960 S    0  3.1   0:00.00 lighttpd
>  5384 root      15   0  2384 1108  908 R    0  1.7   0:00.00 top
>
> --
> 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.
>
>

-- 
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.

Reply via email to