Building a new machine, dual or quad core?

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
Merdini
Member
Member
Posts: 34
Joined: Fri May 04, 2007 10:11 pm
Location: Sweden, Gothenburg

Building a new machine, dual or quad core?

Post by Merdini »

My OS that I'm currently developing will just act as a webserver. I will be building my own FS and DB (for the sites).
I'll contain everything I need to run my websites properly.
I will also develop my own Software RAID, but it will be implemented directly in the OS. Kind of like RAID10 (RAID1 + RAID0) but with only 3 drives! But only 2 drives will be running at the same time, so there will always be a third one that can "rest", there will be a backup-routine that copies the data from the 2 active drives to the third resting drive. So whenever a drive breaks, the third one will go active and it'll give me time to hotswap the broken one.



Lets say my CPU only has one core but the OS is (of course) multitasking which jumps between the different tasks like writing/reading to the DB, ports and so on. This will make the CPU busy, right? Especially if there is a lot of users/connections writing and reading at the same time.
If the CPU has dual cores, I'll be easier to assign different tasks to each core and everything will run faster.
But isn't the CPU the fastest part in a computer?
If I have quad cores and assign different tasks to each core, wont there be a lot of "waiting time" for the CPU (nothing to do) when reading ports, waiting for connections? (The system bus / I/O devices / memory controller).
Will the system bus / IO devices / memory controller be the ones that holds me from running the server as fast as possible due to no use of all the fore cores to their 100% limits?

Everything here is theoretical, and please, correct each statement if I'm wrong.

My questing therefore is;
Is it worth it to get QUAD cores or is DUAL cores enough?
Should i rather look at a better motherboard that can interact with all the cores faster?
If so, what should I be certain of when buying a good motherboard?
User avatar
Lithorien
Member
Member
Posts: 59
Joined: Tue Oct 27, 2009 1:40 pm
Location: Hanover, PA

Re: Building a new machine, dual or quad core?

Post by Lithorien »

Kurdistan wrote:My questing therefore is;
Is it worth it to get QUAD cores or is DUAL cores enough?
Should i rather look at a better motherboard that can interact with all the cores faster?
If so, what should I be certain of when buying a good motherboard?
Multiple cores will always be more efficient than a single core in a multitasking system. Simply because you can run multiple tasks in parallel, and even if one core is blocking, other cores can continue working. In addition, the more cores, the more simultaneous tasks - so a quad-core beats a dual-core beats a single-core, just like a quad-processor setup beats a dual-processor setup beats a... you get the idea.

As for running as fast as possible: A system can only run as fast as the slowest component. Your server is running "as fast as possible" when the slowest component is running as fast as it can. Speed isn't just dependant on the CPU, but also on the remaining hardware, and even the efficiency of the code and scheduler. Try to optimize what you can, and plan for the future (handle more cores, really efficient scheduler, etc) and your server will handle anything that you throw at it.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: Building a new machine, dual or quad core?

Post by earlz »

I'd say if your interested in building a server, buy a dual-socket motherboard. They are more expensive, but they are completely magical for the extensibility they provide, in which case you could buy a dual core now and if it's determined you need more power, you can buy a quad core later and have 6 cores.
Selenic
Member
Member
Posts: 123
Joined: Sat Jan 23, 2010 2:56 pm

Re: Building a new machine, dual or quad core?

Post by Selenic »

earlz wrote:I'd say if your interested in building a server, buy a dual-socket motherboard. They are more expensive, but they are completely magical for the extensibility they provide, in which case you could buy a dual core now and if it's determined you need more power, you can buy a quad core later and have 6 cores.
Or you can go crazy and get an 8x6-core AMD system (soon to be 8x8). Similar things exist from Intel, but I don't think they have any 6-core chips (they're going straight from 4 to 8, but have HT to make up for it a bit)
User avatar
JackScott
Member
Member
Posts: 1031
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Contact:

Re: Building a new machine, dual or quad core?

Post by JackScott »

There is no such thing as too much processing power, but there is such a thing as too high a price.

Ergo, just buy as much as you can afford to spend now, keeping in mind the upgrade path. If I was in your position, I'd buy a quad core. Don't worry about 6 or 8 or more cores now, by the time you really need them they will be amazingly cheap.
Merdini
Member
Member
Posts: 34
Joined: Fri May 04, 2007 10:11 pm
Location: Sweden, Gothenburg

Re: Building a new machine, dual or quad core?

Post by Merdini »

Thanks for all the great answers!
This server will only be a testserver for the development. Not easy to develop a OS that requires 4 cores when my current machine only has 1.

