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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:23:34+00:00 2026-05-11T14:23:34+00:00

Given a machine with 1 CPU and a lot of RAM. Besides other kinds

  • 0

Given a machine with 1 CPU and a lot of RAM. Besides other kinds of applications (web server etc.), there are 2 other server applications running on that machine doing the exact same kind of processing although one uses 10 threads and the other users 1 thread. Assume the processing logic for each request is 100% CPU-bound and typically takes no longer than 2 seconds to finish. The question is whose throughput, in terms of transactions processed per minute, might be better? Why?

Note that the above is not a real environment, I just make up the data to make the question clear. My current thinking is that there should be no difference because the apps are 100% CPU-bound and therefore if the machine can handle 30 requests per minute for the 2nd app, it will also be able to handle 3 requests per minute for each of the 10 threads of the 1st app. But I’m glad to be proven wrong, given the fact that there are other applications running in the machine and one application might not be always given 100% CPU time.

  • 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. 2026-05-11T14:23:34+00:00Added an answer on May 11, 2026 at 2:23 pm

    Interesting question.

    I wrote a sample program that does just this. It has a class that will go do some processor intensive work, then return. I specify the total number of threads I want to run, and the total number of times I want the work to run. The program will then equally divide the work between all the threads (if there’s only one thread, it just gets it all) and start them all up.

    I ran this on a single proc VM since I could find a real computer with only 1 processor in it anymore.

    Run independently:

    1 Thread    5000 Work Units - 50.4365sec 10 Threads  5000 Work Units - 49.7762sec 

    This seems to show that on a one proc PC, with lots of threads that are doing processor intensive work, windows is smart enough not to rapidly switch them back and fourth, and they take about the same amount of time.

    Run together (or as close as I could get to pushing enter at the same time):

    1 Thread    5000 Work Units - 99.5112sec 10 Threads  5000 Work Units - 56.8777sec 

    This is the meat of the question. When you run 10 threads + 1 thread, they all seem to be scheduled equally. The 10 threads each took 1/10th longer (because there was an 11th thread running) while the other thread took almost twice its time (really, it got 1/10th of its work done in the first 56sec, then did the other 9/10ths in the next 43sec…which is about right).

    The result: Window’s scheduler is fair on a thread level, but not on a process level. If you make a lot of threads, it you can leave the other processes that weren’t smart enought to make lots of threads high and dry. Or just do it right and us a thread pool 🙂

    If you’re interested in trying it for yourself, you can find my code: http://teeks99.com/ThreadWorkTest.zip

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

Sidebar

Related Questions

So given I have a 64 bit machine. I know that the memory of
Given that the web application doesn't have su privileges, I'd like to execute a
Is there a pre-made page that will give some details on the executing machine
We have an 8 CPU 2.5GHz machine with 8 GB of RAM than executes
In C#, we know that Guid data is unique for a given machine. Will
I have a program that fundamentally requires a lot of memory. However, for some
On Mac OSX 5.8 I have a Java program that runs at 100% CPU
Single core CPUs or a machine with a single CPU cannot do parallel processing.
i see always that there is confusion in this term, i found this in
I use mpi4py and openmpi on a multi-cpu/core machine to do linear algebra. My

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.