How do I increase the thread limit on Linux?

OS: Linux (or Sun Linux)
Kernel: 2.4.9-31enterprise
Memory: 2GB
CPUs: 2
Java: 1.4.1_01
I have a dual processor Cobalt LX50 and I am running
into a thread limit with Java. No matter what I do
with the Java JVM parameters (heap and stack), I
cannot get any more than 949 threads. My "top" and "vmstat" output
shows that I am no where near my memory capacity.
Below is a simple Java program (28 lines long) I have
used to test this limit. My question is simply how do
I go about increasing this limit. Is there some kernel
parameter I can set or maybe have to recompile into
the kernel? My /proc/sys/kernel/threads-max is 16383.
I do not believe my ulimit settings are the problem,
but I will post them anyway. The problem also occurs
on non-Cobalt (plain old PCs) uniprocessor machines
maxxing at about 1018 threads. The other interesting thing is that when I run the same program through the Kaffe VM with -Xms64M and -Xmx512M I do not run into the thread limit problem. Does anyone know what I need to change to get my thread limit up? Also, rewriting the way the program uses threads is not an option.
[root]# ulimit -a core file size (blocks) 0
data seg size (kbytes) unlimited
file size (blocks) unlimited
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files 1024
pipe size (512 bytes) 8
stack size (kbytes) 8192
cpu time (seconds) unlimited
max user processes 8191
virtual memory (kbytes) unlimited
/*******************************Sample java program
testing thread
limits***********************************************/
import java.util.Timer;
import java.util.TimerTask;
public class Reminder {
Timer timer;
static int cnt;
public Reminder(int seconds) {
timer = new Timer();
timer.schedule(new RemindTask(), seconds*1000);
class RemindTask extends TimerTask {
public void run() {
System.out.println("Time's up!");
timer.cancel(); //Terminate the timer thread
public static void main(String args[]) {
System.out.println("About to schedule task.");
cnt = 0;
while (true) {
new Reminder(90);
System.out.println("Thread #" + ++cnt + "
scheduled.");

Confer also:
http://forum.java.sun.com/thread.jsp?forum=37&thread=358276

Similar Messages

  • How can I increase the character limit of my text messages for Droid Maxx 4.4?

    How can I increase the character limit of my text messages for Droid Maxx 4.4?

    Send as a MMS.

  • How can I increase the hard limit of the stack size?

    Hi,
    My process gives an error of segmentation fault (SIGSEGV) that is caused because the stack limit is reached. I have a doubt about how to increase the stack size. I have tried change it with "ulimit - hard" but this size is 65532kb, and is very low for my process. How can I increase the hard limit?
    Thanks.

    When last I checked, the kernel had a fixed stack size limit.
    Do you have the source code to this application? If so, [see this Tiger stack size article|http://homepage.mac.com/eric.c/hpc/contents/documentation/How%20to%20in crease%20the%20stack%20size%20on%20Mac%20OS%20X.pdf], and specifically have a look at the +ld -stack_size+ mechanism; rebuild the code with a bigger limit.
    Entirely FWIW, this question would be more typical over in the developer forums or maybe in the Unix forum if you don't have Apple developer access. Better audience for application development and for software-related questions over there.

  • How can I increase the storage capacity in Linux for installing Oracle 11g?

    Hi all,
    I've been searching in Internet information about how to increase the storage capacity of a Linux machine, so that it can help me with my problem without success. I tried to execute some command lines encountered in some tips in forums, but no one works.
    I want to install an Oracle 11g database, which needs 4 GB minimal for the installation. I can not continue with the installation because of this problem.
    I use a VMWare virtual machine, which I increased over its settings to 160 GB, but not its file systems or whatever in the machine.
    I did this:
    [root@localhost ~]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda3 18G 15G 1.9G 89% /
    /dev/sda1 190M 12M 169M 7% /boot
    none 506M 0 506M 0% /dev/shm
    /dev/hdc 699M 0 699M 100% /media/cdrom
    As far I understand the bigger storage capacity is used by the file system /dev/sda3. But what about the rest, I mean the 140 GB?. I've already increased the storage capacity over the settings. How can I tell the machine "please use the remaining 140 GB for the installation of the Oracle DB and other needed installations?.
    How can I increase here what?. Disk? File system? Volume Group? It can not be so difficult, can it?
    There are no volume groups in the machine:
    +[root@localhost /]# vgdisplay+
    +No volume groups found+
    Linux is too complicated. Unfortunately I have to do that in Linux :-(
    Can someone help me? I sit here since long hours without finding a solution :-(

    thanks for your answers.
    To Dude:
    You can address the problem in a number of different ways, but please post your version of Linux and provide more information about your current partitions
    The Version of Linux is Linux Red Hat Enterprise 5.
    Open Logical Volume Management from the System Administration menu.
    Select your volume from the logical view, edit properties and then use the slider to set your volume size, or click "remaining" to extend your partition.
    I've already opened the LVM from the System Administration menu, but there is no possibility to see the volume groups, because there is no one. There is no tabs like Volume Groups or something like that...
    I would try the procedure described above your answer and write you again. I hope it works...I will write you back in a few minutes...

  • HT4863 How can I increase the file size limit for outgoing mail. I need to send a file that is 50MB?

    How can I increase the file size limit for outgoing mail. I need to send a file that is 50MB?

    You can't change it, and I suspect few email providers would allow a file that big.  Consider uploading it to a service like Dropbox, then email the link allowing the recipient to download it.

  • How to increase the thread count for JDBC adapter

    Hi ALL,
                Could someone advice me on how to increase the thread count for JDBC Adapter in Visual Admin:
    JDBC_http://sap.com/xi/XI/System.Call.maxConsumers 5
    JDBC_http://sap.com/xi/XI/System.Recv.maxConsumers 5
    JDBC_http://sap.com/xi/XI/System.Rqst.maxConsumers 5
    JDBC_http://sap.com/xi/XI/System.Send.maxConsumers 5
    I need to increase them to 10.
    Regards,
    Xier

    hi check the below links:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/806e75a0-0e01-0010-2587-fc518de8ac1a
    admin manual:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/fdb09490-0201-0010-e09e-a76388646ad0
    note:reward points if solution found helpfull.....
    regards
    chandrakanth.k

  • How can i increase the maximum size of a text column in Access

    hello,
    i am inserting data in the MS-Access database through my servlet and am getting the exception whenever the length of the text data is more than 255 characters as in Access the maximum size for character data column is 255 can anyone tell me if there is any way by which i can increase the maximum limit of the column size in Access ,i.e. to make it more than 255.

    A text field in Access has a maximum size of 255 characters. If you want to store text information in Access larger than 255, you need to use the memo rather than text data type. There are special considerations for using an Access memo data type and accessing it through JDBC. Specifically, I believe it must be accessed as a binary object (BLOB), rather than text when using the JDBC-ODBC bridge. There are lots of discussions within these forums regarding how to manage, and the issues with using the Access memo data type.
    Good luck!

  • How do you increase the font size to bigger than 24, using the typewriter tool in Adobe Acrobat Pro 9 for Mac?

    How do you increase the font size to bigger than 24, using the typewriter tool in Adobe Acrobat Pro 9 for Mac?   Often I just want to label an item on a map that is in PDF and want to use a simple label rather than a Text Box for labeling, but have yet to find a way to increase the font size beyond 24.   Can someone help me with this? - JML

    Read this:
    https://forums.adobe.com/thread/1468782?sr=stream&ru=2382437

  • How can I Increase the Thickness of Blinking Cursor in adobe reader?

    I sometimes refer to another part of file of pdf and to get back, blinking cursor is supposed to help me but it is tiny blinking I have hard time to find it back.
    How can I increase the thickiness of blinking cursor in adobe reader?

    Do you mean "Recent Tags" which has an icon a blue-colored folder with a primitive looking magnifying glass over the folder?
    That folder does have a limit of 10 results. If you want to create an "All Tags" item on the Boomarks Menu, you can do that by creating your own "smart folder." The process I use is a little involved, so bear with me (also, see the screen shots).
    The query used by Recent Tags is:
    place:type=6&sort=14'''&maxResults=10'''
    So for All Tags we will drop the maximum results limit:
    place:type=6&sort=14
    ''If you prefer your tags in alphabetical order instead of having the most recently used at the top, use this instead:''
    place:type=6&sort=1
    Go ahead and select the line you want and right-click > copy it.
    Next, click the bookmarks drop-down button, expand the Bookmarks Toolbar, right-click any existing item, and choose New Bookmark.
    In Location, paste the query, and in name, type All Tags (or your preferred description). When you click Add Bookmark, Firefox will add it, but it doesn't show the blue search folder icon. Drag the bookmark to the menu, and it will turn into a functioning search folder.
    Success?

  • How do you increase the maximum number of migration batches using EAC?

    When I try to run a new batch, I'm getting the following error message:
    The maximum number of migration batches is already running. Please remove a batch before you add another one.
    How do I increase the maximum number of migration batches using EAC? Thanks for your help.

    Hi WinndowsGuy,
    Is there any update on this thread?
    Thanks,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Simon Wu
    TechNet Community Support

  • How do I increase the cache level?

    I have about 361 GB free in my C drive. I would like to know how to increase the cache limit beyond 1024 MB.
    I went to Firefox Logo » Options » Options » Advanced » Network and there I found the cache limit. However, the maximum limit is 1024 MB. How to increase it beyond that? Please tell me.

    Apparently, the size of the cache will not go above 1 GB, so trying to make Firefox do that will be useless.

  • On my HP Touchsmart 310 PC how do I increase the inactivity time on the display?

    On my HP Touchsmart 310 PC how do I increase the inactivity time on the display?   Windows 7, 64-bit

    Hi,
    Please try Control panel > Power options > Change when the computer sleeps
    Hope this helps.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • My performance is very slow when I run graphs. How do I increase the speed at which I can do other things while the data is being updated and displayed on the graphs?

    I am doing an an aquisition and displaying the data on graphs. When I run the program it is slow. I think because I have the number of scans to read associated with my scan rate. It takes the number of seconds I want to display on the chart times the scan rate and feeds that into the number of samples to read at a time from the AI read. The problem is that it stalls until the data points are aquired and displayed so I cannot click or change values on the front panel until the updates occur on the graph. What can I do to be able to help this?

    On Fri, 15 Aug 2003 11:55:03 -0500 (CDT), HAL wrote:
    >My performance is very slow when I run graphs. How do I increase the
    >speed at which I can do other things while the data is being updated
    >and displayed on the graphs?
    >
    >I am doing an an aquisition and displaying the data on graphs. When I
    >run the program it is slow. I think because I have the number of
    >scans to read associated with my scan rate. It takes the number of
    >seconds I want to display on the chart times the scan rate and feeds
    >that into the number of samples to read at a time from the AI read.
    >The problem is that it stalls until the data points are aquired and
    >displayed so I cannot click or change values on the front panel until
    >the updates occur on the graph. What can I do to be a
    ble to help
    >this?
    It may also be your graphics card. LabVIEW can max the CPU and you
    screen may not be refreshing very fast.
    --Ray
    "There are very few problems that cannot be solved by
    orders ending with 'or die.' " -Alistair J.R Young

  • How can I increase the font size of my email when I print it out, it is printing tiny

    How can I increase the font size when I print out emails, it is printing tiny size?

    In the Print dialog window, click the small reveal-button to the right of the printer's name -
    The window will expand to show additional settings (similar to 'old' Page Setup) -
    Be sure "Scale:" is set to 100% and the 'Keep apparent font size' item is checked.

  • How do I increase the font size in my email and maintain resolution.

    Hi folks. Mr Newbie is seeking some help, I hope it is relatively straight forward, thanks
    How do I increase the font size in my standard email and document views without losing resolution.  Right now my font size in email, headers and text is less than that on my iPhone, it rather defeats the point of having a 27" screen if most of it is blank and I have to sit with my nose to the screen to read email.  Thanks for your help, once you have stopped laughing.  C

    Two things you can do to easily aid with readability in Mail are as follows:
    1) Increase the size of folders in the sidebar:
    a) select "system preferences" from the Apple menu
    b) select "general settings"
    c) select small, medium or large under "sidebar icon size"
    2) Increase the text in the main body of the email (both sent and received):
    a) select "preferences" from the Mail menu
    b) select "fonts and colors"
    c) adjust font size for "message list font" and "message font".  I have noticed this works properly while in classic mode, but in regular mode the message list font doesn't appear to change size.
    Select classic mode by accessing Mail preferences and selecting the "viewing" tab.
    Another shortcut is to right click on the toolbar, then select "customize toolbar", and then drag the "smaller / bigger" buttons onto the toolbar.  Now you can decrease and increase font size as desired on the fly.

Maybe you are looking for

  • Can I split my iTunes library between two HD's?

    I am planning on converting my movie library and putting it on a large external HD, so that I can play movies on my TV via AppleTV. The only problem is, I think I may need at least 6 TB to do this. If I go with an external unit with two HD's (2 x 3 T

  • Sharing Downloaded Files between 2 accounts on the same system

    My wife and I each have separate accounts set up on our iMAC G5. We both have .MAC accounts, but only use one account to download songs into iTunes. In an earlier version of iTunes, I set up both accounts to point to the same iTunes library file, whi

  • Word searchable filetypes

    I need to take Acrobat 9 Pro PDF files and export or save the pages as a filetype that when inserted into MS Word 2010, it is word searchable. Usually I save image files as .emf's because they are searchable in Word. Does anyone know if another filet

  • Sound distortion from iDVD

    I am putting together some clips of my son's highschool band performances taken with a SONY Handycam DCR-HC36 and will be burning them to a DVD to distribute to fellow band parents. The video has been downloaded via firewire to an iMac G5 and the edi

  • Odd system prefs: screen saver behavior

    I don't understand why, but it seems that now most of the albums in my screen saver pane do not load correctly. Some load with correct photos and photos from other albums. Others only read as having the same two photos. What is going on? iBook G4   M