Modern computers use CPUs with multiple cores for performance reasons. Software can take advantage of that and use both cores to run separate threads but sometimes it’s useful if you can force a process to use one core rather than both.
In Linux that’s easy to do. If you’re using Ubuntu or Debian grab the schedutils package:
sudo apititude install schedutils
That will install a program called “taskset” which is a tool to “retrieve or set a process’s CPU affinity”. It’s really easy to use too.
I wanted to force Bibblelabs on to one core while importing photos.
# ps auxw|grep bibble
donncha 19482 78.7 33.1 1090388 681220 ? RNl 09:56 77:28 ./bibblepro
# taskset -p 19482
pid 19482’s current affinity mask: 3
# taskset -p 01 19482
pid 19482’s current affinity mask: 3
pid 19482’s new affinity mask: 1
The app is still heavy on the system, and “System Monitor” doesn’t suddenly show 0% usage on one CPU because I’m also running Firefox, Xchat, X, Gnome Terminal but I’d almost swear the browser window refreshes faster.
PS. Thanks to whoever told me about this on Twitter a while back. It had slipped my mind and I had to search for it again. Blogging it to remember it!
You might also like
- All Core Drilling – motto
All Core Drilling have an unfortunate motto, *************** "With Us- Yeah! Perl rox! :) Sorry about …
Yeah! Perl rox! :) Sorry about the lack of updates.- Fedora Core 2 – May 18th Release?
Today is the day when Fedora Core 2 is released.
If you like this post then please subscribe to my full RSS feed. You can also click here to subscribe by email. There are also my fabulous photos and funny videos to explore too!

Why not just renice it?
I reniced it too but Bibble is just too hungry for resources. Actually I gave up on it and started using the Macbook while it’s importing. I do have rather a lot of images for some reason.. *snap* *snap*
neat trick
[...] Run a program on one CPU core in Linux. [...]