From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-la0-x233.google.com (mail-la0-x233.google.com [IPv6:2a00:1450:4010:c03::233]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 0D4CA21F5C7; Thu, 18 Jun 2015 21:08:06 -0700 (PDT) Received: by labbc20 with SMTP id bc20so66604712lab.1; Thu, 18 Jun 2015 21:08:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=W3+ThMGxC0ka8SUimNZJOoHHzLxWi25ahL0YLKfnhCg=; b=B76sEeClVhWX9BsUH27xz5xQedYjHx3GmoCDGUMH9y4jEemN1dYK0GNIJtWk8rIj+d 3vBqRAFVxVtkXwyRlNwuaH2tfCMt588o5G7/9wbK7SvIx0dK7D8ASAym998srCr2eXU5 Dc8ySDtFx+X53fYa73MdVCItJ+4SwnV7iVs9eI1OEq98JeTFb7tYGQVJn+k25gWnZZeF inJl8ylRvBhsSDnWnEQy1KnQAyppNdN2M5Zksdn2paNMPMTPFDivNiHJbUsv0ad3uunI rN4yL7761RC92AQCbuA2hjly64zHZSYYo8ZNjmzxypVNqEIh4rKz2ClTKpYQ3AMocctw wYvQ== X-Received: by 10.152.239.131 with SMTP id vs3mr16160550lac.102.1434686884085; Thu, 18 Jun 2015 21:08:04 -0700 (PDT) Received: from bass.home.chromatix.fi (87-93-125-206.bb.dnainternet.fi. [87.93.125.206]) by mx.google.com with ESMTPSA id q3sm2211083laa.30.2015.06.18.21.08.01 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Jun 2015 21:08:03 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: using tcp_notsent_lowat in various apps? From: Jonathan Morton In-Reply-To: <87y4jgbejc.wl-jch@pps.univ-paris-diderot.fr> Date: Fri, 19 Jun 2015 07:07:56 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <6644BD81-1FFC-450C-89FD-91E138B7824A@gmail.com> References: <87y4jgbejc.wl-jch@pps.univ-paris-diderot.fr> To: Juliusz Chroboczek X-Mailer: Apple Mail (2.2098) Cc: bloat-devel , bloat X-BeenThere: bloat-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Developers working on AQM, device drivers, and networking stacks" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2015 04:08:35 -0000 > On 19 Jun, 2015, at 05:47, Juliusz Chroboczek = wrote: >=20 >> I am curious if anyone has tried this new socket option in = appropriate apps, >=20 > I'm probably confused, but I don't see how this is different from = setting SO_SNDBUF. I realise that's lower in the stack, but it should = have a similar effect, shouldn't it? What I understand of it is: Reducing SO_SNDBUF causes send() to block until all of the data can be = accommodated in the smaller buffer. But select() will return the socket = as soon as there is *any* space in that buffer to stuff data into. TCP_NOTSENT_LOWAT causes select() to not return the socket until the = data in the buffer falls below the mark, which may (and should) be a = mere fraction of the total buffer size. It=E2=80=99s a subtle difference, but worth noting. The two options = effectively apply to completely different system calls. You could use both in the same program, but generally SO_SNDBUF would be = set to a higher value than the low water mark. This allows a complete = chunk of data to be stuffed into the buffer, and the application can = then spend more time waiting in select() - where it is in a better = position to make control decisions which are likely to be latency = sensitive, and it can service other sockets which might be draining or = filling at a different rate. - Jonathan Morton