Selenic: Both intel and amd has HEXACORE, 6 cores. The Intel Xeon.

Lithorien wrote:
Kurdistan wrote:My questing therefore is;
Is it worth it to get QUAD cores or is DUAL cores enough?
Should i rather look at a better motherboard that can interact with all the cores faster?
If so, what should I be certain of when buying a good motherboard?
Multiple cores will always be more efficient than a single core in a multitasking system. Simply because you can run multiple tasks in parallel, and even if one core is blocking, other cores can continue working. In addition, the more cores, the more simultaneous tasks - so a quad-core beats a dual-core beats a single-core, just like a quad-processor setup beats a dual-processor setup beats a... you get the idea.

As for running as fast as possible: A system can only run as fast as the slowest component. Your server is running "as fast as possible" when the slowest component is running as fast as it can. Speed isn't just dependant on the CPU, but also on the remaining hardware, and even the efficiency of the code and scheduler. Try to optimize what you can, and plan for the future (handle more cores, really efficient scheduler, etc) and your server will handle anything that you throw at it.
Basically, one should have as many cores as tasks, right?
And what do you mean with "if one core is blocking"? How can it block and in which situations?
Lithorien wrote:Your server is running "as fast as possible" when the slowest component is running as fast as it can.
The slowest component would be the ones on the motherboard, I guess. Since the CPU is much faster. The only components that I would buy for the server would be a SATA controller and a network card. I can't change any other component after that, so everything else is up to the motherboard, like the systembus.
And how can I know which motherboard is better than the other? On the most PC online stores, they don't have the kind of specifications and information we need as OS developers when buying components. I don't trust the prices ether. Would never buy the most expensive motherboard thinking it's the best.
JackScott wrote:There is no such thing as too much processing power, but there is such a thing as too high a price.
I'd say there is. In my case, I don't want to buy a CPU with 24 CORES (lets say they exist) even if I afford it, when the other components and the OS are the slow parts, leaving me with the use of only a few cores.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Building a new machine, dual or quad core?

Post by Brendan »

Hi,
Kurdistan wrote:The slowest component would be the ones on the motherboard, I guess.
For a web server, the slowest component is typically the internet connection. A second-hand "1 GHz Pentium III" with 100 Mb ethernet can usually saturate the internet link...


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Selenic
Member
Member
Posts: 123
Joined: Sat Jan 23, 2010 2:56 pm

Re: Building a new machine, dual or quad core?

Post by Selenic »

Kurdistan wrote:Selenic: Both intel and amd has HEXACORE, 6 cores. The Intel Xeon.
Fair enough, I just didn't remember seeing any.
Kurdistan wrote:
JackScott wrote:There is no such thing as too much processing power, but there is such a thing as too high a price.
I'd say there is. In my case, I don't want to buy a CPU with 24 CORES (lets say they exist) even if I afford it, when the other components and the OS are the slow parts, leaving me with the use of only a few cores.
You can always use it as a computational server as well (think distcc, video encoding or things like that - they're very compute-heavy, as long as you have half-decent disk bandwidth)
Brendan wrote:For a web server, the slowest component is typically the internet connection. A second-hand "1 GHz Pentium III" with 100 Mb ethernet can usually saturate the internet link...
The main limiting factor for a web server wouldn't be ethernet, but the internet connection, surely?
For example, if it's serving a local network, you can grab a 4xgigabit card fairly easily (just need to implement load balancing and so on across it) or a 10 gigabit card (though you need 10 gigabit switches then as well) but I doubt four-gigabit *internet* connections are going to be particularly common...
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: Building a new machine, dual or quad core?

Post by pcmattman »

The main limiting factor for a web server wouldn't be ethernet, but the internet connection, surely?
Point is, if you generate 100 mb traffic, you're going to completely saturate your internet connection, but your ethernet link will be running at capacity.
Merdini
Member
Member
Posts: 34
Joined: Fri May 04, 2007 10:11 pm
Location: Sweden, Gothenburg

Re: Building a new machine, dual or quad core?

Post by Merdini »

Thanks once again for the answers.

You can't say that the slowest component is the internet connection.
One client can load the server more than others, which means, it depends on the number of requests and connections.

Let's say 1000 users/connections on a specific site writes to the db, and that takes, say 10 seconds total until the server is idle.
While another day, 1000 users/connections on a specific site reads a simple html page and that takes, say 3 seconds until the server is idle.
Meaning, it depends on what the users/connections are doing. How long it takes to respond to their requests. When the request is received, the server is responsible for the waiting time for the users/connections. With that said, the internet connection is not the slowest component. My server will not act as a file server, loading the internet connection to its maximum point.
Post Reply