How may I know the amount of memory used by each one of my apache sites?

Solution 1:

Use:

WSGIDaemonProcess foo display-name=%{GROUP}

and when you use 'ps' the mod_wsgi daemon process group processes will show as '(wsgi:foo)'.

Where you have multiple host aliases mapping to same daemon process group however, you will not be able to distinguish how much each is contributing as all handled by same process.

Solution 2:

A given Apache worker isn't associated with any particular virtual host.

If you want more detailed information on what Apache is doing (including resource usage), you should turn on Apache's status pages and look at the extended status information:

http://articles.slicehost.com/2010/3/26/enabling-and-using-apache-s-mod_status-on-ubuntu

For example, this is what the Apache Foundation's status page looks like:

http://www.apache.org/server-status