It’s happened to all of us. You’re working on your computer and you need to do something (like backup your computer, virus scan, photoshop work) and your computer becomes incredibly unresponsive. How do you deal with this?
It’s actually a very simple thing called CPU affinity. What exactly does that mean? Exactly what it stands for. It binds a process to a CPU core. The problem is when your computer just doesn’t have enough horsepower to complete a task quick enough (like render a movie into another format or you’re rendering an image in Photoshop). In my case, it’s doing cryptography “stuff” or when my daily backup runs.
I’m the perfect example of this. When my daily backup runs (I have it scheduled for 2:04 AM every day), my computer slows to a crawl. For the most part, it renders the computer completely unusable for ~ 3 hours. Considering I’m compressing my backups (and compression is VERY CPU intensive especially when you’re doing it to .5 Terabytes), the machine just gets VERY Laggy or completely unresponsive.
How do I combat it? Simply by binding the process to 6 of my 8 processor cores and allowing my other 2 cores to do other things. While this is an interesting solution, here’s something to consider. At 2 AM in the morning, I’m either working on my book, doing research, or something relatively lightweight. It’s the perfect time to run a backup. Most of the time, I’m asleep and it doesn’t matter if the computer uses most / all of its number crunching capability for that task, but every once in a while, I’ll need the computer to be responsive as well.
I simply free up 2 processor cores in task manager and I can operate (surf the web, work on my book, do research) while the other 6 cores are chugging away at 100% compressing my backup.
It’s a simple procedure. Here’s how to do it.
1. Right Click on your Menu Bar (in a blank section and select “Task Manager”)
2. Select the Process we need to Set Affinity for and Right Click on the Process and select Set Affinity. This is the program or process that’s hanging your computer. In this case, for me, it’s Acronis TrueImage.
3. Choose the Number of Processors you want to run this process on. It should automatically be set to use all of your cores. In this case, I’m freeing up 2 cores for other tasks (like General Web Browsing, Emailing, Working on my Book). As Soon as you click “OK”, your computer should become usable again!
Well, That’s it! Hope this helps!
Note To Mac OSX Users: Unfortunately, you can’t set Processor Affinity, but it is handled “Auto Magically” by the Kernel.