On Sep 12, 12:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Adam, thanks for the quick answer.
>
> On Sep 11, 9:29 pm, Adam Atlas <[EMAIL PROTECTED]> wrote:
>
> > I think that's an unresolved issue in the Python world. See also
> > <http://svn.python.org/projects/python/branches/bcannon-sandboxing/>.
>
> What's the connection here?
>
> > How are you deploying it? If you're using something that works by
> > spawning external interpreter processes (FastCGI, mod_wsgi, etc.),
> > you could get an estimate by letting it open up a typical number of
> > processes and then using `ps` to check their memory usage.
>
> I'm using FastCGI on Apache right now.
>
> ps just gives me this:
> $ ps
>   PID TTY          TIME CMD
>  1181 pts/0    00:00:00 bash
>  2725 pts/0    00:00:00 ps

Hmmm, you may have a lot to learn. Try something like this instead.

$ ps auxww | egrep '(USER|httpd)'
USER       PID %CPU %MEM      VSZ    RSS  TT  STAT STARTED      TIME
COMMAND
root       483   0.0  0.4    31388   2008  ??  Ss    4:28PM   0:00.16 /
usr/local/apache-2.2.4/bin/httpd -k start
www        484   0.0  0.1    30548    600  ??  S     4:28PM   0:00.01 /
usr/local/apache-2.2.4/bin/httpd -k start
grahamd    485   0.0  0.2    36320   1148  ??  S     4:28PM   0:00.03 /
usr/local/apache-2.2.4/bin/httpd -k start
grahamd    486   0.0  0.2    36320   1144  ??  S     4:28PM   0:00.02 /
usr/local/apache-2.2.4/bin/httpd -k start
www        487   0.0  0.3    45320   1340  ??  S     4:28PM   0:00.03 /
usr/local/apache-2.2.4/bin/httpd -k start
www        488   0.0  0.3    45320   1344  ??  S     4:28PM   0:00.02 /
usr/local/apache-2.2.4/bin/httpd -k start
grahamd    498   0.0  0.0    27808      4  pa  R+    4:28PM   0:00.00
egrep (USER|httpd)

The RSS entry typically indicates the amount of physical memory
specific to a process being used. On other systems it may be called
something other than RSS. Read the manual page for 'ps'.

Now, if using mod_fastcgi however, the process will not show as
'httpd'. Probably you will want to look for 'python' processes
instead.

> I dont know much about how FastCGI works.  Will it use so much memory
> for each connection?
>
> Know anywhere I can learn the basics for technologies like FastCGI.  I
> may just need to start at the begining to figure this stuff out.

Information on FASTCGI architecture is hard to come by from what I
have seen meaning that you really need to start out with understand
how Apache uses processes and go from there.

As a start, I'd suggest you instead read:

  http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading

This is for mod_wsgi, but lot of it still applicable to FASTCGI
solutions.

Also have a looked at PDF pictures attached to second last item in the
following thread:

  http://groups.google.com/group/modwsgi/browse_frm/thread/17f9659b3c50bf27/#

These gives some overview diagrams for how processes are used in
various mod_python/mod_wsgi/mod_fastcgi configurations and how
requests flow.

Understand all this stuff is non trivial and you could waste a lot of
time trying. Just work out how big your FASTCGI process is after
running it for a while and how many instances you are running. At
least web.py is a more lightweight solution than others for doing
Python web programming.

Graham


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to