When I look up load balancing, everything I see is talking about distributing traffic to multiple servers. I did a Google search for "single server" and "one server" in this context, and don't see anything relevant.

I know an O/S can do it's own load balancing (cores on a processor), and processors also do their own load balancing (virtual cores). I know you can also direct threads to cores via software.

So if you have a single server (1 rack or 2), that can handle the TCP/IP load you will be dealing with, does the O/S on the server keep all the cores working, or does that need to be handled with a software (or hardware?) load balancer? The particular application involves web traffic, and also the company running ERP software on the server for its employees.

  • Note that for software to use more than one CPU/core it has to be designed and programmed to do so. Most server processes are, but even if it isn't the OS should still balance all available CPUs/cores across all applications running. – ivanivan Sep 29 '19 at 0:24

I think the terminology you are looking for is 'multitasking'. Windows server 2008 is a multitasking operating system and run multiple processes in parallel. Out of the box the OS will distribute the load across the available cores/threads. You don't need a load balancer


Short Answer: No

The hardware provides CPU cores to execute instructions, and instructions can be directed to particular cores, but the actual decision-making as to which instructions go to which core (called 'scheduling') is handled by the kernel of the OS, not by the hardware.

In practical terms, from a sysadmin's point of view, it's generally not something you need to be concerned with. As mentioned in ivanivan's comment, almost any modern server software is multi-threaded--ie it's written to take advantage of multiple cores--and even if you're dealing with single-threaded applications, the kernel will still run the different programs (and different instances of the same program) on different cores. Depending on the OS, it's possible that you could gain little performance improvement by instructing the kernel to use a different scheduler than the default (*NIX kernels generally have several compiled in to choose from), but no, you definitely don't need to add any hardware to manage this, and except for some really unusual workloads (which yours is not), leaving the default scheduler alone is usually the way to go.

Longer Answer

Contrary to Iain's answer, multitasking is actually a broad term that covers any technique by which a computer can execute more than one program at once. Multitasking was widespread on single-core systems for decades using the 'time-share' approach, in which the kernel runs (or technically, sends to the CPU to be executed) a few instructions from program A, then a few instructions from program B, etc, and keeps looping through all running programs round-robin style.

What you're asking about is properly called multi-threading or parallel processing. You can have single-core multitasking, as explained above. You can also have the converse, in which a single program is performing a task that isn't sensitive to the order in which the component pieces of the task finish, like compressing a bunch of chunks of a file. The kernel may well split those chunk-compressing instructions among different cores, (which means it's multithreaded), but all of those threads come from the same 'task', which is one program compressing a file. Multitasking and multithreading are related, but not interchangeable, terms.

Wikipedia's page Thread(computing) breaks this down in considerable detail, including a short section called "Threads vs. processes", which addresses the confusion between multitasking and threading.

Suggested search terms to find more information on the subject (without being drowned in irrelevant results pertaining to network load-balancing between different servers):

  • parallel processing
  • multithreading
  • thread scheduling
  • kernel scheduler

And if you want to get into the challenges and pitfalls involved in writing multi-threaded software, look up "thread-safe programming".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy