Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Setting CPU affinity for processes
New Posts  All Forums:Forum Nav:

Setting CPU affinity for processes

post #1 of 9
Thread Starter 
How do you set CPU affinity for certain process? The Urban Terror read me recommends that you set the affinity so the program only uses one core, since the game is not multi threaded and sometimes when it switches around it may cause slowdowns (which I have been experiencing).
Magicbox
(17 items)
 
crapbox
(13 items)
 
 
CPUMotherboardGraphicsRAM
Ryzen 7 1700 AX370-Gamin K7 Nitro+ RX480 Corsair LPX 
Hard DriveHard DriveHard DriveCooling
Samsung 850 EVO  Kingston HyperX 3K Seagate Barracuda 7200.14 Noctua NH-D15 
OSOSMonitorKeyboard
Kubuntu  Windows 10 Pro Dell U2515H CM Quickfire TK (Cherry Blue) 
PowerCaseMouseMouse Pad
EVGA 750 G2 Enthoo Pro Logitech G502 Logitech G440 
CPUMotherboardGraphicsRAM
Sempron 3300+ HP stock mobo (laptop) 200M (IGP) 2x1GB PC3200 
Hard DriveOptical DriveOSMonitor
100GB ATA133 DVD/CDRW Kubuntu 32 bit 14.1" (1280x768) 
Power
6 cell 
  hide details  
Reply
Magicbox
(17 items)
 
crapbox
(13 items)
 
 
CPUMotherboardGraphicsRAM
Ryzen 7 1700 AX370-Gamin K7 Nitro+ RX480 Corsair LPX 
Hard DriveHard DriveHard DriveCooling
Samsung 850 EVO  Kingston HyperX 3K Seagate Barracuda 7200.14 Noctua NH-D15 
OSOSMonitorKeyboard
Kubuntu  Windows 10 Pro Dell U2515H CM Quickfire TK (Cherry Blue) 
PowerCaseMouseMouse Pad
EVGA 750 G2 Enthoo Pro Logitech G502 Logitech G440 
CPUMotherboardGraphicsRAM
Sempron 3300+ HP stock mobo (laptop) 200M (IGP) 2x1GB PC3200 
Hard DriveOptical DriveOSMonitor
100GB ATA133 DVD/CDRW Kubuntu 32 bit 14.1" (1280x768) 
Power
6 cell 
  hide details  
Reply
post #2 of 9
Ctrl + alt + Delete, then Processes, right click the process and go to Set Affinity.
post #3 of 9
CTRL+ALT+DEL --> Processes --> Find the process you want and press right click and set affinity.

EDIT: -Inferno was faster.
The Kandalf
(16 items)
 
  
CPUMotherboardGraphicsGraphics
I7 5820K MSI X99S Gaming 7 ASUS R9 280X TOP Crossfire X ASUS R9 280X TOP Crossfire X 
RAMHard DriveOptical DriveOS
Crucial DDR4 2133MHz 8GB (2x4GB) Samsung SpinPoint F1 1TB HP DVD630 Ubuntu 
MonitorKeyboardPowerCase
2x Philips Brilliance 220CW Microsoft Wireless Desktop Elite Keyboard Fractal Design Newton R3, 800W 80+ Platinum Corsair 900D 
MouseMouse PadAudioAudio
Mionix Naos 8200 Razer Pro Solutions Arcam rDAC B&W CM1 
  hide details  
Reply
The Kandalf
(16 items)
 
  
CPUMotherboardGraphicsGraphics
I7 5820K MSI X99S Gaming 7 ASUS R9 280X TOP Crossfire X ASUS R9 280X TOP Crossfire X 
RAMHard DriveOptical DriveOS
Crucial DDR4 2133MHz 8GB (2x4GB) Samsung SpinPoint F1 1TB HP DVD630 Ubuntu 
MonitorKeyboardPowerCase
2x Philips Brilliance 220CW Microsoft Wireless Desktop Elite Keyboard Fractal Design Newton R3, 800W 80+ Platinum Corsair 900D 
MouseMouse PadAudioAudio
Mionix Naos 8200 Razer Pro Solutions Arcam rDAC B&W CM1 
  hide details  
Reply
post #4 of 9
Correct! ^^^
post #5 of 9
Do you have the AMD dual core driver and patch installed?
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #6 of 9
Thread Starter 
Guys, this is for Linux. Ctrl + Alt + Del kills X. The gnome-system-monitor does not let you set processor affinity either.
Magicbox
(17 items)
 
