# UDP QUIC configuration guide for linux / docker

**URL:** <https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580>\
**Category:** FAQ\
**Tags:** docker, storagenode, linux\
**Created:** [May 2, 2021, 1:13pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580 "2021-05-02T13:13:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SGC](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/sgc/32/1132_2.png) [@SGC](https://forum.storj.io/u/SGC)\
**Post date:** [May 2, 2021, 1:13pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/1 "2021-05-02T13:13:45Z")

</div>

How to test if your Quic UDP network configuration is correctly.  
[http://storjnet.info/ping\_my\_node](http://storjnet.info/ping_my_node)

Run the following command on the host to change network protocol settings.  
makes it persistent across reboots

```
echo "net.core.rmem_max=2500000" >> /etc/sysctl.conf

sysctl -w net.core.rmem_max=2500000

```

changes the udp buffer size without reboot  
and can be used together  
You will also need to forward ports in your router, but i will not touch on that since that part will be unique to most users.

finally you will need to change your docker run command.

> [@Experimenting with UDP based protocols](https://forum.storj.io/t/experimenting-with-udp-based-protocols/11545/1):
>
> If you are running your node using Docker, please make sure to also change  
> from  
> `-p <host-port>:<container-port>`  
> to  
> `-p <host-port>:<container-port>/tcp -p <host-port>:<container-port>/udp` .

not sure if i’m leaving anything out, but i don’t think so…  
wanted to put all the pieces in one place, and in what i consider the simplest and easy to understand way.

---

<div class="post-metadata">

**Author:** ![Krawi](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/krawi/32/66_2.png) [@Krawi](https://forum.storj.io/u/Krawi)\
**Post date:** [May 2, 2021, 2:11pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/2 "2021-05-02T14:11:11Z")

</div>

Have done this yet today, so here are some tips.

I wasn’t sure the `sysctl -w` will survive the next boot, so searched for a permanent change and found this  
[https://www.tecchannel.de/a/tcp-ip-tuning-fuer-linux,429773,6](https://www.tecchannel.de/a/tcp-ip-tuning-fuer-linux,429773,6).

_It’s a german site, so in short:_

Edit `/etc/sysctl.conf` and add these lines:

```
# increase Linux TCP buffer limits
net.core.rmem_max = 2097152
net.core.wmem_max = 2097152

# increase Linux autotuning TCP buffer limits
# min, default, and max number of bytes to use
net.ipv4.tcp_rmem = 4096 87380 2097152
net.ipv4.tcp_wmem = 4096 65536 2097152

```

_I changed the 2097152 (2MB) to 2500000, the other 3 parameters seems to be relating, so i added them too._

For immediately taking effect without reboot, use  
`sysctl -p`

Another site about performance tuning of the network i discovered, but not yet tried:  
[https://www.ibm.com/docs/it/smpi/10.2?topic=mpi-tuning-your-linux-system](https://www.ibm.com/docs/it/smpi/10.2?topic=mpi-tuning-your-linux-system)

---

<div class="post-metadata">

**Author:** ![peem](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/peem/32/6323_2.png) [@peem](https://forum.storj.io/u/peem)\
**Post date:** [May 2, 2021, 3:25pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/3 "2021-05-02T15:25:05Z")

</div>

> [@SGC](#):
>
> Run the following command on the host to change network protocol settings.  
> -w makes it persistent across reboots
> 
> `sysctl -w net.core.rmem_max=2500000`

Have you checked? Is it permanent?  
Do you think so? (as usual you are used to)

```auto
sysctl --help

```

---

<div class="post-metadata">

**Author:** ![SGC](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/sgc/32/1132_2.png) [@SGC](https://forum.storj.io/u/SGC)\
**Post date:** [May 2, 2021, 3:45pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/4 "2021-05-02T15:45:06Z")

</div>

IBM documentation usually has some excellent tips and tricks, and very well documented about how and why.

i already optimized my network setting a long time ago, but generally what i learned from that rabbit hole was that there are way to many bad suggestions about changing network setting for optimizing…

so my recommendation would be try to stick close to the defaults, if you like 10x or 100x a buffer sizes you might end up having problems emptying the buffer and stuff might sit for a long time, which can lead to all sorts of issues.

so do take all the optimizing suggestions online with a grain of salt, unless if you are learning about networking and want to learn the hard way…  
the default are adopted because they work fine for most general purpose use cases.  
and tho you might think you see an improvement short term from optimizing, its almost always at the cost of something else.

i’m sure what you used here is fine…

> [@peem](#):
>
> Have you checked? Is it permanent?  
> Do you think so? (as usual you are used to)
> 
> ```auto
> sysctl --help
> 
> ```

i saw somebody else said -w on sysctl would make it persistent, but i’m really unsure i did check  
`sysctl --help`  
which also seemed to indicate that to be the case… on top of that it’s a non critical thing, so even if it fails it doesn’t hurt anything really… so meh…

anyways since you doubted it i went and dug into the linux manual as suggest by the  
sysctl --help  
but as usual it’s futile because it has it’s own language… i mean how does this tell me if it is persistent or not…

> -w, --write  
> Use this option when all arguments prescribe a key to be set.

if you do decided to test it out do let us know, if its persistent or not…  
don’t really find the manual or --help very illuminating even if they sort of do indicate it without making it perfectly clear imo.

---

<div class="post-metadata">

**Author:** ![peem](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/peem/32/6323_2.png) [@peem](https://forum.storj.io/u/peem)\
**Post date:** [May 2, 2021, 3:50pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/5 "2021-05-02T15:50:20Z")

</div>

> [@SGC](#):
>
> if you do decided to test it out do let us know, if its persistent or not…

It is not persistent, it only lasts until shutdown.

It is just as @Krawi wrote:

> [@Krawi](#):
>
> Edit `/etc/sysctl.conf` and add these lines

---

<div class="post-metadata">

**Author:** ![peem](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/peem/32/6323_2.png) [@peem](https://forum.storj.io/u/peem)\
**Post date:** [May 2, 2021, 3:52pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/6 "2021-05-02T15:52:03Z")

</div>

> [@SGC](#):
>
> -w, --write

enabling writing of a value to a variable

---

<div class="post-metadata">

**Author:** ![SGC](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/sgc/32/1132_2.png) [@SGC](https://forum.storj.io/u/SGC)\
**Post date:** [May 2, 2021, 4:07pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/7 "2021-05-02T16:07:45Z")

</div>

which seems again doesn’t tell you if that is persistent or temporary…  
ofc since we can change variables without using -w then one can deduce that it most likely means that it’s persistent…

i just don’t think it’s written in a way that cannot be misunderstood or requires prior knowledge…  
like say if i didn’t know that i could have variables without using -w…  
then how would i know…  
but just me mincing words lol

because i hate the linux manual, i so rarely feel helped by it.

---

<div class="post-metadata">

**Author:** ![peem](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/peem/32/6323_2.png) [@peem](https://forum.storj.io/u/peem)\
**Post date:** [May 2, 2021, 4:08pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/8 "2021-05-02T16:08:55Z")

</div>

Didn’t you feel like rebooting the system to check?

---

<div class="post-metadata">

**Author:** ![SGC](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/sgc/32/1132_2.png) [@SGC](https://forum.storj.io/u/SGC)\
**Post date:** [May 2, 2021, 4:10pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/9 "2021-05-02T16:10:01Z")

</div>

hell no, its a soft failure even if it doesn’t work…  
barely changes anything…everything will work…

the storagenode at worst gets slightly more latency.  
so i can deal with that if it turns out to be a problem

… rebooting my server is a bother…

---

<div class="post-metadata">

**Author:** ![Krawi](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/krawi/32/66_2.png) [@Krawi](https://forum.storj.io/u/Krawi)\
**Post date:** [May 2, 2021, 4:12pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/10 "2021-05-02T16:12:14Z")

</div>

`man sysctl` info about the `-w`:

```
       -w, --write
          Use this option when all arguments prescribe a key to be set.

```

Nothing about the destination for this action, is it memory, a file, a piece of rock, wood, steel or the surface of the next SpaceX rocket?

---

<div class="post-metadata">

**Author:** ![peem](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/peem/32/6323_2.png) [@peem](https://forum.storj.io/u/peem)\
**Post date:** [May 2, 2021, 4:12pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/11 "2021-05-02T16:12:48Z")

</div>

But you’re writing the manual: " [UDP QUIC configuration guide for linux / docker]"

and you mislead others …

---

<div class="post-metadata">

**Author:** ![SGC](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/sgc/32/1132_2.png) [@SGC](https://forum.storj.io/u/SGC)\
**Post date:** [May 2, 2021, 4:15pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/12 "2021-05-02T16:15:59Z")

</div>

it will work… else i can correct it  
i did consider doing an echo whatever into whatever sysctl or a sysctludp.conf  
or something… but just made everything so much more difficult, this was simple and i’m sure somebody will complain if it doesn’t work.

and the --help sort of says it works, other people said it would make it persistent.  
and its a soft failure… can’t really go wrong

> [@peem](#):
>
> and you mislead others …

i’m not trying to mislead anyone, now since you are aware of it and ain’t testing it, that just makes you just as bad as i am… 😃

i believe it will work with a high degree of certainty else i wouldn’t have used it.  
and it’s not like it’s on print if it was wrong.

---

<div class="post-metadata">

**Author:** ![fmoledina](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/fmoledina/32/6739_2.png) [@fmoledina](https://forum.storj.io/u/fmoledina)\
**Post date:** [May 2, 2021, 4:20pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/13 "2021-05-02T16:20:24Z")

</div>

@SGC, we’ve established that `sysctl -w` does not persist across reboots, regardless of how you deduced that it should. Please update the top post to include an entry in `/etc/sysctl.conf` or `/etc/sysctl.d` to prevent confusion.

---

<div class="post-metadata">

**Author:** ![peem](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/peem/32/6323_2.png) [@peem](https://forum.storj.io/u/peem)\
**Post date:** [May 2, 2021, 4:22pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/14 "2021-05-02T16:22:29Z")

</div>

> [@SGC](#):
>
> wierzę, że zadziała z dużą dozą pewności,

Or change the title to “I believe this will work UDP QUIC configuration for linux / docker”

---

<div class="post-metadata">

**Author:** ![SGC](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/sgc/32/1132_2.png) [@SGC](https://forum.storj.io/u/SGC)\
**Post date:** [May 2, 2021, 5:07pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/15 "2021-05-02T17:07:16Z")

</div>

> [@fmoledina](#):
>
> we’ve established that `sysctl -w` does not persist across reboots, regardless of how you deduced that it should. Please update the top post to include an entry in `/etc/sysctl.conf` or `/etc/sysctl.d` to prevent confusion.

thanks for clearing that up. fixed it, kept the sysctl -w net.core.rmem\_max=2500000  
as it fixed the buffer issue for my system without a reboot…

you got any idea what the -w actually does then?  
i mean i guess it could be why i didn’t need to do the sysctl -p or reboot after changing the /etc/sysctl.conf, sometimes i just wish that linux was so much better documented.

> [@peem](#):
>
> Or change the title to “I believe this will work UDP QUIC configuration for linux / docker”

thanks for being a troll, having no knowledge to contribute and no intention of helping at all.  
keep up the good work… lol

---

<div class="post-metadata">

**Author:** ![peem](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/peem/32/6323_2.png) [@peem](https://forum.storj.io/u/peem)\
**Post date:** [May 2, 2021, 5:13pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/16 "2021-05-02T17:13:33Z")

</div>

> [@SGC](#):
>
> thanks for being a troll, having no knowledge to contribute and no intention of helping at all.  
> keep up the good work… lol

This is guaranteed for you 🙂  
Call it what you want - I achieved the goal - you corrected the nonsense you wrote in the first version.

---

<div class="post-metadata">

**Author:** ![remo](https://storj.bcdn.literatehosting.com/letter_avatar/remo/32/5_5575768a8748004e209b776fc1b2916d.png) [@remo](https://forum.storj.io/u/remo)\
**Post date:** [May 2, 2021, 6:17pm UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/17 "2021-05-02T18:17:49Z")

</div>

Look what I found somwhere on internet:

### Modify Kernel parameter in /etc/sysctl.conf for permanent change

After modifying the kernel parameter in the /etc/sysctl.conf, execute sysctl –p to commit the changes. The changes will still be there after the reboot.

# vi /etc/sysctl.conf # sysctl –p

### Modify kernel parameter temporarily

To temporarily modify a kernel parameter, execute the following command. Please note that after reboot these changes will be lost.

# sysctl –w {variable-name=value}

So the -w parameter just executes it immediately, but temporarily  
You did a good job making this post 👍  
At least someone inform the masses about it

---

<div class="post-metadata">

**Author:** ![will.topping](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/will.topping/32/6387_2.png) [@will.topping](https://forum.storj.io/u/will.topping)\
**Post date:** [May 4, 2021, 1:47am UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/18 "2021-05-04T01:47:15Z")

</div>

So, should we all be making this change now?

I mean, last I heard about QUIC was that it was still being tested and we shouldn’t do anything yet?

---

<div class="post-metadata">

**Author:** ![Pac](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/pac/32/6053_2.png) [@Pac](https://forum.storj.io/u/Pac)\
**Post date:** [May 4, 2021, 6:57am UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/19 "2021-05-04T06:57:21Z")

</div>

> [@will.topping](#):
>
> we shouldn’t do anything yet

Ah? Never read that, must have missed it ^^’  
I did reconfigure my nodes and all seems fine for now.  
My take is that it doesn’t hurt to make the switch: you’ll be future ready for when it starts being massively used by satellites 🙂

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [May 4, 2021, 7:12am UTC](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580/20 "2021-05-04T07:12:07Z")

</div>

That was said in a previous changelog indeed. But there has been more recent communication saying we should probably start thinking about enabling it. It’s definitely not essential yet, but best be prepared I guess.

To be honest, I don’t think you have to bother with increasing the UDP buffer. But it can’t hurt either.

[Next page](https://forum.storj.io/t/udp-quic-configuration-guide-for-linux-docker/13580.md?page=2)
