Re: HAProxy performance on OpenBSD

2023-01-24 Thread Willy Tarreau
On Wed, Jan 25, 2023 at 12:04:14AM +0100, Olivier Houchard wrote: > > 0x0af892c770b0 : mov%r12,%rdi > > 0x0af892c770b3 : callq 0xaf892c24e40 > > > > 0x0af892c770b8 : mov%rax,%r12 > > 0x0af892c770bb : test %rax,%rax > > 0x0af892c770be : je

Re: HAProxy performance on OpenBSD

2023-01-24 Thread Willy Tarreau
On Tue, Jan 24, 2023 at 11:59:16PM -0600, Marc West wrote: > On 2023-01-24 23:04:14, Olivier Houchard wrote: > > On Tue, Jan 24, 2023 at 11:05:37PM +0100, Willy Tarreau wrote: > > > On Tue, Jan 24, 2023 at 02:15:08PM -0600, Marc West wrote: > > > > > Stupid question but I prefer to ask in order to

Re: HAProxy performance on OpenBSD

2023-01-24 Thread Marc West
On 2023-01-24 23:04:14, Olivier Houchard wrote: > On Tue, Jan 24, 2023 at 11:05:37PM +0100, Willy Tarreau wrote: > > On Tue, Jan 24, 2023 at 02:15:08PM -0600, Marc West wrote: > > > > Stupid question but I prefer to ask in order to be certain, are all of > > > > these 32 threads located on the

Re: HAProxy performance on OpenBSD

2023-01-24 Thread Olivier Houchard
On Tue, Jan 24, 2023 at 11:05:37PM +0100, Willy Tarreau wrote: > On Tue, Jan 24, 2023 at 02:15:08PM -0600, Marc West wrote: > > > Stupid question but I prefer to ask in order to be certain, are all of > > > these 32 threads located on the same physical CPU ? I just want to be > > > sure that locks

Re: HAProxy performance on OpenBSD

2023-01-24 Thread Willy Tarreau
On Tue, Jan 24, 2023 at 02:15:08PM -0600, Marc West wrote: > > Stupid question but I prefer to ask in order to be certain, are all of > > these 32 threads located on the same physical CPU ? I just want to be > > sure that locks (kernel or user) are not traveling between multiple CPU > > sockets,

Re: HAProxy performance on OpenBSD

2023-01-24 Thread Marc West
On 2023-01-24 06:58:57, Willy Tarreau wrote: > Hi Marc, Hi Willy, > See the difference ? There seems to be an insane FD locking cost on this > system that simply wastes 40% of the CPU there. So I suspect that in your > first tests you were stressing the locking while in the last ones you > were

Re: HAProxy performance on OpenBSD

2023-01-23 Thread Willy Tarreau
Hi Marc, On Mon, Jan 23, 2023 at 11:36:48PM -0600, Marc West wrote: (...) > I tested flooding bogus UDP traffic from two other machines with random > source ports (nsd listening on 53). Within 1 second PF had ~130k states > and load was minimal: (...) OK at least at this point we can rule out

Re: HAProxy performance on OpenBSD

2023-01-23 Thread Marc West
On 2023-01-23 07:58:24, Willy Tarreau wrote: > Hi Marc, Hi Willy, Thanks for your reply and all of your work on haproxy! > I think you should try to flood the machine using UDP traffic to see > the difference between the part that happens in the network stack and > the part that happens in the

Re: HAProxy performance on OpenBSD

2023-01-23 Thread Olivier Houchard
Hi Marc, On Mon, Jan 23, 2023 at 12:13:13AM -0600, Marc West wrote: > Hi, > > We have been running HAProxy on OpenBSD for serveral years (currently > OpenBSD 7.2 / HAProxy 2.6.7) and everything has been working perfect > until a recent event of higher than normal traffic. It was an unexpected >

Re: HAProxy performance on OpenBSD

2023-01-23 Thread Willy Tarreau
On Mon, Jan 23, 2023 at 02:22:45PM +0600, ??? wrote: > also, I wonder what is LibreSSL <--> OpenSSL perf. > I'll try "openssl speed" (I recall LibreSSL has the same feature), but I'm > not sure I can get OpenBSD machine. It wouldn't have caused that much system if it was the cause, the

Re: HAProxy performance on OpenBSD

2023-01-23 Thread Илья Шипицин
gmail decided to put original message to spam. I replied to first reply. indeed it was mentioned. sorry пн, 23 янв. 2023 г. в 14:22, Willy Tarreau : > Hi Ilya, > > On Mon, Jan 23, 2023 at 02:11:56PM +0600, ??? wrote: > > I would start with big picture view > > > > 1) are CPUs utilized

Re: HAProxy performance on OpenBSD

2023-01-23 Thread Willy Tarreau
Hi Ilya, On Mon, Jan 23, 2023 at 02:11:56PM +0600, ??? wrote: > I would start with big picture view > > 1) are CPUs utilized at 100% ? > 2) what is CPU usage in details - fraction of system, user, idle ... ? > > it will allow us to narrow things and find what is the bottleneck, either

Re: HAProxy performance on OpenBSD

2023-01-23 Thread Илья Шипицин
also, I wonder what is LibreSSL <--> OpenSSL perf. I'll try "openssl speed" (I recall LibreSSL has the same feature), but I'm not sure I can get OpenBSD machine. can you try haproxy + openssl-1.1.1 (it is considered the most performant these days) ? пн, 23 янв. 2023 г. в 14:17, Илья Шипицин : >

Re: HAProxy performance on OpenBSD

2023-01-23 Thread Илья Шипицин
and fun fact from my own experience. I used to run load balancer on FreeBSD with OpenSSL built from ports. somehow I chose "assembler optimization" to "no" and OpenSSL big numbers arith were implemented in slow way I was able to find big fraction of BN-functions using "perf" tool. something like

Re: HAProxy performance on OpenBSD

2023-01-23 Thread Илья Шипицин
I would start with big picture view 1) are CPUs utilized at 100% ? 2) what is CPU usage in details - fraction of system, user, idle ... ? it will allow us to narrow things and find what is the bottleneck, either kernel space or user space. пн, 23 янв. 2023 г. в 14:01, Willy Tarreau : > Hi

Re: HAProxy performance on OpenBSD

2023-01-23 Thread Willy Tarreau
Hi Marc, On Mon, Jan 23, 2023 at 12:13:13AM -0600, Marc West wrote: (...) > I understand that raw performance on OpenBSD is sometimes not as high as > other OSes in some scenarios, but the difference of 500 vs 10,000+ > req/sec and 1100 vs 40,000 connections here is very large so I wanted to >