From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Jason@zx2c4.com Received: from krantz.zx2c4.com (localhost [127.0.0.1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 5c3a5137 for ; Wed, 21 Jun 2017 13:38:40 +0000 (UTC) Received: from frisell.zx2c4.com (frisell.zx2c4.com [192.95.5.64]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 68faeae7 for ; Wed, 21 Jun 2017 13:38:40 +0000 (UTC) Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 88a37118 for ; Wed, 21 Jun 2017 13:52:13 +0000 (UTC) Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id f806622e (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for ; Wed, 21 Jun 2017 13:52:13 +0000 (UTC) Received: by mail-ot0-f173.google.com with SMTP id s7so112508760otb.3 for ; Wed, 21 Jun 2017 06:54:25 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: "Jason A. Donenfeld" Date: Wed, 21 Jun 2017 15:54:22 +0200 Message-ID: Subject: Re: multiple wireguard interface and kworker ressources To: nicolas prochazka Content-Type: text/plain; charset="UTF-8" Cc: WireGuard mailing list List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Nicolas, 1000 interfaces with 500 peers each. That's a very impressive quantity of 500001 wireguard deployments! Please do let me know how that goes. I'd be interested to learn what the name of this project/company is. With regards to your problem, I've fixed it by completely rewriting ratelimiter.c to not use xt_hashtable, a piece of decaying Linux code from the 1990s, and instead using my own token bucket implementation. The result performs much better, is easier on RAM usage, and requires far fewer lines of code. Most importantly for you, all interfaces will now be able to share the same netns-keyed hashtable, so that the cleanup routines are always fast, no matter how many interfaces you have. I'll likely sit on it for a bit longer while I verify it and make sure it works, but if you'd like to try it now, it's sitting in the git master. Please let me know how it goes. Regards, Jason