mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2020-10-24, 05:34   #1
JuanTutors
 
JuanTutors's Avatar
 
Mar 2004

1F516 Posts
Default New warning, didn't appear way back in the day

I just switched p95 v30.3 to run two threads instead of one to see if it would get a better throughput. Is it normal to get the following warning ONLY when running two threads and not one?

Quote:
You have allocated more cores than are available. This is likely to GREATLY REDUCE performance. Do you want to correct this?
JuanTutors is offline   Reply With Quote
Old 2020-10-24, 07:07   #2
S485122
 
S485122's Avatar
 
Sep 2006
Brussels, Belgium

1,597 Posts
Default

Suppose you have a processor with 2*n cores running one worker using 2*n cores.
If you change to two workers, you must change the first worker to use n core(s). The error message leads me to think that you changed the number of workers, without adapting the "CPU cores to use (Multithreading)" setting in consequence.

The total of the number of cores used by all the workers must not exceed the number of cores (or the number of threads in the case of a processor supporting hyper-threading.)

Jacob
S485122 is offline   Reply With Quote
Old 2020-10-24, 08:21   #3
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

22×7×11×29 Posts
Default

Quote:
Originally Posted by JuanTutors View Post
I just switched p95 v30.3 to run two threads instead of one to see if it would get a better throughput. Is it normal to get the following warning ONLY when running two threads and not one?
Each worker can use an arbitrary number of threads. Threads are specific for workers, in the sense that you can't have two workers sharing the same thread. Therefore, if you have for example, 2 workers and each uses 3 threads, then you have a total of 6 threads. If you have 2 workers and the first uses 3 threads and the second uses 4, then you have a total of 7 threads.

The optimal output (read as "the most efficient") for most types of works and for most systems, is when the total number of threads is equal to the total number of physical cores in your system. Some systems get some more output per wall clock time if you run more threads than physical cores, but this depends on the system and on the work type. For example, ECM can get about 30% more performance in some systems if you run more threads than physical cores.

For the most of the programs you run in your computer, the processor is mostly free, it waits for you to type at the keyboard or move your mouse, for example, therefore you can run more threads than physical cores, and one core can take care of more than one thread. The CPU manufacturers even encourage this, making processors that present themselves to the external world with more cores than they really have. It is called "hyper-threading" (HT). Like the CPU lies to you, it says "hey, I have 8 cores, you can give me 8 tasks in the same time!", or "hey I have 12 cores, you can give me 12 tasks in the same time!", when in reality it only has 4. The most of the times, the CPU will get away with this "lie", because he can execute the tasks very fast, and switch from one to the other, and you can not see. But this is based on the fact that the most tasks you give him to do have gaps, waiting times, periods in which the CPU is not required to do much, and he can work on other tasks. So, he could finish two or three tasks in the same time allocated for one.

The "fictive" cores that the CPU claims to have, are called "virtual cores". So, you may have 4 physical cores only, but if the HT is enabled in your CPU, it will tell you that you have 8 or 12 cores.

Prime 95 is not such a "lazy, filled with waiting times" program. It is designed to be "very efficient", therefore running more threads than the number of cores in the same time, won't benefit you. Contrary, you will get less work done, or about the same work for a much higher energy consumption (to switch between tasks).

But you are free to try, and you may get the things done faster in your system if you don't care much about the heat you produce, about the lifetime of your components, and about your electricity bill.

However, Prime 95 will notify you every time your number of threads are higher than the number of physical cores or, if HT enabled, higher than the number of virtual cores.

That's the error you got. It is not an error, P95 will work very well with 100 threads, just it may not be very efficient, as it will lose more time switching threads to schedule them in your 4 cores, than doing useful work (computing).

To fix it, and only if you want to fix it, it is not mandatory, as I just said, you can run 100 threads, no problem, but if you want to "fix" it, then click Test in the menu, click Worker Windows, and there you can set the number of workers, and for each worker, the number of threads.

Run the Benchmark from Options menu first, to see what settings have the best output for your system.

After changing the number of workers or threads, you need to exit P95 (from Test/Exit, and not clicking the red X) and restart. The interface is a bit stupid and it will not update the windozes without a restart. Also, be careful that repeatedly changing the workers settings, you may end up with some unwanted assignments, or lose some, as the assignments are moved from one worker to the other, or new assignments are requested from server when you increase the number of workers.

And again, don't confuse workers with threads. One worker can run an arbitrary number of threads. In the ideal world, every thread will take a (physical) core, and that would be your best output.

Last fiddled with by LaurV on 2020-10-24 at 08:34
LaurV is offline   Reply With Quote
Old 2020-10-24, 08:39   #4
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

