Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 880847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:09:54+00:00 2026-05-15T12:09:54+00:00

I have a Java application that has a fixed thread pool of fifteen, the

  • 0

I have a Java application that has a fixed thread pool of fifteen, the machine, Solaris 10 SPARC, has sixteen CPUs. Adding the pool has greatly increased performance, but I’m wondering if I have too many threads in the pool. Would performance be better with less threads or does Solaris do a good job of thread scheduling.

Say the pool is heavily using fifteen CPUs, then other application threads demand CPU for various reason, concurrent garbage collection is a good example. Now, five CPUs are shared between the pool and other application threads. Then CPUs one through seven become free, will Solaris move the threads sharing time on the busy CPUs to the free CPUs?

If not, would it be better to keep the pool size smaller, so that there are always free CPUs for other application threads? Compounding the issue, CPU usage is very sporadic in the application.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T12:09:54+00:00Added an answer on May 15, 2026 at 12:09 pm

    If you are doing only cpu intensive tasks (no IO) N+1 threads (where N is the number of cores) will give you the optimum processor utilization.
    +1 because you can have a page fault, a therad can be paused to any reason or a small wait time during synchronization.

    For Threads doing IO this is not really easy, you have to test the best size.
    The book Java concurrency in practice suggests this algorithm as starting point:

    N = number of CPUs
    U = target CPU utilization (0 <= U <= 1)
    W/C = ration of wait time to cpu time (measured through profiling)
    
    threads = N * U * (1 + W/C)
    

    IBM uses the same algorithm in their article Java theory and practice: Thread pools and work queues, with a fixed U=1.
    The N+1 fact can be read too in the IBM article, to provide origins for both theses.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JSP java application that has a name AAA-master so currently my
I have built a Java application that has some dependencies (~10). I would like
So I have a strange problem, I have a java swing application that has
I have a Java EE application that has REST web services attached to it.
Setting: Java 5 - no upgrade possible. I have a large application that has
I have a Java Web application that has several servlets with the following mappings.
I have a Java enterprise application that provides a web service, has a domain
I have a Java application in an application bundle that has a file association
I have been working on a java application that has a connection to a
I have a Java Swing application, that has many JTextFields and a datamodel. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.