How do I increase threads?
Hello All,
Java: 1.4.1_01 Linux Kernel: SMP 2.4.9-31enterprise Memory: 2GB
I created a sample program to test the thread limit on an SMP machine and I keep running into the following Java error with at most 945 threads (it varies depending on what I set the heap (Xm<s|x>) and stack (Xss) sizes to in the jvm):
Exception in thread "main" java.lang.OutOfMemoryError:
unable to create new nati
ve thread
at java.lang.Thread.start(Native Method) at java.util.Timer.<init>(Timer.java:95) at Reminder.<init>(Reminder.java:16) at Reminder.main(Reminder.java:31)
My top and sar outputs show that I am not using anywhere near the 2GB of memory on this machine. I suspect this problem is due to the configuration of the kernel or jvm. Maybe not enough threads per process being allowed or not enough addressable space per user process, but I do not know where to pull the current settings of this information. In particular, I am looking for the kernel setting CONFIG_[1G|2G|3G] to see which one is currently set. How do I do that on a running kernel without the config file that was used to build it? Can I generate a config file from a running kernel that shows its current settings?
Is there some place where I can increase the max thread count per user process? I have already tried /proc/sys/kernel/threads-max which I believe increases the overall thread count for the system, at least that is my understanding.
Also, is there a way to view the current number of allowable threads in the JVM and a way to increase the max thread size in the JVM. BTW, this is a Cobalt LX50 system.
TIA.
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com