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 973093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:13:40+00:00 2026-05-16T03:13:40+00:00

High, I am wondering if anyone could give me some input on a design

  • 0

High, I am wondering if anyone could give me some input on a design question I am pondering. Right now I have a java program that spikes my CPU ussage to 85% every 1 second when it performs a lot of calculations on a stream of data. I want to take advantage of dual processors but don’t want to redesign the program to make it multithreaded as I’ve spent a lot of time debugging and testing what I have now. What if I run the program in two seperate JVM instances and split the workload would that in theory improve performance? – Duncan

  • 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-16T03:13:40+00:00Added an answer on May 16, 2026 at 3:13 am

    if you are going to split the workload, you would probably be better off refactoring what you have to be multithreaded…

    futhermore, if you are worried about breaking something that is working, it means you didn’t write enough tests to ensure that future refactorings will go smoothly. So the recommendation would be to write some tests that capture your core functionality, then refactor to split you problem space up and make use of threading.

    threading can speed up a program in many ways:

    1) if you have multiple cores, a threading can be utilized to take advantage of those cores.
    2) if you program is IO intensive, then it makes sense to split the computational parts off into threads separate from the threads that handle the IO. You will see this is cases where your program is running, but the cpu is not pegged, but your disk is.
    3) other things people smarter than me know.

    you can also go overboard in your threading — it might not make sense to spawn 1000 threads to run on one cpu. The overhead of maintaining the threads might drag down performance.

    edit – the overhead for running 2 jvms is much higher than the overhead for running a few threads.

    finally – if the problem is something like ‘do something with the text in a bunch of file’, then yes, you could just separate the files into 2 separate directories and point a different running instance of your program at each. however that feels dirty to me…

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

Sidebar

Related Questions

This is just a general question relating to some high-performance computing I've been wondering
I was wondering if there's some special way to compile high-level code (preferably from
I have heard of some compilers that convert code in one high level language
I have pretty much 0 experience in developing websites. I was wondering if anyone
Just wondering if anyone has experience with this. I have a plain text in
I'm wondering how multiple pointers should/could be handled by a high level application. I'm
I have an Arduino and I am wondering exactly what HIGH and LOW mean,
Just wondering if anyone has experience with the three. I have used read through
I have been wondering for some time how does Google translate(or maybe a hypothetical
I was wondering if anyone could point me to a very very large dictionary

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.