cluster-lbt:pin_t2c
no way to compare when less than two revisions
Différences
Ci-dessous, les différences entre deux révisions de la page.
— | cluster-lbt:pin_t2c [2022/01/25 15:23] (Version actuelle) – créée - modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ===== Pin_T2C (theads to cores) ===== | ||
+ | ==== Introduction ==== | ||
+ | **pin_t2c** is a homemade tool which let you set up and tune the CPU affinity for your jobs by pinning each app thread on a dedicated cpu. This can improve the global performance of a process by limiting, or even avoiding, cpu shiftings and cache/ | ||
+ | Some software comes with features for handling cpu affinity, but for all other software I recommand that you use **pin_t2c**. | ||
+ | |||
+ | According to NAMD2 tests by Guillaume S., **pin_t2c** provides global performance improvements of around 40% on Lucifer nodes and 10% on Baal ones. Note for NAMD: the functionality provided by **pin_t2c** is basically the same as // | ||
+ | |||
+ | Following standard usage, two main definitions (wordkeys) are used here: | ||
+ | * **socket** which represents here the physical processor ID/locator | ||
+ | * **cpu** which represents the physical/ | ||
+ | |||
+ | To be able to use this commande in your job script or interactive session, please load the eponymous module before: | ||
+ | <cli prompt=" | ||
+ | $ module load pin_t2c | ||
+ | </ | ||
+ | ==== A few use cases ==== | ||
+ | First, you can just select all available resources on the system (or provided by Torque/ | ||
+ | <cli> | ||
+ | $ myapp & pin_t2c --pid $! | ||
+ | </ | ||
+ | < | ||
+ | You can select which processor socket(s) to which you would like to restrict your process. The // | ||
+ | Here we're going to restrict our process to the first processor socket (ID: 0): | ||
+ | <cli> | ||
+ | $ myapp & pin_t2c --sockets 0 --pid $! | ||
+ | </ | ||
+ | //*: --sockets parameter is a processor socket list. This optional parameter must only contain a list of commas separated processor IDs (e.g 0,1).// | ||
+ | |||
+ | If you are aware about hardware details (especially cores distribution on each socket), you can manually specify which CPUs (cores) you wish to restrict your process to.\\ | ||
+ | Here we're going to restrict our process to half the processor resources (all system cpus with a step size of 2): | ||
+ | <cli> | ||
+ | $ myapp & pin_t2c --cpus all:2 --pid $! | ||
+ | </ | ||
+ | //*: --cpus parameter is a cpu/core list. This optional parameter must contain a list of commas separated cpu/core IDs (e.g 0,1,2,3) or ranges (e.g 0-19) or ranges with step size (e.g 0-39:2).// | ||
+ | |||
+ | You can manually select a part of each processor socket. In this case pin_t2c will automatically assign the correct cpus to each socket.\\ | ||
+ | Here, we're going to restrict our process to the 10 first cpus/cores from each socket: | ||
+ | <cli> | ||
+ | $ myapp & pin_t2c --sockets 0,1 --cpus 0-9 --pid $! | ||
+ | </ | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | Other parameters and use cases are available with **pin_t2c**. Don't hesitate to consult the tool CLI help and test it: | ||
+ | <cli> | ||
+ | $ pin_t2c --help | ||
+ | usage: pin_t2c [-h] [-s SOCKETS] [-c CPUS] [-f CPUSETFILE] [-r RUN] [-p PID] | ||
+ | [-d DELAY] [-v] [-n] [-V] | ||
+ | |||
+ | pin_t2c provides an easy way to pin threads of a running process to hardware | ||
+ | resources, specified or not. | ||
+ | |||
+ | optional arguments: | ||
+ | -h, --help | ||
+ | -s SOCKETS, --sockets SOCKETS | ||
+ | CPU socket list. This optional parameter must only | ||
+ | contain a list of commas separated socket id (e.g | ||
+ | 0,1). | ||
+ | -c CPUS, --cpus CPUS cpu core list. This optional parameter must contain a | ||
+ | list of commas separated core ids (e.g 0,1,2,3) or | ||
+ | ranges (e.g 0-19) or ranges with step (e.g 0-39:2). | ||
+ | -f CPUSETFILE, --cpusetfile CPUSETFILE | ||
+ | cpuset file describing your kernel cpuset mechanism | ||
+ | (/ | ||
+ | -r RUN, --run RUN your shell command you need to execute | ||
+ | -p PID, --pid PID your main process id you want to pin threads | ||
+ | -d DELAY, --delay DELAY | ||
+ | delay between each pinning | ||
+ | -v, --verbose | ||
+ | -n, --dry-run | ||
+ | -V, --version | ||
+ | and exits. | ||
+ | </ | ||
+ | < |
cluster-lbt/pin_t2c.txt · Dernière modification : 2022/01/25 15:23 de 127.0.0.1