From owner-freebsd-net@freebsd.org Thu Apr 9 09:44:00 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6DE82B4F5C; Thu, 9 Apr 2020 09:44:00 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-vs1-f67.google.com (mail-vs1-f67.google.com [209.85.217.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ybnW5Vhhz4P08; Thu, 9 Apr 2020 09:43:59 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: by mail-vs1-f67.google.com with SMTP id u11so4423888vsu.10; Thu, 09 Apr 2020 02:43:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=FHvxlFpLbd8BKskT+sasAAw6iO0ZGNWtHlC+vKInvWc=; b=D5IBnk2UZ08QqPk93+jVRPOfyy/nwHrEt83KCHPlZnWJ/AYwROEIjEbJ73arX74I57 Miq1Ynw8acKP1zLncprqzZ9pBiOykDrRYEsoepDCc36FTS9lf73h+zYE8sosfWW8q1Ff NjpfHPvRGsf5G1TbkFs+HZBWAgfrc3UzHqornZNov45VRdBBH3PBLo4Bw1rPTqCyDSJl Y7ttYjrll4ZWBPWgqtukRA1u5vrDyquyeZPmSPP2NLX9IlLZo5dXZzB5jl4VFBMyZt4S DoHpjjOJYLfKssiYyiutgfve2xwmYfTKrGOotqY0kBZrv4iD/qanDLD2fB294fPmRgcO zdyA== X-Gm-Message-State: AGi0Puan8h/XXURflOoewLu+nmFSQEsRH49yAFEZY5Az+TR5iTwZnJ1H 2OxMF0zT/I1upRmAxwJ5oUJPKTCd7ZMwfWU1kRA= X-Google-Smtp-Source: APiQypK1U5PJoAFO2uZBqN212h2ebOqfKteej8/etxmH0z45fihjtk9zxVAeaFKD6eqXTBZcQ6McgYlYWWDnLUxRkLQ= X-Received: by 2002:a67:e308:: with SMTP id j8mr3978629vsf.74.1586425438195; Thu, 09 Apr 2020 02:43:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luigi Rizzo Date: Thu, 9 Apr 2020 02:43:47 -0700 Message-ID: Subject: Re: dummynet performance To: =?UTF-8?B?w5Z6a2FuIEtJUklL?= Cc: "freebsd-net@freebsd.org" , freebsd-ipfw , "Andrey V. Elsukov" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48ybnW5Vhhz4P08 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rizzounipi@gmail.com designates 209.85.217.67 as permitted sender) smtp.mailfrom=rizzounipi@gmail.com X-Spamd-Result: default: False [-0.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; FORGED_SENDER(0.30)[rizzo@iet.unipi.it,rizzounipi@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_NEQ_ENVFROM(0.00)[rizzo@iet.unipi.it,rizzounipi@gmail.com]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.84)[-0.844,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-0.99)[-0.986,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[unipi.it]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[67.217.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.17)[ip: (0.02), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; RWL_MAILSPIKE_POSSIBLE(0.00)[67.217.85.209.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2020 09:44:00 -0000 On Thu, Apr 9, 2020 at 2:18 AM =C3=96zkan KIRIK wro= te: > > Hello, > > I wonder if it is possible to update dummynet code multi-threading capabl= e > practically? > My idea is below: > - A new sysctl tunable will be defined as > "net.inet.ip.dummynet.thread_count" (default 1) > - To distribute tasks along threads, each sched instance can be assigned = to > different thread. > ... What are you trying to achieve ? In general, the scheduler needs to know the state of all flows to perform correct scheduling of traffic. You could in principle split the load on multiple threads under specific, very restrictive conditions (each thread runs a different scheduler, they cannot share the excess bandwidth, and the total bw does not exceed the link's capacity, each scheduler has a different queue on the NIC). cheers luigi