From owner-freebsd-net@freebsd.org Mon Feb 27 01:36:58 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 11FCECEF137 for ; Mon, 27 Feb 2017 01:36:58 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id E40E4DB5 for ; Mon, 27 Feb 2017 01:36:57 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id E3793CEF136; Mon, 27 Feb 2017 01:36:57 +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 E32AECEF135 for ; Mon, 27 Feb 2017 01:36:57 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mail-ua0-x22a.google.com (mail-ua0-x22a.google.com [IPv6:2607:f8b0:400c:c08::22a]) (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 9DD59DB4 for ; Mon, 27 Feb 2017 01:36:57 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by mail-ua0-x22a.google.com with SMTP id e4so7548264uae.0 for ; Sun, 26 Feb 2017 17:36:57 -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=pt6TQfMvFzwHuNYX5gtEDGSZ8IgCtqHFqbquoR8FGGk=; b=hXXIM6k/4xq78Gv7Ex/LCcbbUDjbZCTzhTien1ZhBJlXpi2DPvgnOZ3lvuH3FGi2RF 9VwShJswSuw5l9LRTVe0wrBG6TzyizYpJa93jygTQ3TAWSWNlEuCsycxZ2944m1BZRyw XXWmA8FC+/u9Y11STyU9LDxU7DujbbEk9y7zDhgEo5HT5kXGNy2GtZzTzBXZQbS1hfMg eSTGAWmqIUkRTjHmLiAf3nDphkMZrX/P2q7nTfEGp3mDinpyoN8h8zu/4OfiVX1Q9bqB Lpzwco5N+tawC1wpaGwluTDiyOw42zr/NzAFXGQtA0/ZbngjTUoyCh72PifYDtCv7iw4 LFZQ== 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=pt6TQfMvFzwHuNYX5gtEDGSZ8IgCtqHFqbquoR8FGGk=; b=oZityHQKoFE975ZmNvtHawDPuun39S27W5UUXd6W2U8nh5bwYrM07/PSxYNbSJ/f3H 2PQI4lSu/qe/LhrP8YDb/IdwTPILrUKNMs+8nGnsiqXMxYVhltNd0I4qpIF+5bf/Tg9u kHwA3AjWGf5Jc+ECS342x/ZY/hHhTYmpAd63nDiBCdN2Tb1w3wiNRlycSyKK2XqrJG8g AwrPP4nwtQAtpdE2TwUK6rgBHcRqrwX4u+4GQIljmn4y/9Z/rdyrFceJuRkxmeUa+zq+ r3t/CLZdPFBnvHMskjxRE5KVudVZJoTAmbAmI3Ksz9f9dv8HEAnugZnzlLnsDxFkYfLx oTdg== X-Gm-Message-State: AMke39nsLvMF/WXnBeJZQS6nv+DLdiYKs4bOeS2UAYoL7sgNF0zExupPJnJXELh99w8pnrbO8A+8Hdyq5iJCHA== X-Received: by 10.31.155.75 with SMTP id d72mr5808623vke.55.1488159416701; Sun, 26 Feb 2017 17:36:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.66.193 with HTTP; Sun, 26 Feb 2017 17:36:56 -0800 (PST) In-Reply-To: <20170225155628.GB6035@zxy.spb.ru> 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:36:56 +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:36:58 -0000 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. 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