crapbox
(13 items)
 
 
CPUMotherboardGraphicsRAM
Ryzen 7 1700 AX370-Gamin K7 Nitro+ RX480 Corsair LPX 
Hard DriveHard DriveHard DriveCooling
Samsung 850 EVO  Kingston HyperX 3K Seagate Barracuda 7200.14 Noctua NH-D15 
OSOSMonitorKeyboard
Kubuntu  Windows 10 Pro Dell U2515H CM Quickfire TK (Cherry Blue) 
PowerCaseMouseMouse Pad
EVGA 750 G2 Enthoo Pro Logitech G502 Logitech G440 
CPUMotherboardGraphicsRAM
Sempron 3300+ HP stock mobo (laptop) 200M (IGP) 2x1GB PC3200 
Hard DriveOptical DriveOSMonitor
100GB ATA133 DVD/CDRW Kubuntu 32 bit 14.1" (1280x768) 
Power
6 cell 
  hide details  
Reply
Magicbox
(17 items)
 
crapbox
(13 items)
 
 
CPUMotherboardGraphicsRAM
Ryzen 7 1700 AX370-Gamin K7 Nitro+ RX480 Corsair LPX 
Hard DriveHard DriveHard DriveCooling
Samsung 850 EVO  Kingston HyperX 3K Seagate Barracuda 7200.14 Noctua NH-D15 
OSOSMonitorKeyboard
Kubuntu  Windows 10 Pro Dell U2515H CM Quickfire TK (Cherry Blue) 
PowerCaseMouseMouse Pad
EVGA 750 G2 Enthoo Pro Logitech G502 Logitech G440 
CPUMotherboardGraphicsRAM
Sempron 3300+ HP stock mobo (laptop) 200M (IGP) 2x1GB PC3200 
Hard DriveOptical DriveOSMonitor
100GB ATA133 DVD/CDRW Kubuntu 32 bit 14.1" (1280x768) 
Power
6 cell 
  hide details  
Reply
post #7 of 9
I've never heard of setting affinity in Linux. But then again I've always used and still use single-core CPUs
post #8 of 9
Quote:
# taskset -c 1 -p {pid of urban terror}
I might could write a script to do this and launch the game, but I can't guarantee that it will work
Atlantis
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Athlon(tm) 64 X2 Dual Core Processor 6400+ Asus M2N-SLI deluxe bfg tech geforce 7600 gt oc 1 GB corsair xms ddr2 
Hard DriveOSMonitorKeyboard
80 GB sata +320 GB sata Gentoo:win2k3 ACER micro wireless 
PowerCaseMouse Pad
350w need 600w TT sviking the "blue mouse pad" 
  hide details  
Reply
Atlantis
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Athlon(tm) 64 X2 Dual Core Processor 6400+ Asus M2N-SLI deluxe bfg tech geforce 7600 gt oc 1 GB corsair xms ddr2 
Hard DriveOSMonitorKeyboard
80 GB sata +320 GB sata Gentoo:win2k3 ACER micro wireless 
PowerCaseMouse Pad
350w need 600w TT sviking the "blue mouse pad" 
  hide details  
Reply
post #9 of 9
Thread Starter 
The taskset command works:

taskset -c 0 <name of app.> # forces app. to core0
Magicbox
(17 items)
 
crapbox
(13 items)
 
 
CPUMotherboardGraphicsRAM
Ryzen 7 1700 AX370-Gamin K7 Nitro+ RX480 Corsair LPX 
Hard DriveHard DriveHard DriveCooling
Samsung 850 EVO  Kingston HyperX 3K Seagate Barracuda 7200.14 Noctua NH-D15 
OSOSMonitorKeyboard
Kubuntu  Windows 10 Pro Dell U2515H CM Quickfire TK (Cherry Blue) 
PowerCaseMouseMouse Pad
EVGA 750 G2 Enthoo Pro Logitech G502 Logitech G440 
CPUMotherboardGraphicsRAM
Sempron 3300+ HP stock mobo (laptop) 200M (IGP) 2x1GB PC3200 
Hard DriveOptical DriveOSMonitor
100GB ATA133 DVD/CDRW Kubuntu 32 bit 14.1" (1280x768) 
Power
6 cell 
  hide details  
Reply
Magicbox
(17 items)
 
crapbox
(13 items)
 
 
CPUMotherboardGraphicsRAM
Ryzen 7 1700 AX370-Gamin K7 Nitro+ RX480 Corsair LPX 
Hard DriveHard DriveHard DriveCooling
Samsung 850 EVO  Kingston HyperX 3K Seagate Barracuda 7200.14 Noctua NH-D15 
OSOSMonitorKeyboard
Kubuntu  Windows 10 Pro Dell U2515H CM Quickfire TK (Cherry Blue) 
PowerCaseMouseMouse Pad
EVGA 750 G2 Enthoo Pro Logitech G502 Logitech G440 
CPUMotherboardGraphicsRAM
Sempron 3300+ HP stock mobo (laptop) 200M (IGP) 2x1GB PC3200 
Hard DriveOptical DriveOSMonitor
100GB ATA133 DVD/CDRW Kubuntu 32 bit 14.1" (1280x768) 
Power
6 cell 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Setting CPU affinity for processes