mersenneforum.org 1cpu vs 2cpu
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read

2020-12-31, 11:08   #1
cardmaker

Jun 2016

24 Posts
1cpu vs 2cpu

hello, im testing new hardware factoring a 100digit and no much diference make between 1 cpu vs 2 cpu only 30sec does it normal?
is the same number and same bin(script 0.84 , msieve 1.52), only the change is the number os cores.
NUM_CORES = 12
to
NUM_CORES = 24

and the result whit 1 cpu:
Quote:
 Number: example N = 1522605027922533360535618378132637429718068114961380688657908494580122963258952897654000350692006139 (100 digits) Divisors found: r1=37975227936943673922808872755445627854565536638199 (pp50) r2=40094690950920881030683735292761468389214899724061 (pp50) Version: Msieve v. 1.52 (SVN Nicht versioniertes Verzeichnis) Total time: 0.21 hours. Factorization parameters were as follows: n: 1522605027922533360535618378132637429718068114961380688657908494580122963258952897654000350692006139 # norm 1.402930e-13 alpha -6.325236 e 1.281e-08 rroots 2 skew: 3483965.44 c0: -36738379143255767765564663397 c1: 75967609570279467412754 c2: -784169456850679 c3: -3486221646 c4: 1368 Y0: -1027140279095180418809608 Y1: 16592488498117 type: gnfs Factor base limits: 1800000/1800000 Large primes per side: 3 Large prime bits: 26/26 Sieved algebraic special-q in [0, 0) Total raw relations: 5073376 Relations: 254576 relations Pruned matrix : 155741 x 155971 Polynomial selection time: 0.01 hours. Total sieving time: 0.17 hours. Total relation processing time: 0.01 hours. Matrix solve time: 0.02 hours. time per square root: 0.00 hours. Prototype def-par.txt line would be: gnfs,99,4,58,1500,0.003,0.4,220,15,10000,2000,1800000,1800000,26,26,48,48,2.5,2.5,100000 total time: 0.21 hours. x86_64 processors: 48, speed: 1.20GHz Linux-4.4.0-197-generic-x86_64-with-Ubuntu-16.04-xenial Running Python 2.7
and whit 2 cpu:
Quote:
 Number: example N = 1522605027922533360535618378132637429718068114961380688657908494580122963258952897654000350692006139 (100 digits) Divisors found: r1=37975227936943673922808872755445627854565536638199 (pp50) r2=40094690950920881030683735292761468389214899724061 (pp50) Version: Msieve v. 1.52 (SVN Nicht versioniertes Verzeichnis) Total time: 0.20 hours. Factorization parameters were as follows: n: 1522605027922533360535618378132637429718068114961380688657908494580122963258952897654000350692006139 # norm 9.462249e-14 alpha -4.664878 e 1.057e-08 rroots 4 skew: 3782058.60 c0: 35793799656782527909425094900 c1: -19487356755197005852048 c2: -28534739231977525 c3: 3449886256 c4: 804 Y0: -1173089344615252621251927 Y1: 4312706706875 type: gnfs Factor base limits: 1800000/1800000 Large primes per side: 3 Large prime bits: 26/26 Sieved algebraic special-q in [0, 0) Total raw relations: 5021071 Relations: 284824 relations Pruned matrix : 173370 x 173598 Polynomial selection time: 0.00 hours. Total sieving time: 0.16 hours. Total relation processing time: 0.01 hours. Matrix solve time: 0.03 hours. time per square root: 0.01 hours. Prototype def-par.txt line would be: gnfs,99,4,58,1500,0.003,0.4,220,15,10000,2000,1800000,1800000,26,26,48,48,2.5,2.5,100000 total time: 0.20 hours. x86_64 processors: 48, speed: 1.20GHz Linux-4.4.0-197-generic-x86_64-with-Ubuntu-16.04-xenial Running Python 2.7
by the clock wall only 30sec of diference for factorization does it normal? sould it be more diference whit 2 cpu?
also this line "processors: 48, speed: 1.20GHz" is not right because my cpu clock is 2.3GHZ and not 1.2 anyone have an ideia?

 2020-12-31, 11:24 #2 retina Undefined     "The unspeakable one" Jun 2006 My evil lair 612710 Posts Both results say the exact same CPU count: Code: processors: 48, speed: 1.20GHz So I would expect them to finish in a similar time.
 2020-12-31, 13:34 #3 EdH     "Ed Hall" Dec 2009 Adirondack Mtns 71608 Posts The speed is a "right now" speed rather than a listed speed. The 30 second difference is probably due to the polynomial rather than the hardware. What was the command line that invoked msieve? Did it include "-t "? If msieve was called from another program/script, does that p/s provide the hardware values to use? Last fiddled with by EdH on 2020-12-31 at 13:38 Reason: clarity
2020-12-31, 16:07   #4
cardmaker

Jun 2016

24 Posts

@retina
Quote:
 processors: 48, speed: 1.20GHz
this line i think is a reading of system not the total cores i set in script, because when executing script only the number of thread i set in script are executed.
example when set to 12 log appear t0 -> t23
when set 24 log appear t0 ->47

@EdH
yes the number of thread are invoked correctly in the msieve comand line.
i use the script version 84, and i see its correct.

2020-12-31, 16:48   #5
charybdis

Apr 2020

111011112 Posts

I presume your system has 24 physical cores with hyperthreading.

Setting
Quote:
 Originally Posted by cardmaker NUM_CORES = 12 THREADS_PER_CORE = 2
will run 24 processes for most of the factorization, and unless you force factmsieve.py to only use 12 physical cores, the scheduler will assign one process to each core. The speedup you get from NUM_CORES = 24 relative to NUM_CORES = 12 is only due to the use of hyperthreading, so we shouldn't expect speed to double.

Your factorization with NUM_CORES = 24 had a substantially worse polynomial and still finished quicker than the one with NUM_CORES = 12, so 24 is definitely faster - just nowhere near double the speed.