Michael Jerger wrote:
Hi all,
last days I leased a virtual host at 1und1 (a german hoster). Unfortunately
1und1 found a new, creative way to limit the joy of using their VPH - they
limit the number of operating-system processes to 256 processes in total.
a) are you sure ? Since, commercially speaking, I can't imagine what benefit they would
get from this (as opposed to e.g. limiting the amount of RAM or disk space), I tend to
have a doubt.
Also, I am not sure but it seems to me that if there is a maximum number of processes
built-in, that should be a configurable OS setting in Linux.
b) thread != process. See e.g.
http://manpages.ubuntu.com/manpages/intrepid/man7/pthreads.7.html
Thats quite a huge issue, because I want to operate two virtual hosts:
apache-dev -- tomcat-dev -- mysql
apache-www -- tomcat-prod -- mysql
* mysql uses 50 threads in total
* apache uses 5
* tomcat_prod - 109
* tomcat_dev - 73
c) again, are you not confusing threads and processes ?
For Apache httpd e.g., depending on the MPM model used, you will be using either processes
(pre-fork MPM) or threads, or both.
As u see, there is not much space left for chron jobs / ssh-shells a.s.o.
I tried to limit
* apache Maxclients (50 in total)
In a prefork MPM, that can indeed lead to up to 51 simultaneous *processes* (aka 1 main
Apache + 50 Apache "children"), IF you have as many simultaneous requests being processed.
I run many sites with Maxclients 20, or less (specially for development sites).
* mod_jk connection_pool_size (3/40), socket_keepalive=false
There is not really any benefit to have more Apache-Tomcat connections, than your
MaxClients setting above.
* server.xml:
<Executor name="tomcatDevThreadPool" namePrefix="catalina-exec-"
daemon="false" maxThreads="(3/40)" maxSpareThreads="5"
minSpareThreads="1"/>
Ideally, you need as many threads as there can be individual *tomcat* requests in the
course of being processed at the same time. There is no benefit in having (or starting)
more than that.
Since presumably all requests pass first through Apache before there reach Tomcat, you
need as a maximum number of Tomcat threads, the same number ax MaxClients in Apache.
<Connector executor="tomcatDevThreadPool" port="8009"
protocol="AJP/1.3" URIEncoding="UTF-8"/>
But all of these actions result in no change - and pstree shows the same
number of processes without any change (I use ubunut 10.4, java 1.6.0_20,
tomcat 7.0.11).
Any idea how to cope with this silly process limit?
Change the provider ?
Kind regards,
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org