Raised This Month: $32 Target: $400
 8% 

Question about binding cores


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
asdfxD
Veteran Member
Join Date: Apr 2011
Old 11-17-2021 , 00:27   Question about binding cores
Reply With Quote #1

since i host servers i binding cores to each server & isolcpus which makes sure, no other stuff is running at the gameservers core. i have better experiences with it and many others can confirm this.


/sys/devices/system/cpu/cpu0/topology/thread_siblings_list 0,12
/sys/devices/system/cpu/cpu12/topology/thread_siblings_list 0,12
/sys/devices/system/cpu/cpu13/topology/thread_siblings_list 1,13
/sys/devices/system/cpu/cpu1/topology/thread_siblings_list 1,13
/sys/devices/system/cpu/cpu14/topology/thread_siblings_list 2,14
/sys/devices/system/cpu/cpu2/topology/thread_siblings_list 2,14
/sys/devices/system/cpu/cpu15/topology/thread_siblings_list 3,15
/sys/devices/system/cpu/cpu3/topology/thread_siblings_list 3,15
/sys/devices/system/cpu/cpu16/topology/thread_siblings_list 4,16
/sys/devices/system/cpu/cpu4/topology/thread_siblings_list 4,16
/sys/devices/system/cpu/cpu17/topology/thread_siblings_list 5,17
/sys/devices/system/cpu/cpu5/topology/thread_siblings_list 5,17
/sys/devices/system/cpu/cpu18/topology/thread_siblings_list 6,18
/sys/devices/system/cpu/cpu6/topology/thread_siblings_list 6,18
/sys/devices/system/cpu/cpu19/topology/thread_siblings_list 7,19
/sys/devices/system/cpu/cpu7/topology/thread_siblings_list 7,19
/sys/devices/system/cpu/cpu20/topology/thread_siblings_list 8,20
/sys/devices/system/cpu/cpu8/topology/thread_siblings_list 8,20
/sys/devices/system/cpu/cpu21/topology/thread_siblings_list 9,21
/sys/devices/system/cpu/cpu9/topology/thread_siblings_list 9,21
/sys/devices/system/cpu/cpu10/topology/thread_siblings_list 10,22
/sys/devices/system/cpu/cpu22/topology/thread_siblings_list 10,22
/sys/devices/system/cpu/cpu11/topology/thread_siblings_list 11,23
/sys/devices/system/cpu/cpu23/topology/thread_siblings_list 11,23


for example i want to use CPU1 at one server, what is the correct way when binding it?

taskset -c 1 or taskset -c 1,13

CPU1 is the real core and CPU13 the vCore? and both 1,13 = 1 Core?

Last edited by asdfxD; 11-17-2021 at 00:43.
asdfxD is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-17-2021 , 11:34   Re: Question about binding cores
Reply With Quote #2

Aaa....

- CPU have multiple cores and one core can do one thread.
- If CPU support simultaneous multithreading (SMT, Hyper-Threading, etc.), it can do two threads per core.

for example:
Intel i7-9700K 8 cores, total 8 threads
Intel i9-9900K 8 cores, total 16 threads


But on later in descriptions, threads are mention as "cores" :/ it's confusing.

About taskset.
-c or --cpu-list for using numerical list.

Check your cpu "cores" with linux command: top and press "1"

Core count start from index 0

PHP Code:
taskset -c 0
taskset 
-c 1
taskset 
-c 2
taskset 
-c 3
taskset 
-c 4
.
.
.
taskset -c 9
taskset 
-c 10
taskset 
-c 11 
- Try set one thread per server like above first 4 lines.
- To set one core, use pair threads if you can't/want disable SMT from server. [0,1], [2,3], [4,5], etc.
or better, use every second index, 0, 2, 4, 6, 8, 10

- seems op have 12 cores, 24 threads. First 0-11 are physical cores, hyper-threads are 12-23
__________________
Do not Private Message @me

Last edited by Bacardi; 11-17-2021 at 13:29.
Bacardi is offline
asdfxD
Veteran Member
Join Date: Apr 2011
Old 11-17-2021 , 11:55   Re: Question about binding cores
Reply With Quote #3

i know that cores count from 0... but what is the correct way to use one real core (not fake) in taskset, check my output above.

/sys/devices/system/cpu/cpu1/topology/thread_siblings_list 1,13

means CPU1 and CPU13 share the same physical hardware address, if i disable HT, CPU13 will be disabled.

the correct way is also taskset -c 1 ./srcds_run -game csgo ....

Last edited by asdfxD; 11-17-2021 at 12:02.
asdfxD is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-17-2021 , 12:57   Re: Question about binding cores
Reply With Quote #4

try this if possible
https://unix.stackexchange.com/a/113549

or look command lstopo --cpuset


wait a second...
https://stackoverflow.com/a/7812183

Quote:
Originally Posted by asdfxD View Post
since i host servers i binding cores to each server & isolcpus which makes sure, no other stuff is running at the gameservers core. i have better experiences with it and many others can confirm this.

Code:
/sys/devices/system/cpu/cpu0/topology/thread_siblings_list 0,12
/sys/devices/system/cpu/cpu12/topology/thread_siblings_list 0,12
/sys/devices/system/cpu/cpu13/topology/thread_siblings_list 1,13
/sys/devices/system/cpu/cpu1/topology/thread_siblings_list 1,13
/sys/devices/system/cpu/cpu14/topology/thread_siblings_list 2,14
/sys/devices/system/cpu/cpu2/topology/thread_siblings_list 2,14
/sys/devices/system/cpu/cpu15/topology/thread_siblings_list 3,15
/sys/devices/system/cpu/cpu3/topology/thread_siblings_list 3,15
/sys/devices/system/cpu/cpu16/topology/thread_siblings_list 4,16
/sys/devices/system/cpu/cpu4/topology/thread_siblings_list 4,16
/sys/devices/system/cpu/cpu17/topology/thread_siblings_list 5,17
/sys/devices/system/cpu/cpu5/topology/thread_siblings_list 5,17
/sys/devices/system/cpu/cpu18/topology/thread_siblings_list 6,18
/sys/devices/system/cpu/cpu6/topology/thread_siblings_list 6,18
/sys/devices/system/cpu/cpu19/topology/thread_siblings_list 7,19
/sys/devices/system/cpu/cpu7/topology/thread_siblings_list 7,19
/sys/devices/system/cpu/cpu20/topology/thread_siblings_list 8,20
/sys/devices/system/cpu/cpu8/topology/thread_siblings_list 8,20
/sys/devices/system/cpu/cpu21/topology/thread_siblings_list 9,21
/sys/devices/system/cpu/cpu9/topology/thread_siblings_list 9,21
/sys/devices/system/cpu/cpu10/topology/thread_siblings_list 10,22
/sys/devices/system/cpu/cpu22/topology/thread_siblings_list 10,22
/sys/devices/system/cpu/cpu11/topology/thread_siblings_list 11,23
/sys/devices/system/cpu/cpu23/topology/thread_siblings_list 11,23

for example i want to use CPU1 at one server, what is the correct way when binding it?

taskset -c 1 or taskset -c 1,13

CPU1 is the real core and CPU13 the vCore? and both 1,13 = 1 Core?
Your physical cores are: 0 - 11
Hyper-threads are: 12 - 23
__________________
Do not Private Message @me

Last edited by Bacardi; 11-17-2021 at 13:07.
Bacardi is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode