From owner-freebsd-net@freebsd.org Mon Feb 27 01:37:34 2017 Return-Path: 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 BA4D1CEF1EB for ; Mon, 27 Feb 2017 01:37:34 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 94421E6D for ; Mon, 27 Feb 2017 01:37:34 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 93A2BCEF1EA; Mon, 27 Feb 2017 01:37:34 +0000 (UTC) Delivered-To: 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 934DFCEF1E9 for ; Mon, 27 Feb 2017 01:37:34 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mail-ua0-x22b.google.com (mail-ua0-x22b.google.com [IPv6:2607:f8b0:400c:c08::22b]) (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 4B309E6C for ; Mon, 27 Feb 2017 01:37:34 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by mail-ua0-x22b.google.com with SMTP id 40so41708899uau.2 for ; Sun, 26 Feb 2017 17:37:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Bmy21G6UtvUq3IW6MwIiJUO0WHgZlX/A7CqEPApj8Oo=; b=dWw2EL8BEo4mr6FYwKd4cVFaDaV3P31pLVof14HessfxRN5g6s+CUZiPxpO7iLtVb9 9fuB+uPcwMhXEng0b56v9OBPq5OqjUxDvQ2N7kyxCy7aP1VJ5Xl0PTUVv174jVmVmhwA 5CS3bo2LA6KC+LGJ25PFr+rfFJP9VCRg+e0wQTxemIWa0wvmi3MpHIiHLxudkK1igy7G EJIO2cFoN22NPHful4uG1mcYAVa8koGhnKg4InAOBcOlrTviJYJRfi0jBmr/M9LeOKYY E53yh4aLoiKyPNuNMAp0XNcH4Ja2OpAIGcllhR5JkJBpdz/FJyW4Gol9PFR+kpPpv8KF qJWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Bmy21G6UtvUq3IW6MwIiJUO0WHgZlX/A7CqEPApj8Oo=; b=Krg7bmPSs/aGpGrPYhDQM+l1QbVNrFpQJpRVw1k1FgCnimFNvALjRXx1N4KGv9wriG GrBVVPnsAr6qajRctcbuSs+CqjPv4yuj1KK6lSEtFjlJocmfIjvN5gesaH1NnZo7muTy If+TNz42J6bA+/q8RBPjMYrG0MN9F4LkLgJ7U7YODJGl10+fB3R3WKgpiykwkxtv4jEK fVRqShm0kfDx4g0BjvsKB2NPY+vWADncOCLWE2SNnF2M5iYUB+2h3plNNsCpwD6VCw/q /2P+IQ183PKt7f4pf4FWiFobvwT54HWY6SN3LQF3+8pCITgVQvHEvcp+wEQlXCOmnOFM xcWg== X-Gm-Message-State: AMke39kS7jMFkZCLguftI8DRQ7hIqi/48RwFXZxYp8ZkyQO8oZBcjC0BJbC0dNgkmlgM3tnH24RmiFyKNa2DTw== X-Received: by 10.176.90.139 with SMTP id w11mr6718074uae.106.1488159453479; Sun, 26 Feb 2017 17:37:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.66.193 with HTTP; Sun, 26 Feb 2017 17:37:32 -0800 (PST) In-Reply-To: References: <20170127005251.GM2611@FreeBSD.org> <20170210063024.GE1973@FreeBSD.org> <20170216184903.GF58829@FreeBSD.org> <0858647a-ec3c-1a78-053f-d04397a82d8a@freebsd.org> <20170222232704.GJ8899@FreeBSD.org> <20170223153636.GI15630@zxy.spb.ru> <20170224131349.GJ15630@zxy.spb.ru> <20170225155628.GB6035@zxy.spb.ru> From: Sepherosa Ziehau Date: Mon, 27 Feb 2017 09:37:32 +0800 Message-ID: Subject: Re: listening sockets as non sockets To: Slawa Olhovchenkov Cc: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Feb 2017 01:37:34 -0000 On Mon, Feb 27, 2017 at 9:36 AM, Sepherosa Ziehau wrote: > On Sat, Feb 25, 2017 at 11:56 PM, Slawa Olhovchenkov wrote: >> On Sat, Feb 25, 2017 at 11:09:29PM +0800, Sepherosa Ziehau wrote: >> >>> > Can I use per-connection Lua script (for delays and url generation)? >>> > Not per-thread. I am need to emulate many client connections (about >>> > 10K-40K). >>> > Currently I am have some trouble w/ >20K connections. >>> >>> I didn't try the Lua script. Make sure to low the MSL on the box >>> running wrk, e.g. 10ms. Well, I'd recommend you to run 15K concurrent >>> connections on one testing box. >> >> Thanks! >> Can you explain some more this recomendations? > > If you don't lower MSL, too many sockets will sit in TIMED_WAIT state > on the testing client, which consumes local port space. Local port > space depletion == wrk can do more requests. Hmm, I meant 'wrk cannot do more requests' :) > > 15K concurrent connection on each client box is a heuristic to make > sure local ports can be recycled timely. You need to figure out your > value on the testing box. But, normally, 15K ~ 10K is doable on each > client machine for a given server. > >> >> PS: I am run wrk w/ '--connreqs 600' > > Well, nginx's default setting is 100 requests/connection :). I use > --connreqs 1 to generate "short-lived" connection bomb. > > Thanks, > sephe > > -- > Tomorrow Will Never Die -- Tomorrow Will Never Die