Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jan 2016 17:46:37 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Rui Paulo <rpaulo@me.com>
Cc:        HuanHuan <mailhuanhuan@gmail.com>, freebsd-net@freebsd.org
Subject:   Re: Does FreeBSD have sendmmsg or recvmmsg system calls?
Message-ID:  <alpine.BSF.2.20.1601031744040.20884@fledge.watson.org>
In-Reply-To: <1451841004.10139.34.camel@me.com>
References:  <alpine.BSF.2.20.1601031833130.84701@localhost.my.domain> <1451841004.10139.34.camel@me.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 3 Jan 2016, Rui Paulo wrote:

>> NetBSD 7.0 has just introduced these two syscalls. And Linux also has them.
>> 
>> Does FreeBSD have them? Or plan to support them in the future?
>
> FreeBSD does not have them.  It doesn't seem especially hard to implement, 
> though.  Do you know any major application already using them?

I see no harm in having the system calls.  When I chatted with the authors of 
nsd a couple of years ago (they had originally promoted the approach), they 
told me they felt it only offered incremental benefit and didn't particularly 
recommend that FreeBSD adopt it.  However, it would undoubtably see use and 
does offer some opportunities for future batching-related performance 
operations, so if someone wants to pursue introducing it, do go ahead.  Or 
just introduce a libc implementation that can be converted to a kernel 
implementation later if that is determined to be beneficial.  But the nsd 
observations don't (currently) lead me to believe that it is critical to do 
so.

Robert
From owner-freebsd-net@freebsd.org  Sun Jan  3 18:02:38 2016
Return-Path: <owner-freebsd-net@freebsd.org>
Delivered-To: freebsd-net@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6B66A60342
 for <freebsd-net@mailman.ysv.freebsd.org>;
 Sun,  3 Jan 2016 18:02:38 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com
 [IPv6:2607:f8b0:4001:c06::22d])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 8CDD213B5;
 Sun,  3 Jan 2016 18:02:38 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: by mail-io0-x22d.google.com with SMTP id 1so91832257ion.1;
 Sun, 03 Jan 2016 10:02:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=loCPEqvGbDPBPwjC1sMJUfIFn9ap9SL2erM9ZwmsKWY=;
 b=AVQnAudXRUccKRTDcTIK9gcDWn89FMeyaCZGtcz6uGosy7K6Jx2a/UXn6OCEbMDcbD
 IGflhxufui7Q+BVNiNAZ0uXjScZr8QNpxPu0HnAPxKWJ0BrBVCPUCadT81AUIPplJ7V5
 Z4VW603y+GJUCj8+DOTN0lyjztNlaT/6mslENE/wl82USTtGvIxLD8tVGGLvziX5WF0+
 TtWjG/FPyWUsOhgrEWTZbjUeIRIaAwgiGbcp+OOu/1ZPLnsaPSH0dY9G/UgTo2/vHWZ2
 /XBZZQEQglkkl5TH+G0Zyhn6j+JAZJ+3t4v6+kd7A54hwjaQVn8QKn5xoT63lPeDk3MB
 R+hA==
MIME-Version: 1.0
X-Received: by 10.107.162.146 with SMTP id l140mr21286164ioe.123.1451844157937; 
 Sun, 03 Jan 2016 10:02:37 -0800 (PST)
Received: by 10.36.121.202 with HTTP; Sun, 3 Jan 2016 10:02:37 -0800 (PST)
In-Reply-To: <alpine.BSF.2.20.1601031744040.20884@fledge.watson.org>
References: <alpine.BSF.2.20.1601031833130.84701@localhost.my.domain>
 <1451841004.10139.34.camel@me.com>
 <alpine.BSF.2.20.1601031744040.20884@fledge.watson.org>
Date: Sun, 3 Jan 2016 10:02:37 -0800
Message-ID: <CAJ-Vmomxcn+iYJAzNViL8WnepsCihrkTuHd8=0O6vONKsTExCA@mail.gmail.com>
Subject: Re: Does FreeBSD have sendmmsg or recvmmsg system calls?
From: Adrian Chadd <adrian.chadd@gmail.com>
To: Robert Watson <rwatson@freebsd.org>
Cc: Rui Paulo <rpaulo@me.com>, HuanHuan <mailhuanhuan@gmail.com>, 
 FreeBSD Net <freebsd-net@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: freebsd-net@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-net>,
 <mailto:freebsd-net-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net/>;
List-Post: <mailto:freebsd-net@freebsd.org>
List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-net>,
 <mailto:freebsd-net-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 03 Jan 2016 18:02:38 -0000

On 3 January 2016 at 09:46, Robert Watson <rwatson@freebsd.org> wrote:
> On Sun, 3 Jan 2016, Rui Paulo wrote:
>
>>> NetBSD 7.0 has just introduced these two syscalls. And Linux also has
>>> them.
>>>
>>> Does FreeBSD have them? Or plan to support them in the future?
>>
>>
>> FreeBSD does not have them.  It doesn't seem especially hard to implement,
>> though.  Do you know any major application already using them?
>
>
> I see no harm in having the system calls.  When I chatted with the authors
> of nsd a couple of years ago (they had originally promoted the approach),
> they told me they felt it only offered incremental benefit and didn't
> particularly recommend that FreeBSD adopt it.  However, it would undoubtably
> see use and does offer some opportunities for future batching-related
> performance operations, so if someone wants to pursue introducing it, do go
> ahead.  Or just introduce a libc implementation that can be converted to a
> kernel implementation later if that is determined to be beneficial.  But the
> nsd observations don't (currently) lead me to believe that it is critical to
> do so.

There's a paper from Yahoo! from a while ago where they did, among
other things, add this functionality (to linux.)

It doesn't help at low connection rates. It helps at high connection /
concurrency rates as the time going in/out of the kernel and getting
back to steady state execution changes.

I can't find the paper off-hand, but it is out there.

I can benchmark it on my UDP RSS stuff and see if it helps at the
highest connection rates. :)


-adrian



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