GNU/Linux >> Belajar Linux >  >> Cent OS

Cara Mengatur Afinitas CPU untuk Proses SISTEM di CentOS/RHEL 7

CPUAfinitas adalah salah satu arahan untuk mengontrol afinitas CPU dari proses yang dijalankan sistem.

dari halaman manual systemd.exec:

# man systemd.exec

CPUAffinity=

Controls the CPU affinity of the executed processes. Takes a list of CPU indices or ranges separated by either
 whitespace or commas. CPU ranges are specified by the lower and upper CPU indices separated by a dash. This 
option may be specified more than once in which case the specified CPU affinity masks are merged. If the empty 
string is assigned, the mask is reset, all assignments prior to this will have no effect. See sched_setaffinity(2)
 for details.

Mengonfigurasi afinitas CPU

1. Edit file “/etc/systemd/system.conf “:

# vi /etc/systemd/system.conf

2. Batalkan komentar “CPUaffinity ” dan tambahkan nomor CPU.

CPUAffinity=2,3

3. Mulai ulang server dan verifikasi status afinitas CPU.

Verifikasi

Perintah berikut mengungkapkan afinitas proses CPU:

# taskset -p [process ID]
# ps --ppid 2 -p 2 -o uname,pid,ppid,cmd,cls,psr --deselect


Cent OS
  1. Linux – Bagaimana Cara Mengatur Afinitas Cpu Default Untuk Semua Daemon Di Systemd?

  2. CentOS / RHEL :Cara Mengaktifkan SSL Untuk Apache

  3. CentOS / RHEL 7 :Cara mengatur aturan udev untuk ASM pada disk multipath

  1. Cara mengatur children-max untuk Layanan udev di CentOS/RHEL 7

  2. Bagaimana mengontrol sumber daya (cgroup) dengan systemd untuk grup proses pengguna di CentOS/RHEL 7

  3. Cara Mengatur Variabel Lingkungan untuk Layanan systemd di CentOS/RHEL 7

  1. Cara Mengatur Batas Sumber Daya untuk Proses dengan Systemd di CentOS/RHEL 7 dan 8

  2. Bagaimana cara menambahkan Skrip Kustom ke systemd di CentOS/RHEL 7

  3. Cara mengatur nilai ulimit untuk layanan systemd