Hi Willy, 

Another question: 
As you said, HAProxy seems no using multi-thread model, so multi-process 
(nbproc) is the only choice for HAProxy if we want using multiple processor 
cores sufficiently?

Thanks :-)

--

   Best Regards
  BaiYang
  baiy...@gmail.com
  http://baiy.cn
**** < END OF EMAIL > **** 
 
 
From: Willy Tarreau
Date: 2015-11-20 20:54
To: baiyang
CC: Lukas Tribus; haproxy
Subject: Re: Re: CPU 100% when waiting for the client timeout
On Fri, Nov 20, 2015 at 08:15:03PM +0800, baiyang wrote:
> > But the kernel's build date dates 2012, that's what troubles me. Are you 
> > sure you're not running on a locally built kernel that is never updated 
> > anymore or any such thing ?
> Yes I sure we are using the official kernel, and did a reboot after upgrade.
> But just like I said, Ubuntu seems need an explicitly command to do the
> kernal upgrade (apt-get dist-upgrade).
 
OK, I agree that it's not intuitive and may result in having many people
exposed to years of bugs and vulnerabilities.
 
> I have done it few minutes ago, and now:
> root@WD-G0-SRP1:~# uname -a
> Linux WD-G0-SRP1 3.2.0-95-generic #135-Ubuntu SMP Tue Nov 10 13:33:29 UTC 
> 2015 x86_64 x86_64 x86_64 GNU/Linux
 
Ah much better :-)
 
> I've been re-enabled the three options and done a "/etc/init.d/haproxy
> reload". Let's wait to see what's happen. :-)
 
Great!
 
> > Later you decide to close the fd. It's supposed to be removed from the fd 
> > list because you closed the last user, but....
> Ok, got it. I found the fd always be deleted explicitly from the epoll queue
> before it going to be closed in our framework. So we never faced this issue.
 
OK.
 
> > And doing so comes with a cost as you have to resubscribe it everytime you 
> > drain that event.
> Yeah, re-enable it in the epoll queue everytime or get EAGAIN in the last
> read/write call are all need some additional overheads. You can only avoid
> one of them sometime, Things get more complex when you want process the
> events concurrently in a thread pool from one single epoll queue.
 
With threads, you're certainly encouraged to use EPOLL_ET because the
model will limit the interactions between threads and the need to
synchronize.
 
> Of course
> maybe we can do it a slightly better under a single thread model?
 
Exactly :-)
 
> > Don't worry, we know all this quite well.
> I difinitely do think so, and I belive you are the expert of it. Just a
> little quick reminder for you :-)
 
No problem :-)
 
> > do you remember if you rebooted after upgrading haproxy to 1.6 the first 
> > time ?
> Not very clear, I only remembered I reboot the server every time "apt-get
> upgrade" finished. And I'm very clear we have many reboot of the server this
> week due to the troubleshooting needed.
 
OK. Let's wait for the problem to appear again, that's the only thing
which will tell us if the problem is fixed.
 
Cheers,
Willy
 

Reply via email to