From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001:c05::230]) (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 9605C21F18F for ; Fri, 24 Apr 2015 06:50:44 -0700 (PDT) Received: by igblo3 with SMTP id lo3so14971798igb.1 for ; Fri, 24 Apr 2015 06:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; bh=Erylo9H24BWoMND5sC1LyIAcE+ZagXSNvywmU1V6YVA=; b=YAXWN6BjCHjY+SPF6dj3009L20EXT11KQH66qerWefjOBGWd5xwgpfV4tCozVHag0w H+p7zUpiakWJ299eR+IdnQyGpZImeMbR74hk0ec30EciVXPySVEtMKm1lMUDFLgjl3u8 Qqc0rNKW2brrVkgtC8BqnZqbmeZMrrVdygarB9UbBPxx+7XRV/Re27QCpgiksYiNji4h F9V4eMG6e07cB1q+UZ4PGadQPqHQyXkbn6jA4bkg6/B6QDNg0Gt4gUchEfm86cMqqoaC f823Zq0kQVaNTZ5m7aiSkxFh1FtCrQKfmD2UiAP1VHrhA1cugFPq3rUTSS7Vb86fP87v OV+Q== X-Received: by 10.50.78.170 with SMTP id c10mr2681700igx.0.1429883443607; Fri, 24 Apr 2015 06:50:43 -0700 (PDT) Received: from [172.26.55.207] ([172.26.55.207]) by mx.google.com with ESMTPSA id x9sm1543492igl.2.2015.04.24.06.50.42 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 24 Apr 2015 06:50:42 -0700 (PDT) Message-ID: <1429883441.22254.126.camel@edumazet-glaptop2.roam.corp.google.com> From: Eric Dumazet To: Dave Taht Date: Fri, 24 Apr 2015 06:50:41 -0700 In-Reply-To: References: <20150422191056.9C7AC406057@ip-64-139-1-69.sjc.megapath.net> <1429736552.18561.144.camel@edumazet-glaptop2.roam.corp.google.com> <55380D28.5080100@hp.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: Hal Murray , bloat Subject: Re: [Bloat] SO_SNDBUF and SO_RCVBUF X-BeenThere: bloat@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: General list for discussing Bufferbloat List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 13:51:14 -0000 On Thu, 2015-04-23 at 21:40 -0700, Dave Taht wrote: > and of course, after writing the previous email, I go reading the > original commit for this option. Yea, that is a huge increase in > context switches... > > https://lwn.net/Articles/560082/ > > ... but totally worth it for many apps that can do something else > while their connection congests, and totally awesome for tcp vpns, > x11, screen sharers, etc.... It all depends on how many bytes are pushed by the application per sendmsg() To keep the amount of unsent bytes low, the application should not issue a large write, but it still can if it needs to for whatever reason. netperf -t TCP_STREAM" uses a default size of 16384 bytes per sendmsg. So obviously, if a wakeup is needed per sendmsg(), number of context switches is exactly bandwidth_in_bytes_per_second / 16384 Normally, without this TCP_NOTSENT_LOWAT option, number of wakeups is more like bandwidth_in_bytes_per_second / SO_SNDBUF, because kernel wakes up the blocked task when output buffers size occupancy reached 50%