Home »
Hardware
»
Computer Systems
Read the article that everyone's commenting on.
Subscribe to the RSS Feed for comments on this article.
I never tried this myself, but would setting the affinity of a "multi-threaded" application to use only 3 out of the 4 cores actually listen to you and leave a single core free for other things?
It would be nice too, to see some kind of logo or something on the software that tells you how many cores it's programmed to work for... Like movie ratings you see on DVDs.... wishful thinking.. lol
Posted by: Chris at January 15, 2009 8:38 AMRight on the money, as always, Leo. When I built my own quad-core at home and was doing processor cooling fan tests, I had to run four separate instances of Prime95 (a single-thread prime number searching program commonly used for "loading" a processor for testing) to get my CPU utilization up to 100%. Each instance grabbed exactly 25% of my quad-core chip, maxing out just the processor it was running on.
Posted by: Jeff Lentz at January 20, 2009 9:18 AMOne of the confusing things about Windows use of multiple cores is that it 'spreads the work out' [i.e. it uses all the cores], even when it doesn't need to. WIth only one task running, it only needs to use one of the cores.
Chris; of course your suggestion about affinity will work [and leave one processor free] but that's not what a multi-core application wants! It would want to run on all four CPUs but you would have limited it to three. [You don't need to leave one 'free', as the System will run things 'in the right order' anyway; i.e. the dispatcher will prioritise as appropriate].
Posted by: Julian Hicks at January 20, 2009 11:11 AMP.S. I find the best value CPU speeed per Pound spent [sorry, Dollar spent :-)] comes from the cheaper dual core processors [not Hyperthreaded ones though!]. 2 x 3GHz is more useful and cheaper than 4 x 2.5, for example. The Excel sample quoted would run at 3GHZ with one CPU unused rather than at 2.5GHz with three CPUs unused.
Posted by: Julian Hicks at January 20, 2009 11:17 AMExcel 2007 has a setting where you can specify how many of the available processors it can use. Excel 2003 doesn't.
Posted by: Rob White at January 20, 2009 12:23 PMRob, perhaps you could tell us where the setting is? Thanks in advance.
Posted by: Paul Higgins at January 24, 2009 7:44 AMExcel 2007 to use all available cores:
Click Office Button, goto excel options, advanced and look for the section formulas. Enable multi threaded calculation
Thanks Dimitri.
Posted by: Paul Higgins at January 27, 2009 4:04 AMI have the same trouble running Excel VBA code. The "Enable multi-threaded" option does not seem to solve the problem, still 25% the cpu being used. I made a sample VBA program and timed how long it took to run. Here are some comparative results on some of my machines and my colleagues machines(in seconds):
Single core Results
MyDeskTop (2.79GHz, 1GB, XP) 71
MyWorkLaptop (2.2 GHz, 1GB, W2000) 84
JasonComp (P4 3.0 GHz, 1GB, XP) 61
Dual Core Results:
John (1.83 GHz duo, 2GB ram, XP) 59
Akio (2.16 Duo celeron,3.4GB, XP) 49
Kevin (2.4 Core 2 Duo, 3 GB ram, XP) 42
Quad Core results:
Tom (3.0 GHz Quad Xeon, XP, 64 bit, 3 GB ram) 36 Kevin (2.83 Quad Core, 3 GB ram, XP 32) 37 Note that the quad core only seems to run at dual core speed?? Why?
Also for all results for the single core, the task manager shows CPU at 100%, for dual core, it shows the CPU at 50%, and for the quad, CPU @ 25%. Bizarre results. The dual core calculates almost twice as fast as the single of the same GHz, but the quad core shows no improvement in calculation speed over the dual core. Why????? I am desperate because I write alot of VBA code and feel I wasted my money with the quad core. Maybe should have gone with a dual and overclocked. How can I speed up Excel VBA so that it runs at a suitable speed on my quad core?
Also, has anyone tried running Excel VBA on vista? any difference in speed? I am grateful for any replies. Thanks, Kevin
Kevin, I just realized the same thing as you did: while Excel 2007 can use multiple cores for spreadsheet calculations, it can not when it comes to VBA programs. 2 thoughts on this: 1) maybe it's faster in some VBA applications to convert them to pure spreadsheet calculations 2) I do a lot of Monte Carlo simulation in my VBA programs and here the rule for Multi-processor use would be quite simple: calculate half of the scenarios with 1 processor and the other half with the other - of course there is no way to tell this to Excel - but I am trying now to run 2 instances of Excel in parallel and then combine the results "manually".
Posted by: Stephan at March 1, 2009 2:41 AMTo post a comment on "Why won't my program use more than 25% of the CPU?", please return to that article's main page.