Tip: Prioritizing CPU Cores on Linux
Pick a CPU Core, Any CoreAny server made in the last five years or so is going to have at least a dual-core CPU. Linux has a nifty tool to assign specific tasks to a particular core, taskset.
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.
Read the rest of Joe Brockmeier's Linux taskset story at ServerWatch.com
- 1Linux Top 3: Fedora 24, Peppermint 7 and Solus 1.2
- 2Linux Top 3: Alpine Linux 3.4, deepin 15.2 and Linux Lite 3.0
- 3Linux 4.7 Set to Boost Live Patching, Security and Power Management
- 4Linux 4.6 Charred Weasel adds USB 3.1 Support
- 5Linux Top 3: OpenIndiana 2016.04, Ubuntu 16.04 and Debian's New Leader