Limit Bandwidth

I’m glad storj is doing well enough to need to send me 250+Mb/s but my family is not enjoying the slow Internet caused by the saturated connection.

Is there any way to tell the storagenodes to limit their bandwidth consumption? I have unlimited data, but I just need some bandwidth left for the personal use of my family.

If your router has QoS of some description you can try using that?
Otherwise you may try reducing

 storage2.max-concurrent-requests:

on your node’s config.yaml file to something lower than default. I don’t actually know what the default is, but maybe you could start with a value of 10 and tweak it up or down until you’ve got what you want.
Don’t forget to restart your node when you change that setting.

Enable queue management on your gateway. It goes by different names depending on vendor: SmartQueues, game mode, etc.

2 Likes

Same here. I set the storage node traffic to the lowest priority. Sometimes a netflix stream takes a second longer to start but than everything works just fine with no issues. I can recommend QoS or what ever your router has to offer.

2 Likes

I’ve enabled Smart Queues on my UDM Pro as suggested by @arrogantrabbit and I can confirm that latency is gone. It absolutely kills maximum download speeds, though, but I’m willing to put up with that.

1 Like

This might simply mean the CPU on your router is not fast enough to run whatever QoS algorithm your router supports. Seen this on several routers. But if you’re fine with that, no reason to change.

1 Like

Well, it’s running at about 60 to 70% utilisation of both CPU and RAM, so that doesn’t seem to be the bottleneck…
Supposedly it can do 800Mbps throughput with Smart Queues and I’m nowhere near that.

2 Likes

If it has multicore CPU, and especially some RISC design with lower clock speeds, it is quite possible only some of the cores are actually doing the work, but they are unable to keep up, while rest of them are doing practically nothing.
I’m dealing with something similar at a location where the overall CPU utilization is ~30%, but 3 out of 16 cores are running 100%, apparently handling interface interrupts, causing serious performance cap nowhere near the advertised capabilities of this platform.

2 Likes

That’s very interesting.
It is indeed based on a Arm Cortex A57 quad core.
No idea how to check what each individual core is doing, though…

EDIT: simply SSH into the router and run htop
Bingo, one of the cores is pegged on 100%, running a suricata process. Wonder if that might be causing some of the issues…

EDIT2: Bit scared of killing that process, I suspect it’ll crash the router. On the one hand I am now wondering whether to give a pfsense machine a try. On the other hand, there are reports of SNOs getting gigabit speeds wit consumer routers, and the UnifFi is better than a consumer router. Hmm, food for thought…

2 Likes

You can set the SQM limit higher than your ISP bandwidth. I.e. if your bandwidth is 400 you can set 800 in SmartQueues. It will still combat buffer bloat, and will get your max speed back too. It’s cheating but it works.

1 Like

Thank you for the tip, I’ll give that a try :slight_smile:

UI uses suricata for the Security → Internet Safety. You can ether turn this gimmick off completely or adjust detections list so it only checks for what matters, or exclude node traffic from checks.

1 Like

Yes, I tried that but even turning off IPS/IDS the process is still pegged at 100%…

If you turned that off then suricata shall not be running. Kill it then. maybe it got stuck exiting.

OK, I had to turn a few more things off. Process is gone now. Let’s see what happens :slight_smile:

I really appreciate your help. Must be a tad annoying help people do fairly basic stuff :flushed:

1 Like

I thought suricata is just for the security scanning? What other things have they used it for? I.e. what else did you have to turn off?

Not at all!! I always have an option to no reply it if was annoying in any way :smiley: – but it isn’t. Nobody can be an expert in everything, that’s why forums exist…

2 Likes

I was turning the wrong things off, I realised later.
I turned off Device Identification and Traffic Identification. That made no difference. Only after did I notice the option called “Internet safety → Suspicious Activity Detection”. Turning that off killed the suricata process.

Cursory testing is now showing no latency, maximum burst download speeds… but not much higher Storj throughput.

Thank you so much to you and @zip for helping me with this :hugs:

4 Likes

Doesn’t matter for you anymore but might still be relevant for others. I am running a pfsense router. The QoS wizard did something wrong and I still had problems. I don’t remember exactly what it was but if someone runs into the same problem we can compare settings. It was a small change that I had to apply manually on top of what the wizard was coming up with. And now it works just fine :slight_smile:

2 Likes

for ubuntu host you can try wondershaper

2 Likes

It’s not the same. This is would be a hard limit, not dynamic like with QoS or SQM.