Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Mar 2009 08:27:01 -1000
From:      Clifton Royston <cliftonr@lava.net>
To:        freebsd-hackers@freebsd.org
Cc:        Martin Badie <martinbadie@yahoo.com>
Subject:   Re: freebsd-hackers Digest, Vol 310, Issue 6
Message-ID:  <20090309182700.GA20062@lava.net>
In-Reply-To: <20090308120022.523F81065672@hub.freebsd.org>
References:  <20090308120022.523F81065672@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 08, 2009 at 12:00:22PM +0000, freebsd-hackers-request@freebsd.org wrote:
> Date: Sat, 7 Mar 2009 13:08:56 -0800 (PST)
> From: Martin Badie <martinbadie@yahoo.com>
> Subject: select.h FD_SETSIZE and Qmail-Postfix test
> To: freebsd-hackers@freebsd.org
> Message-ID: <67469.69113.qm@web59906.mail.ac4.yahoo.com>
> Content-Type: text/plain; charset=us-ascii
> 
> Hi,
> 
> There is a test that I am doing with FreeBSD and Linux. This test
> involves qmail and postfix comparison. Both FreeBSD and Linux seems
> to have 1024 File Descriptor limit. (FD_SETSIZE in select.h in
> FreeBSD) .
> 
> To have a better concurrency in qmail on smtp level. I have used a
> patch named big-todo patch also used big-concurrency patch. These
> patches helps me to increase concurrency in operating system. I set
> concurrent connection to 500(tcpserver -c 500). There is no problem
> until around 400-500 active smtp connection. But if the total smtp
> connection exceeds 500, load average increases to ~40-50 but cpu
> system time arises to %50-60.  The strange issue is that, this load
> increases when the connection is limited to accept 500 connections
> but the tool I use is configured to 700 (more than 500) connections.
> Normally ucspi-tcp software limits connection to 500 ( -c 500) I
> suspect it is something to do with Operating system level.
> 
> Additionally I have also patched FreeBSD kernel with 4096 FD_SETSIZE
> in select.h in kernel and booted with that kernel. I have also
> compiled qmail from scratch to accept 2040 connections (in
> conf-spawn) but there is no change I mean I still can't get more than
> decent 500 connections with acceptable load average.
> 
> I have also used postfix on both Linux FreeBSD:
> 
> default_process_limit =  500    
> smtpd_client_connection_count_limit = 500
> 
> but I still get strange load when connection raises more than 500
> 
> I suspect something is missing or need to be configured on the operating system level (both Linux and FreeBSD)

  One point which you might be missing is that both FreeBSD and Linux
(and I think most other modern OSes) have long since deprecated the
select interface for high performance/high concurrency software.  On
FreeBSD the preferred mechanism is kqueue, and IIRC Postfix prefers to
build with the kqueue interface on FreeBSD.  Linux uses something else
which escapes me at the moment; perhaps epoll?

  This makes benchmarks on select() primarily of historic interest.
  -- Clifton
 
-- 
    Clifton Royston  --  cliftonr@iandicomputing.com / cliftonr@lava.net
       President  - I and I Computing * http://www.iandicomputing.com/
 Custom programming, network design, systems and network consulting services



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090309182700.GA20062>