-
1. Re: Many Java process
peterj Oct 10, 2007 11:31 AM (in response to calexo)I believe there is a Linux kernel setting that determines if separate threads show up as their own processes. I can't recall the setting's name, but googling "linux kernel threading", or something like that, might help.
-
2. Re: Many Java process
calexo Oct 11, 2007 4:10 AM (in response to calexo)Thanks PerterJ,
But, my question is : do I need to have so many threads running ?
Alexandre -
3. Re: Many Java process
peterj Oct 11, 2007 2:39 PM (in response to calexo)They are probably http threads, which can be adjusted in server/xxx/deploy/jboss-web.deployer/service.xml. Add a minSpareThreads entry, and reduce the maxThreads entry:
<Connector port="8080" address="${jboss.bind.address}" minSpareThreads=1 maxThreads="50" maxHttpHeaderSize="8192" emptySessionPath="true" protocol="HTTP/1.1" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" />
-
4. Re: Many Java process
calexo Oct 15, 2007 4:27 AM (in response to calexo)Hi !
I was in high hopes with your answer, but... unfortunately, it doesn't change anything...
In the tomcat status, I have just 4 threads running, but still more than 60 threads of java...
Any other idea ?
Thanks a lot, -
5. Re: Many Java process
peterj Oct 15, 2007 11:52 AM (in response to calexo)All of the other threads you are seeing are threads for various services. I noticed several threads related to quartz (the scheduler service), but I am not sure if you can remove the scheduler service without causing problems.
-
6. Re: Many Java process
calexo Oct 16, 2007 3:21 AM (in response to calexo)Ok, so it seems there is nothing to do to reduce memory usage!
Anyway, thanks a lot for your help !! -
7. Re: Many Java process
david.wade Oct 16, 2007 4:20 AM (in response to calexo)Having all those threads running while over the top for the number of users you have, does not really consume much memory and is not worth reducing.
It does sound like on your system that each thread is being shown as a separate process (linux makes little distinction between them). The memory being used by Jboss is not a sum of the memory displayed by each of those threads as each of those threads are in the same process space.
If the above is true, the memory usage is shown by just one of your ps lines.
It would be easier to verify the above if you posted the results of
ps -eLf | grep java
Those options supplied to ps will list out all the threads. The third column is the parent process id. -
8. Re: Many Java process
calexo Oct 22, 2007 4:21 AM (in response to calexo)Unfortunately :
[root@ns1 root]# ps -eLf
ps: error: Use -m to print threads, not Sun's nonstandard -L.
usage: ps -[Unix98 options]
ps [BSD-style options]
ps --[GNU-style long options]
ps --help for a command summary
[root@ns1 root]# ps -emf
ps: error: Thread display not implemented.
usage: ps -[Unix98 options]
ps [BSD-style options]
ps --[GNU-style long options]
ps --help for a command summary
Thanks anyway !