From: Subject: How do I increase threads? Date: Fri, 4 Apr 2003 05:47:25 -0800 (PST) Sender: linux-smp-owner@vger.kernel.org Message-ID: <20030404134725.67673.qmail@web12107.mail.yahoo.com> Mime-Version: 1.0 Return-path: List-Id: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-smp@vger.kernel.org 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) 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.(Timer.java:95) at Reminder.(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