Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


Top White Papers

More on LinuxToday


Using Taskset for Priority Tasks

Dec 07, 2010, 16:04 (0 Talkback[s])
(Other stories by Joe 'Zonker' Brockmeier)

"Unless you're using a really old machine or cheap netbook, almost any system you touch with Linux these days is going to be a multiprocessor system. Any server machine deployed within the past five years should have at least two CPUs, and most desktops released in the past three years have at least two cores. For a number of reasons, you might want to "pin" some tasks so they run exclusively on a single CPU or set of CPUs.

"Whether you want to ensure resources for a process, ensure that a process doesn't hog all system resources or improve a process that doesn't scale well to multiple CPUs, you can use taskset to assign a task to specific CPUs. It's pretty simple.

"Using taskset, you "bond" a process to a CPU. Let's say you want to run Google Chrome on one CPU. You'd run something like this:"

Complete Story

Related Stories: