PrimeGrid
Please visit donation page to help the project cover running costs for this month

Join PrimeGrid

Returning Participants

Community

Leader Boards

Results

Other

drummers-lowrise

Advanced search

Message boards : Project Staging Area : prpclient's cpuaffinity value?

Author Message
Profile xrmb
Send message
Joined: 16 Feb 17
Posts: 4
ID: 492587
Credit: 10,987,893
RAC: 24,876
321 LLR Bronze: Earned 10,000 credits (55,316)Cullen LLR Silver: Earned 100,000 credits (311,008)ESP LLR Silver: Earned 100,000 credits (127,741)Generalized Cullen/Woodall LLR Amethyst: Earned 1,000,000 credits (1,204,023)PPS LLR Bronze: Earned 10,000 credits (56,891)PSP LLR Amethyst: Earned 1,000,000 credits (1,018,572)SoB LLR Gold: Earned 500,000 credits (682,002)SR5 LLR Silver: Earned 100,000 credits (217,669)SGS LLR Bronze: Earned 10,000 credits (14,848)TRP LLR Silver: Earned 100,000 credits (145,747)Woodall LLR Silver: Earned 100,000 credits (477,434)Generalized Cullen/Woodall Sieve Silver: Earned 100,000 credits (476,905)PPS Sieve Ruby: Earned 2,000,000 credits (2,467,572)TRP Sieve (suspended) Silver: Earned 100,000 credits (475,162)AP 26/27 Silver: Earned 100,000 credits (452,816)GFN Ruby: Earned 2,000,000 credits (2,527,524)PSA Silver: Earned 100,000 credits (276,662)
Message 106112 - Posted: 17 Mar 2017 | 2:16:35 UTC

I hope this is the right place to ask.

What should the value for cpuaffinity be? A cpu number or a bitmask or a bitmask as a number? I assume it is bitmask as number since -1 would turn into FFFF... and mean all cpus.

So, if I want a client to only run on CPU 4 (assuming we start counting at 1), 8 (0b1000), and not "4" or "1000".

I tried them all, and at least llr64 did not care, so I used imagecfg to force the exe file to an affinity.

Profile composite
Send message
Joined: 16 Feb 10
Posts: 354
ID: 55391
Credit: 357,044,844
RAC: 305,030
321 LLR Ruby: Earned 2,000,000 credits (3,454,678)Cullen LLR Gold: Earned 500,000 credits (676,922)ESP LLR Amethyst: Earned 1,000,000 credits (1,021,827)Generalized Cullen/Woodall LLR Amethyst: Earned 1,000,000 credits (1,719,804)PPS LLR Ruby: Earned 2,000,000 credits (3,584,165)PSP LLR Ruby: Earned 2,000,000 credits (3,730,893)SoB LLR Ruby: Earned 2,000,000 credits (3,580,843)SR5 LLR Turquoise: Earned 5,000,000 credits (5,071,131)SGS LLR Ruby: Earned 2,000,000 credits (2,860,720)TRP LLR Ruby: Earned 2,000,000 credits (4,212,414)Woodall LLR Amethyst: Earned 1,000,000 credits (1,291,833)321 Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,228,005)Cullen/Woodall Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,571,178)Generalized Cullen/Woodall Sieve Ruby: Earned 2,000,000 credits (2,206,963)PPS Sieve Double Bronze: Earned 100,000,000 credits (155,127,299)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Jade: Earned 10,000,000 credits (10,165,888)TRP Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,071,454)AP 26/27 Ruby: Earned 2,000,000 credits (2,439,709)GFN Sapphire: Earned 20,000,000 credits (26,274,450)PSA Double Bronze: Earned 100,000,000 credits (102,758,261)
Message 106155 - Posted: 18 Mar 2017 | 20:25:23 UTC - in response to Message 106112.
Last modified: 18 Mar 2017 | 20:27:52 UTC

This is my script for startx.sh

#!/bin/bash instance=$(pwd | sed -re 's/.*-//') CPUs=$(grep processor /proc/cpuinfo | wc -l) cores=$(dc -e "$CPUs 2 / p") mincores=$cores if [ ! -z $1 ]; then if (( $1 < $mincores )); then mincores=$1 fi fi CPUa=$(dc -e "$instance 1 - $mincores % p") CPUb=$(dc -e "$CPUa $cores + p") echo running on logical CPUs $(dc -e "$CPUa 1 + p") and $(dc -e "$CPUb 1 + p") sed -i 's/^stopasapoption=./stopasapoption=0/' prpclient.ini # go rm -f nohup.out && nohup taskset -c $CPUa,$CPUb ./prpclient -v >nohup.out 2>&1 &

syntax: startx.sh [N]

The first argument "N" is an optional integer. It constrains affinity to be within the first N cores (to help you partition work on your system). If N is not supplied, affinity is on any core.

It uses the prpclient-X directory name to set CPU affinity for the task to the pair of HT CPUs on the same physical core (this is for Linux; in Windows HT pairs are adjacent N).

"taskset" here sets the affinity using a comma-separated list rather than a bitmask.

This is not an especially efficient use of HT, and you could remove $CPUb from the taskset command.

Profile xrmb
Send message
Joined: 16 Feb 17
Posts: 4
ID: 492587
Credit: 10,987,893
RAC: 24,876
321 LLR Bronze: Earned 10,000 credits (55,316)Cullen LLR Silver: Earned 100,000 credits (311,008)ESP LLR Silver: Earned 100,000 credits (127,741)Generalized Cullen/Woodall LLR Amethyst: Earned 1,000,000 credits (1,204,023)PPS LLR Bronze: Earned 10,000 credits (56,891)PSP LLR Amethyst: Earned 1,000,000 credits (1,018,572)SoB LLR Gold: Earned 500,000 credits (682,002)SR5 LLR Silver: Earned 100,000 credits (217,669)SGS LLR Bronze: Earned 10,000 credits (14,848)TRP LLR Silver: Earned 100,000 credits (145,747)Woodall LLR Silver: Earned 100,000 credits (477,434)Generalized Cullen/Woodall Sieve Silver: Earned 100,000 credits (476,905)PPS Sieve Ruby: Earned 2,000,000 credits (2,467,572)TRP Sieve (suspended) Silver: Earned 100,000 credits (475,162)AP 26/27 Silver: Earned 100,000 credits (452,816)GFN Ruby: Earned 2,000,000 credits (2,527,524)PSA Silver: Earned 100,000 credits (276,662)
Message 106198 - Posted: 20 Mar 2017 | 23:57:25 UTC - in response to Message 106155.

I ended up turning HT off... with 8 threads on 4 cores I got an "iteration time" of 9ms... with 4 threads on 4 cores with HT I get 5ms... when messing with affinity I get it down to 3ms... with 4 threads on 4 cores w/o HT I get well below 3ms, and dont have to mess with affinity at all...

Post to thread

Message boards : Project Staging Area : prpclient's cpuaffinity value?

[Return to PrimeGrid main page]
Copyright © 2005 - 2017 Rytis Slatkevičius (contact) and PrimeGrid community. Server load 5.63, 5.63, 5.44
Generated 19 Nov 2017 | 18:05:19 UTC