Re: Multiple haproxy threads

From: Willy Tarreau <w#1wt.eu>
Date: Fri, 21 Dec 2007 09:09:12 +0100


Hi Michael,

On Thu, Dec 20, 2007 at 04:47:19PM -0800, Michael Nguyen wrote:
> Hi guys!
>
> So I've done a lot of reading on haproxy, but I have some questions.
> With our managed hosting provider, multiple-CPU boxes are very cheap and
> easy to acquire. Would there be any advantage to getting one of these
> boxes and running two haproxy processes (each reading a different
> configuration) or would this just be a waste? I would like haproxy to
> load balance, web, SMTP, IMAP/POP3, etc. so I I was thinking that
> perhaps running an haproxy process for each cluster would be a swell
> idea. In general, it sounds like more than one CPU wouldn't be all that
> helpful with haproxy, but perhaps I'm wrong. Any thoughts?

You could gain some performance if you really want to push the data rate very high. To give you an idea, yesterday I performed a test with 10Gig NICs between two machines, and running 2 processes instead of one on a dual-core pentium-D boosted the performance from 2.5 Gbps to 2.9 Gbps. In terms of hits per second, the boost was more noticeable, from 16000 with a single process to 20000 with two processes. But honnestly, it's very rare to require such a performance level. So if you think you'll stay far below (which I assume from SMTP, POP, ...), you should stay with one process. The small performance gain is not worth the management complications IMHO.

Regards,
Willy Received on 2007/12/21 09:09

This archive was generated by hypermail 2.2.0 : 2007/12/21 09:16 CET