About 19,700 results
Open links in new tab
  1. java - Maximum number of threads in a JVM? - Stack Overflow

    Mar 30, 2016 · To raise the number of concurrent threads you should lower the default stacksize java -Xss 64k. A Oracle 32 bit JVM will default to 320kb stack size per thread. For a 32 bit JVM with 2gb of addressable memory this will give you a maximum of 6.5k threads. A Oracle 64 bit JVM will default to 1M stack size per thread.

  2. Understanding java's native threads and the jvm - Stack Overflow

    Apr 16, 2010 · There are two kinds of thread implementation in Java. Native threads are mapped onto a thread abstraction which is implemented by the host OS. The OS takes care of native thread scheduling, and time slicing. The second kind of thread is "green threads".

  3. Overview of JVM Threads: Understanding Multithreading in Java

    May 21, 2024 · JVM requires additional threads to do housekeeping, optimize compilation, and manage events and resources, even in a simple Java application. Thus, we can have a concurrency problem without explicitly using threads or thread pools in the code.

  4. Can I set the number of Threads/CPUs available to the Java VM?

    Nov 16, 2015 · I would like to limit the number of threads/processes available to the Java VM, similar to how you set the available memory. I would like to be able to specify it to just use 1 thread, or an arbitrary number.

  5. Java Threads - GeeksforGeeks

    Mar 19, 2025 · We can create threads in java using two ways, namely : 1. By Extending Thread Class. We can run threads in Java by using thread class, which provides constructors and methods for creating and performing operations on a thread, which extends a thread class that can implement runnable interface.

  6. Thread (Java Platform SE 8 ) - Oracle Help Center

    The Java Virtual Machine allows an application to have multiple threads of execution running concurrently. Every thread has a priority. Threads with higher priority are executed in preference to threads with lower priority.

  7. How Many Threads Can a Java VM Support? - Baeldung

    Jan 8, 2024 · In this article, we looked into the most important aspects that might affect the maximum number of threads that can be created in a Java Virtual Machine. However, in most cases, increasing the limit is unlikely to permanently solve scalability issues.

  8. Difference Between Thread and Virtual Thread in Java

    Dec 26, 2024 · In this tutorial, we’ll show the difference between traditional threads in Java and the virtual threads introduced in Project Loom. Next, we’ll share several use cases for virtual threads and the APIs that the project has introduced.

  9. Understanding JVM Settings: -Xmx, -Xss, and Java Thread States …

    Nov 25, 2023 · Java Virtual Machine (JVM) settings, including the maximum heap size (-Xmx) and thread stack size (-Xss), significantly influence the performance and behavior of Java applications.

  10. Processes and Threads (The Java™ Tutorials - Oracle

    Threads exist within a process — every process has at least one. Threads share the process's resources, including memory and open files. This makes for efficient, but potentially problematic, communication. Multithreaded execution is an essential feature of the Java platform.

  11. Some results have been removed
Refresh