Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
1 CPU or 2?
Results 1 to 6 of 6

Thread: 1 CPU or 2?

  1. #1
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    1 CPU or 2?

    Which (otherwise identical) computer will run faster:

    1. Computer with a single 2GHz CPUs
    2. Computer with dual 1GHz CPUs

    I'm just curious.



  2. #2

    Re:1 CPU or 2?

    I guess it depends on if your application can atke advantage of 2 processors. If it can't, most likelely the 2ghz one. If it can take advantage of 2 processors, it *might* still be the 2 ghz one.

  3. #3

    Re:1 CPU or 2?

    Depends on a lot of factors.

    In order to take advantage of both CPUs you'll need SMP support in your kernel. That basically tells the kernel that if one cpu is busy, and you have another independent process/thread that can be run, run it on the other cpu.

    The 2 GHz would be much better for single-threaded applications (everything happens serially...ie, the second part of a program happens only after the first part is finished).

    Example: a program is written that consists of two threads of execution: one needs to read from the hard disk a lot, and the other one uses the CPU almost exclusively. The 2GHz would probably give you better performance in this case, as you only have one thread that wants your CPU and this would allow it to happen faster.

    Another example: a program is written as two separate threads, both of which love to gobble CPU. The data they process is totally unique to each thread (ie, they don't depend on one another). In this case the perfomance would probably be about equal. On the dual processor box you'd execute both threads in parallel at 1GHz...on the 2 processor box you'd alternate between each thread of execution, processing each twice as fast.

    For a desktop machine, very few applications are written to take advantage of multiple processors (and they do have to be customized to do just this...it's not enough for just the kernel to support 2 processors...the application designer has to look at his/her program and decide "what parts of this program can be run in parallel...what parts are memory intensive...what parts are cpu intensive...how can I split this up so it gets executed as efficiently as possible?&quot. Generally you'll have much better performance with a 2GHz box. However, on a server the name of the game is multiple simultaneous requests. Rather than queuing up incoming requests and processing them one-by-one (which involves the CPU waiting for slow memory and ridiculously slow hard disk reads) it's best to process them as fast as possible, and hence multiple cpus are usually better for servers. Indeed, many pieces of software usually used in servers are written to take advantage of multiple processors when present (eg. apache2, and I believe MySQL take a lot of advantage of extra cpus when they're available).

    Hope that helps!

  4. #4
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re:1 CPU or 2?

    [quote author=Tyr_7BE link=board=3;threadid=10001;start=0#msg90710 date=1101134789]
    However, on a server the name of the game is multiple simultaneous requests. Rather than queuing up incoming requests and processing them one-by-one (which involves the CPU waiting for slow memory and ridiculously slow hard disk reads) it's best to process them as fast as possible, and hence multiple cpus are usually better for servers. Indeed, many pieces of software usually used in servers are written to take advantage of multiple processors when present (eg. apache2, and I believe MySQL take a lot of advantage of extra cpus when they're available).
    [/quote]
    Agree. I would get a single 2 GHz if it's for the desktop box. I'd still get a single 2 GHz if it's for server with that much of difference in speed. SMPs are generally better for intensive computing programs such as database and CADs applications. Other than that, I'd take advantage of a built-in CPU data transfer than relying on BUS rates with dual CPUs. Unless it's dual 1.8 GHz and single 2 GHz and if it's for either database server or CAD drawings, I'd go for a higher CPU clock speed.

  5. #5
    Senior Member
    Join Date
    May 2001
    Posts
    472

    Re:1 CPU or 2?

    Dual is great for true multi tasking, and it keeps enough "oomph" going when you are under load and starting a new task. Dual 450s often "felt" faster to me than the single 1ghz machine I had at work. And now, with dual 1.2 AMDs at home and a P4 at work, the dual AMD rig is still equal to or better than the work box.

    Oh, and when I built this box fall of '03 2 1.2 chips were cheaper than a single 1.6 chip (or anything faster for that matter).

  6. #6

    Re:1 CPU or 2?

    I normally don't posting stuff that was slashdotted, but this is interesting:
    http://www.gotw.ca/publications/concurrency-ddj.htm

    it explains the benefits of multiple CPUs

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •