WireGuard Archive on lore.kernel.org
 help / color / Atom feed
From: Matthias Urlichs <matthias@urlichs.de>
To: wireguard@lists.zx2c4.com
Subject: Re: Speed on Raspberry Pi 4
Date: Thu, 18 Jul 2019 10:15:22 +0200
Message-ID: <e974e0bd-9a84-f725-d5e9-36f56c25707b@urlichs.de> (raw)
In-Reply-To: <CAA6-MF_yzAj5-+D6K_H9GaQRaZLLW0D2a88FQnMmwO66+=O67g@mail.gmail.com>

[-- Attachment #1.1: Type: text/plain, Size: 728 bytes --]

Hi,
>
>     As the above shows, WG threads are already bound to a particular
>     CPU and this
>     can't be changed.
>
>
> Right, my bad. 

OK. So we have N kernel threads (one per CPU) and one CPU that really
shouldn't do anything but interrupt processing.

That looks like we need an option to limit wireguard to a specific set
of CPUs. That'd be a good option to have in any case, because we don't
want the poor Raspberry Pi (or any other semi-underpowered machine) to
starve everything else when it gets flooded with more wireguard work
than it can handle.

We could then set the network interface's IRQ affinity to one of the
"free" CPUs, and we'd be all set.

-- 
-- mit freundlichen Grüßen
-- 
-- Matthias Urlichs


[-- Attachment #1.2: Type: text/html, Size: 1378 bytes --]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi,<br>
    </div>
    <blockquote type="cite"
cite="mid:CAA6-MF_yzAj5-+D6K_H9GaQRaZLLW0D2a88FQnMmwO66+=O67g@mail.gmail.com">
      <blockquote class="gmail_quote" style="margin:0px 0px 0px
        0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
        As the above shows, WG threads are already bound to a particular
        CPU and this<br>
        can't be changed.<br>
      </blockquote>
      <div><br>
      </div>
      <div>Right, my bad. </div>
    </blockquote>
    <p>OK. So we have N kernel threads (one per CPU) and one CPU that
      really shouldn't do anything but interrupt processing.</p>
    <p>That looks like we need an option to limit wireguard to a
      specific set of CPUs. That'd be a good option to have in any case,
      because we don't want the poor Raspberry Pi (or any other
      semi-underpowered machine) to starve everything else when it gets
      flooded with more wireguard work than it can handle.</p>
    <p>We could then set the network interface's IRQ affinity to one of
      the "free" CPUs, and we'd be all set.</p>
    <pre class="moz-signature" cols="72">-- 
-- mit freundlichen Grüßen
-- 
-- Matthias Urlichs</pre>
  </body>
</html>

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

      reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-29 10:38 Christopher Bachner
2019-07-17 20:50 ` Roman Mamedov
2019-07-18  6:38   ` Janne Johansson
2019-07-18  6:56     ` Roman Mamedov
2019-07-18  8:01       ` Janne Johansson
2019-07-18  8:15         ` Matthias Urlichs [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e974e0bd-9a84-f725-d5e9-36f56c25707b@urlichs.de \
    --to=matthias@urlichs.de \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com zx2c4-wireguard@archiver.kernel.org
	public-inbox-index wireguard


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/ public-inbox