Ajeet Raina Docker Captain, ARM Innovator & Docker Bangalore Community Leader.

How do I bind NIC interrupts to selected CPU?

52 sec read

I read this interesting mailing thread few weeks back. I won’t be late to share this with open source enthusiast like you. Here goes the story:

nic2

I have a 4 Quad server, am trying to bind NIC eth0 interrupt(s) to CPU4 and CPU5. As of now, my eth0 is found bind to all the 8’s.
#grep eth0 /proc/interrupts | awk ‘{print $NF}’ | sort

eth0-0
eth0-1
eth0-2
eth0-3
eth0-4
eth0-5
eth0-6
eth0-7

How to move ahead?

Solution: Follow these steps to get it done.

As I am using Broadcom card(bnx2), I am going to run this command and reboot my machine.

Open the terminal:

echo “options bnx2 disable_msi=1” > /etc/modprobe.d/bnx2.conf

then reboot, after you’ll only see one irq for eth0.

Next, run this command:

echo cpumask > /proc/irq/IRQ-OF-ETH0-0/smp_affinity

I believe the mask for cpu4 is 10 and cpu5 is 20.
(don’t forget to disable irqbalance)

you can only bind the irqs for one nic to one core at a time.

or you could do something fancy/silly with isolcpus and….

isolcpus all but 4/5 so that all irqs will be scheduled on 4/5. this will
mean that the kernel can only schedule tasks on cpu4/5.

Hope it helps !!!
then use cpusets/taskset/tuna to move all the processes off cpu 4/5… and
you’ll have to use taskset/cpuset/tuna for every task to ensure its not
using cpu4/5

Have Queries? Join https://launchpass.com/collabnix

Ajeet Raina Docker Captain, ARM Innovator & Docker Bangalore Community Leader.

31 Replies to “How do I bind NIC interrupts to selected CPU?”

  1. I have been surfing online greater than three hours as of late, yet I by no means found any attention-grabbing article like yours. It is beautiful worth sufficient for me. In my opinion, if all webmasters and bloggers made excellent content as you probably did, the net will be a lot more useful than ever before.

  2. Wow! This could be one particular of the most useful blogs We have ever arrive across on this subject. Basically Fantastic. I’m also a specialist in this topic therefore I can understand your hard work.

  3. Thanks for some other fantastic article. Where else may anybody get that kind of info in such a perfect way of writing? I’ve a presentation subsequent week, and I’m at the search for such info.

  4. Needed to put you the little bit of note just to thank you over again for your personal breathtaking secrets you’ve shared on this page. This has been certainly tremendously open-handed with you to offer easily what exactly many people could have distributed as an e-book to help with making some cash for their own end, especially now that you could have done it if you ever wanted. The solutions also acted like a easy way to know that most people have the same desire the same as my very own to grasp good deal more on the subject of this issue. I am certain there are some more pleasurable sessions in the future for individuals who look over your blog post.

  5. I am not sure where you’re getting your information, but great topic. I needs to spend some time learning more or understanding more. Thanks for fantastic information I was looking for this information for my mission.

  6. Greetings! I’ve been reading your weblog for a long time now and finally got the bravery to go ahead and give you a shout out from Kingwood Texas! Just wanted to mention keep up the excellent work!

  7. Youre so cool! I dont suppose Ive learn something like this before. So good to search out any individual with some authentic ideas on this subject. realy thanks for beginning this up. this website is one thing that is wanted on the net, somebody with a little originality. useful job for bringing something new to the web!

  8. Good day very cool web site!! Man .. Beautiful .. Superb .. I will bookmark your blog and take the feeds alsoKI’m satisfied to search out numerous useful info here within the post, we want develop extra techniques in this regard, thanks for sharing. . . . . .

  9. excellent post, very informative. I wonder why the other specialists of this sector don’t notice this. You should continue your writing. I’m confident, you have a huge readers’ base already!

  10. I’ve been browsing on-line more than three hours today, yet I never discovered any interesting article like yours. It’s lovely price enough for me. In my view, if all web owners and bloggers made just right content material as you probably did, the net will likely be much more useful than ever before.

  11. Thanks for one’s marvelous posting! I quite enjoyed reading it, you might be a great author.I will make sure to bookmark your blog and will come back from now on. I want to encourage you to ultimately continue your great work, have a nice afternoon!

  12. I really like your writing style, superb info, thanks for posting :D. “If a cluttered desk is the sign of a cluttered mind, what is the significance of a clean desk” by Laurence J. Peter.

  13. Wonderful site. Plenty of helpful info here. I’m sending it to a few pals ans additionally sharing in delicious. And naturally, thanks on your sweat!

  14. I have been surfing on-line more than 3 hours today, but I by no means found any interesting article like yours. It?¦s lovely worth enough for me. In my opinion, if all site owners and bloggers made just right content material as you probably did, the net might be much more helpful than ever before.

Leave a Reply

Your email address will not be published.