16F816 Posts
Default

Quote:
Originally Posted by LaurV View Post
The "fictive" cores that the CPU claims to have, are called "virtual cores".
I know everyone here likes to call these things "cores". But Intel called it hyper-threading for a reason. It is a thread, not a core. It never was a core, it never will be a core.

Calling them physical and virtual cores is mighty confusing. All cores are physical. The rest are threads feeding the cores. No virtual-anything is required.
retina is offline   Reply With Quote
Old 2020-10-24, 09:59   #5
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

22×7×11×29 Posts
Default

That's why they are "virtual".
"Fictive", fictional. Pufff ! Hihi.
I agree that it is kinda confusing, in some situations. I have colleagues which are smart and educated in related fields, like electronics or math, and they imagine you have 8 cores inside of a 4-core HT CPU, from which 4 are "real" and "better", and the other 4 are "not so good" or "not so real" but you still "can use them for some easy work".
But that's the terminology, confuse or not.
As bad as it can be in some situations, it saves headache in other. For example, "threads" is reserved for the things you are currently running in your computer. You may have 50 threads running in a machine with 4 physical cores, in spite fo the fact that, when HT is enabled, the OS believes the machine has 8 cores. (you can not say "machine has 8 threads" haha). And that's the situation always, just open Task Manager ans see how many processes and threads are running simultaneously in your machine (with 2*N virtual cores )

Last fiddled with by LaurV on 2020-10-24 at 10:11
LaurV is offline   Reply With Quote
Old 2020-10-24, 10:09   #6
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

23·3·5·72 Posts
Default

Quote:
Originally Posted by LaurV View Post
... and they imagine you have 8 cores inside of a 4-core HT CPU, from which 4 are "real" and "better", and the other 4 are "not so good" or "not so real" but you still "can use them for some easy work".
That is the very reason to stop calling them virtual. It creates such silly notions in people's heads.
retina is offline   Reply With Quote
Old 2020-10-24, 10:13   #7
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

22×7×11×29 Posts
Default

Nope.

Read last paragraph I added to the post.

And yes, I know Intel calls them "threads" in their CPU "ark" page.
LaurV is offline   Reply With Quote
Old 2020-10-24, 10:34   #8
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

588010 Posts
Default

Quote:
Originally Posted by LaurV View Post
(you can not say "machine has 8 threads" haha).
Sure I can. I just have to word it correctly.

"My CPU can process 8 threads simultaneously, through its 4 execution cores, a maximum of 2 threads per core. The OS has to schedule its 50 threads among the 8 CPU threads."

Not only is it not confusing, it is also accurate terminology.
retina is offline   Reply With Quote
Old 2020-10-24, 10:56   #9
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

22·7·11·29 Posts
Default

Quote:
Originally Posted by retina View Post
"My CPU can process 8 threads simultaneously, through its 4 execution cores, a maximum of 2 threads per core. The OS has to schedule its 50 threads among the 8 CPU threads."
That looks nice! Not all of us are native Chiglish speakers!
LaurV is offline   Reply With Quote
Old 2020-10-24, 11:01   #10
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

10110111110002 Posts
Default

Quote:
Originally Posted by LaurV View Post
... Chiglish ...
我认为我的英语是差。这太糟糕了。我想我说的中式英语。你们知道中式英语?这意思是以中国人的想法说英语。例如,好久不见。

retina is offline   Reply With Quote
Old 2020-10-24, 11:35   #11
xilman
Bamboozled!
 
xilman's Avatar
 
"𒉺𒌌𒇷𒆷𒀭"
May 2003
Down not across

237328 Posts
Default

Quote:
Originally Posted by retina View Post
I know everyone here likes to call these things "cores". But Intel called it hyper-threading for a reason. It is a thread, not a core. It never was a core, it never will be a core.

Calling them physical and virtual cores is mighty confusing. All cores are physical. The rest are threads feeding the cores. No virtual-anything is required.
All memory is physical.

Doesn't stop the term "virtual memory" from being a term which is both useful and widely understood.
xilman is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
warning: zero character Alfred Msieve 2 2018-03-18 18:52
Warning: XxX of your assignments have been extended... guido72 GPU to 72 3 2015-02-19 10:15
Is there an FAQ for Error and Warning messages? Unregistered Information & Answers 31 2013-01-31 06:13
warning: zero character fivemack Msieve 1 2009-03-21 14:26
Firefox 2.0 warning Prime95 Lounge 7 2006-10-31 05:40

All times are UTC. The time now is 17:31.

Mon Nov 30 17:31:47 UTC 2020 up 81 days, 14:42, 3 users, load averages: 1.90, 1.72, 1.69

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.