News for hackers. Stuff that matters.
Re:HAProxy 2.7 by toast0 on Friday December 02, 2022 @02:33PM (#33835630)
I was running on FreeBSD, and using port selection inside HAProxy to avoid the kernel selecting it, but still had contention on locks when inserting connections into the table. I can't remember if that was FreeBSD 11 or 12, but the next version made improvements which looked nice, but I wasn't able to test.

Somewhere my (not very great, but working) patch set is floating around, where I added rss aware port selection to HAProxy, so client and origin connections would both hash to the same NIC RX queue, and HAProxy never had to deal with cross-cpu communication for reading sockets.

Re:HAProxy 2.7 by wtarreau on Friday December 02, 2022 @06:14PM (#33838266)
This interests me. I've long been wondering how we could do that without knowing the NIC's hash and/or without having to brute-force the ports using the NIC's hash to reverse-map them. But maybe there are kernel facilities I'm not aware of to do that. If you happen to stumble upon it and share it to the mailing list, that would be great!
Re:HAProxy 2.7 by toast0 on Friday December 02, 2022 @08:03PM (#33839133)
https://www.mail-archive.com/[email protected]/msg34548.h...

I haven't looked at this code in a long time! Haven't gotten to a computer and it's hard to read this on a phone, so... And I left where I wrote it, so I can't confirm if there were any substantial changes after these. My fuzzy memory is this may be all the HAProxy changes, then I focused on kernel level changes.

Re:HAProxy 2.7 by wtarreau on Saturday December 03, 2022 @01:42AM (#33841292)
Many thanks! Too bad this thread was not noticed and left unresponded. I'll have a look. Thanks again!