Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Multiple processors in a laptop or pc

  1. Nov 30, 2006 #1
    im building a computer and i wanted to improve the processing power, besides using a dual core processor, how could i put several processors in a computer.

    could i have for example 4 outlets for processors on the motherboard and only use 2 or 3

    and i have a laptop that can only take 256mb of ram, is there any way i could rebuild it to take more, or take a better processor
  2. jcsd
  3. Nov 30, 2006 #2
    you have to find an OS that will be able to actually use the extra processors too.
  4. Nov 30, 2006 #3


    User Avatar

    Staff: Mentor

    There are motherboards out there that accept multiple processors.

    It is important to note, however, that most regular applications only do one task at once, so adding processors doesn't help make them run faster. Only when using specialized applications or doing heavy multitasking will it matter.
    Probably not 3.
    If the motherboard will only accept 256mb, then no, you can't make it accept more. And if it is so old that that is its maximum amount of ram, then you can't put that great of a processor in it either, even if it is upgradeable at all (which it well may not be).
  5. Dec 1, 2006 #4


    User Avatar
    Science Advisor
    Gold Member

    You might try setting up a small cluster. Anyways, like Russ said, it'll depend a lot on your OS & what applications you're running (&how) how much performance you could gain (running stuff parallel has its "tricks" and requirements).
  6. Dec 1, 2006 #5
    ive looked into beowulf clusters and running linux, i actually have a collection of pc's for one and im trying to get a few more, but im looking for better processing speed and ram in a notebook. im not a powerjunky looking for the next bes computer but i need more processing power, i asked about the ram too only because ive always been told you cant put more in a computer than what its maximum is and ive always wondered if there was a way around that
  7. Dec 1, 2006 #6


    User Avatar
    Science Advisor

    Actually most applications use multiple threads and processes for performing actions. Any application that performs a task without freezing the interface is running at least 2 threads. A browser uses a thread per object, for example. Threads can be scheduled to run on separate processors, so you can benefit from having multiple processors.
    In windows click ALT + CTRL + DELETE, select Task Manager, then click View -> Select Columns and check the "Thread Count" box. Then in the processes tab of Task Manager, you can see that very few processes are using only 1 thread. Internet explorer is running 13, for instance, as i type this.
    Any kind of server application will use a single thread to service a single request as well. And you probably have at least one server running.
    Last edited: Dec 1, 2006
  8. Dec 1, 2006 #7
    I think he was talking about processing not threads. Even if you have multiple threads a proc can only do one thing at a time, albeit, so it looks like it is doing many tasks in parallel. It isnt its doing 1 logical task at a time..
  9. Dec 1, 2006 #8


    User Avatar
    Science Advisor

    But if an application uses multiple threads, then the application can take advantage of multiple processors, by scheduling different threads on different processors, so it's not true that:
    - "regular" applications do one thing at once
    - adding processors won't make them run faster
  10. Dec 1, 2006 #9
    good point well presented
  11. Dec 1, 2006 #10


    User Avatar

    Staff: Mentor

    QUOTE=-Job-;1176318]But if an application uses multiple threads, then the application can take advantage of multiple processors, by scheduling different threads on different processors, so it's not true that:
    - "regular" applications do one thing at once
    - adding processors won't make them run faster[/QUOTE] The problem is probably in the workload itself. Ie, what are all of those threads actually doing? Frankly, I don't know enough about programming to know how they work, but I do know that when you do multimedia apps (sound/video editing, photo editing, etc), many operate in such a way that they don't do multiple things at once and don't see much benefit from adding processors. Games, too. You can see it in the benchmarks.

    It is tough to see it in new processors since almost all are dual core but looking back a year when there was a mixture of processors with similar technology but one or two cores, and you can see big differences. For example: http://www.tomshardware.com/2005/08/01/dual/page11.html

    Take a look at some encoding speeds for two processors with different software:

    Athlon 64 X2 4800 (dual core, 2.4ghz)
    Athlon 64 FX 5700 (single core, 2.8ghz)

    Lame MP3:
    FX: 1:15
    X2: 1:20

    Ogg Vorbis Audio:
    FX: 2:18
    X2: 1:59

    WinRAR (compression):
    FX: 1:52
    X2: 2:01

    3DS Max (rendering):
    FX: 3:01
    X2: 1:50

    Now, there are technology differences, but in general, the FX has around 15% more processing power than each of the X2's cores - but only 60% of the the total fo the two. In two of the applications above, the FX was slightly faster as would be expected if the X2 was only using one core. In one app, the X2 is a little faster - perhaps there are multiple threads running, but they aren't balanced. And in one app, the X2 was almost exactly 60% faster, implying both cores were running at full capacity.

    When first introduced, the answer to the question "single core or dual?" was always - 'well, the single core proc will be slightly faster in some things, but the dual core will be vastly faster in others.' Still, there is a limit to how much you can chop up your tasks and spread the load (except in specialized apps designed to work in massively parallel machines or clusters) and so there is a cost-benefit curve associated with adding cores.
  12. Dec 1, 2006 #11


    User Avatar
    Science Advisor

    Basically threads are used to split the amount of work into parallel chunks. So in processing an MP3 of size S you would create N threads, each thread encoding a chunk of size S/N. If you have X cores then you process X times as much as a single core of the same speed, since you can have X threads running at the same time, which means X chunks being processed in parallel. Your benchmark would reflect this better if the single and dual core processors were of the same speed.
    Double the processors won't double your processing speed because there's some overhead in keeping the data accross processors in sync and all that stuff, but it will generally make your machine faster, especially if you have alot of stuff going.
    That being said, you'll probably see a more noticeable improvement from a memory upgrade since that's where the bottleneck usually is.
  13. Dec 18, 2006 #12
    1. Applications have to be written to schedule multiple threads to different processors. There are specific calls to create this behavior. Multi threaded DOES NOT mean .. by default that it can use multiple processors. There are also specific changes depending upon the OS you're writing it for. This is especially true for the hardware. What good does it do you to write a bunch of routines.. all sharing variables.. spawning threads.. Then half your threads end up sitting in a queue waiting for the slowest one to finish. Assuming you even made the correct calls in the first place.

    2. Processors have multiple pipelines.. multiple threads can be sent to different pipelines on a processor..(the processor can only start one instruction at a time.. but it can have different instrctuons in each pipeline) so processors can in effect do "more than one thing at a time".. there are limits but it has been this way since the Pentium 1. Win 9X is a multi threaded app.. but it cannot take advantage of multiple processors.. but it CAN send multiple threads to different pipelines.

    So in effect .. the processor will start an instruction (A) on clock cycle one .. but that instruction takes 5 clocks to finish.... it will start the NEXT (B) instruction on clock cycle two in a different pipeline.. but B only takes three clock cycles.. it comes out one ahead.. but what if it depends on a result of A? then you wasted something didnt you.. well it ALSO works this way for multi procs but WAY MORE convoluted..

    3. Multi processor computers require an completely different kind of bus hardware (referred to as APIC) vs. the older single proc limited PIC. To upgrade generally requires you upgrade you motherboard, proc and usually your RAM. (This is specific to Intel hardware types.. or AMD.. I dont know much about RISC hardware or its limitations)

    4. Its is a REALLY BAD idea to "add" a processor.. even if you can. You really have to trash your old one.. or use it in another computer. Multiple procs work best if they are from the same "stepping" model.. Im not positive... but I "think" when you buy sets. they are actually from the same "die" or at least same production run. When you are talking about something that small.. with that many components (we are talking tens of millions of transistors) even the most minute of differences can throw them off. Not enough for you to detectt.... but a proc running at 4GHz will know the difference.. you will get errors and more likely blue screens.. A LOT.

    ya Im sure someone will say how they did this and it worked fine.. thats okay if you are playing World of Warcraft (a multi threaded, multi proc enabled game)..but NOT if you are running a production server controlling your line.

    5. Two processors with a WELL WRITTEN app might yield a 40% improvement.. but there is overhead.. Windows XP/Linux/Unix for example are multi proc enabled OS's (unlike 9X). Overhead comes form management of the processors.. and memory. 4 procs will not make your computer 4 times faster. It really depends on the app and how its used. Look up Amdahl's Law.. will give you an idea..

    6. From what I understand.. writing multi proc apps .. is as much an art as a science.. many times.. if poorly done it can result in even poorer performance. A good programmer will know when to use them and when not to. Making a bunch of text calls.. which rely more on the bus and memory.. dont really require any CPU horsepower.. but a complicated floating point subroutine.. hell throw as many procs as you got at it. You cant just throw threads out there and expect results.

    7. There is only ONE OS ever written that ignores these rules.. that was the BeOS. Apparently it could forced any multi threaded application to use every processor available. As to how efficient it was. I have no idea.. It must have ran the app through some crazy API that redirected multiple threads to a "pseudo pool".. I cannot imagine this was efficient the overhead must have been tremendous. Things like thread pool and queue length have to be considered before an app is written.. sloppy managment of these will reult in piss poor performance of your app on pulti procs.

    I'll give you some gaming examples.. and you can test them for yourself.

    Half Life is a multi threaded app... but it WILL NOT take advantage of multiple processors.. if you watch your task manager.. you will see massive activity on Proc 0 but only a alight increase on proc 1... (proc 1 is from the OS processing I/O and backgoround commands).

    World of Warcraft.. multi proc enabled.. and VERY well written.. you will see anywhere from a 20-40% perf gain depending on the routines running. You can look at task man and both procs are screaming.

    CAD is a great example.. every proc you have will be screaming.. that prog as a hog.

    NOw that multi core procs are about as common as a liberal commie on a college campus.. you will see most modern apps written to use multi procs to some degree. but dont assume that because someone says multi threaded.. that you will se any diff.

    I hope that helps..
    Last edited: Dec 18, 2006
  14. Dec 18, 2006 #13
    Not true.
    However you can force an application to only use one CPU (or core).

    Not true. But an ill written piece of code wth lots of locks can effectively make it look as if the execution is on a single path.

    In some cases it may even slow down overall speed, due to locking and thread creation overhead.

    True, but what is odd is that you do not see any contradiction with your first two quoted and incorrect statements.

    Nonsense, being able to determine how to parallelize code is science, it's called computer science or more exactly computing science.

    I agree with that. And that will be as long as (bad) programmers claim that it is some form of art.
  15. Dec 18, 2006 #14
    I guess I always considered elegance an art.. :smile:

    They stopped teaching it a long time ago.. seemed to happen at about the same time RAM dropped in price.

    Ill have to get back to you on the rest.. Im headed home in a few minutes. We can chat more tomorrow.
  16. Dec 18, 2006 #15


    User Avatar
    Science Advisor

    The Kernel is responsible for scheduling threads. Operating Systems like Windows are "symmetric multiprocessing systems". This means that the Kernel can schedule a thread on any available processor.
    So by default threads can be run on separate processors, if you want to prevent a thread to be scheduled on some processor then you use processor affinity. If you're conviced that's not the case it would be nice to see some sources.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook