Thanks On Apr 20, 2:05 pm, Graham Dumpleton <[email protected]> wrote: > On 20 April 2011 20:58, virgil.balibanu <[email protected]> wrote: > > > Hi, I'm using Centos 5.5 and i'm viewing processes using htop. So I > > computed that a process should have around 20 MB of occupied memory, > > that means one thread has that much, or all of the threads? So do the > > threads use the same loaded python and django code or each one of them > > loads a new one? > > Each user has one process of size 20MB and the 18 threads should all > be running within that one process in the one Python interpreter and > Django instance. > > Try using the 'ps' command instead of 'htop'. > > Graham > > > Thanks, > > Virgil Balibanu > > > On Apr 20, 1:19 pm, Graham Dumpleton <[email protected]> > > wrote: > >> On 20 April 2011 20:09, virgil.balibanu <[email protected]> wrote: > > >> > Hi, > > >> > I've setup my server using mod_wsgi in deamon mode and apache and > >> > everything worked well but I'm having some trouble with memory > >> > consumption. Each site is running under his own user and takes a > >> > pretty big amount of memory because is uses python and django. Now > >> > I've looked into memory consumption and i have each user (site-x > >> > format) running 18 processes on linux, each of them taking some > >> > memory. My setup looks like this: > >> > ... > >> > WSGIDaemonProcess site-195 user=site-195 group=nobody inactivity- > >> > timeout=172800 > >> > WSGIDaemonProcess site-196 user=site-196 group=nobody inactivity- > >> > timeout=172800 > >> > WSGIDaemonProcess site-197 user=site-197 group=nobody inactivity- > >> > timeout=172800 > >> > WSGIDaemonProcess site-198 user=site-198 group=nobody inactivity- > >> > timeout=172800 > >> > ... > >> > WSGIProcessGroup %{ENV:PROCESS_GROUP} > >> > WSGIApplicationGroup %{GLOBAL} > >> > WSGISocketPrefix /var/run/wsgi > >> > .... > >> > Now each site has only a few users at the moment so i don't know why > >> > it should take so many processes. > > >> > Could someone please explain how this works to me, because i need to > >> > understand and see what can be done about it. > > >> There aren't 18 processes, there are 18 threads within each process. > >> This is because there are default 15 threads and then the main thread > >> waiting for shutdown and two background threads for deadlock timeout > >> and inactivity timeout checking. > > >> What Linux system are you use and what version? Way back in time, > >> Linux systems showed each thread as a separate processes when you use > >> some tools for listing processes. I thought this had changed and they > >> only showed one process now no matter how many threads they ran. > > >> Can you say exactly what command you are using to monitor processes > >> and the exact command line arguments as well? > > >> Graham > > > -- > > You received this message because you are subscribed to the Google Groups > > "modwsgi" 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 > > athttp://groups.google.com/group/modwsgi?hl=en.
-- You received this message because you are subscribed to the Google Groups "modwsgi" 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/modwsgi?hl=en.
