frank blye sym transparent.png

Records of my

hobbies and interest

Removing download smart queue on unifi UDM Pro

Removing download smart queue on unifi UDM Pro

OK, let me preface here, I am not a programmer.

I have learned how to do basic programing here and there, but never do it enough to be proficient at it, so there may be some problems with the copy, paste, and modified codes. However, this is how it worked for me and hopefully this helps some people.

This may not be an issues for most, but an issue for some. The best internet service I can get is asymmetrical, 1 gigabit download, but only 40 megabit upload.

This provides a unique set of challenge.

If this is 1 gigabit symmetrical service, then most likely I won’t ever have to turn on smart queue in Unifi Controller. However, due to the limited upload, it’s best to enable Smart Queue to make sure my gaming and streaming activity is not affected by other devices.

How ever, Unifi does not allow us to just turn on smart queue on upload, or download, they have to be both activated at the same time, eve if you set download to 0 or 999999.

This is a problem. Smart Queue is very CPU intensive, and even UDM Pro only supports a max 600 megabit throughput when its’ turned on,. Effectively handicapped my download speed to 60% of its intended speed when it absolutely do not have to.

This is my finding after a day or research, posting here so I can refer back, and doesn’t forget how to reconfigure it later down the line. Feel free to use this to set up your controller, but please, proceed at your own risk as I can not provide additional support.

First thing, benchmark the upload speed at the busiest time of the day. (for a house, typically 4-7 when your neighbors just got home)

I use

http://www.dslreports.com/speedtest

https://www.speedtest.net/

and google speed test.

Run it a few times, choose the fastest server, but pick the slowest results.

then take the result times 0.9.

This is my reference upload speed.

Then go into your unifi controller, turn on Smart Queue, also make sure SSH is on and set to a password while you are at it.

01.JPG

Save, and apply setting

Now Smart Queue should be on, you are free to run a few speed test to ensure the speed for an individual device is set to the capped speed.

How, we need to SSH into the UDMP Pro, I personally used putty.

after your are greeted with UDM controller type

ifconfig

This will list the number of connection being made on your UDM Pro.

Find ones that has your public IP listed., and note the eth port number. This will be used on the command below.

if you are like most people and used the RJ45 WAN in, then your eth port should be number 8

simply type in (or copy)

/usr/sbin/tc qdisc del dev eth8 ingress

2023 update: If you use UDMP Firmware 2.0 and up, the code is now

/sbin/tc qdisc del dev eth8 ingress

You are done.

Now go ahead and run some speed test, you will find out that the upload is still set to the capped speed, but download should recover from the maxed 500-600 mbps due to smart queue and runs at close to the the full speed of 1 gigabit.

This change will persist till the next system restart, update, or changes to firewall/internet setting

I have yet figuring out how to run this as an hourly job, how ever, you can add this as a persistent starter script.

I used the UDM utilities, on boot script. (thanks for making this btw)

https://github.com/boostchicken/udm-utilities/tree/master/on-boot-script

follow its instruction.

but basically type in.

unifi-os shell
curl -L https://udm-boot.boostchicken.dev -o udm-boot_1.0.5_all.deb
dpkg -i udm-boot_1.0.5_all.deb
exit

You need to move to the /mnt/data/on_boot.d folder, so

cd /mnt/data/on_boot.d

now we need to create the smart queue removal code as a script.

I tried to write on github, and use wget to download it… nope, didn’t work.

so let’s do the idiot method. make the script from scratch.

Screenshot (297).png

this will enter you into a VIM, code editor.

type in

#!/bin/sh

/usr/sbin/tc qdisc del dev eth8 ingress
(for firmware 2.0+ /sbin/tc qdisc del dev eth8 ingress)

Then press “esc” key

Type in

:wq

This will save and quit VIM editor.

annnnnnddddd you are done, this will make sure the script will be run on every reboot.

I have added another script.

https://github.com/renedis/ubnt-auto-fan-speed

to control fan speed of my UDM so it’s not automatically set to 50% just because a HDD is inserted into the drive.

FPS S02E12 - Pokemon, Pen Designs and Nib Smith

FPS S02E12 - Pokemon, Pen Designs and Nib Smith

FPS S02E11 - New Pens Discussion

FPS S02E11 - New Pens Discussion