CPU Affinity for Interrupts

Thought I would throw this out here so I remember it, and it maybe useful for someone else.  During a session here at Sun’s CEC conference one of the presenter was talking about setting CPU affinity for hardware interrupts.  This made me think of our hack ( workaround ) for innodb scalability on a 16 core machine ( set the mysqld affinity to cpu’s 0-7 or 8-15 ).   In order to get the top performance out of a 16 core machine we probably want to ensure everything else goes to the cpu’s not set to be servicing mysql.   So a quick google search came up with this article on setting the affinity for IRQ’s in the linux kernel.   So with a 16 core box, I could set the affinity for Mysqld to cpu’s 8-15, while setting the affinity of the interrupts to something in the 0-7 range.

This entry was posted in hardware, linux, mysql, performance. Bookmark the permalink.

2 Responses to CPU Affinity for Interrupts

  1. Peter says:

    Yeah…. If there is a lot of everything else.

    We used the hack to restrict the cores MySQL used for a while to help people who thought more cores should be better for MySQL and bought too many CPUs with too many cores 🙂

    Also good tool if you run multiple MySQL instances with even load.

  2. mike503 says:

    I have irqbalance installed (http://irqbalance.org/) – it’s in Ubuntu repos, and is made by Intel, most likely as a generic utility to do the work described in the article for you 🙂

Comments are closed.