# Smart Queue Management

**URL:** <https://forum.openwrt.org/t/smart-queue-management/58802>\
**Category:** Installing and Using OpenWrt\
**Created:** [March 29, 2020, 3:36am UTC](https://forum.openwrt.org/t/smart-queue-management/58802 "2020-03-29T03:36:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![trueeasy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trueeasy/32/19184_2.png) [@trueeasy](https://forum.openwrt.org/u/trueeasy)\
**Post date:** [March 29, 2020, 3:36am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/1 "2020-03-29T03:36:10Z")

</div>

Hey Guys,

I recently moved from PFsense to OpenWrt. I own [apu1d4](https://www.pcengines.ch/apu1d4.htm) that is running OpenWrt from a USB ( I was not able to flash the OpenWrt onto the onboard SSD).

 ![image](https://forum.openwrt.org/uploads/default/original/3X/c/a/caf48398c1b415695d828cc80c3c449d51a81852.png)

The main reason I moved was to use the **SQM QoS.**  
Before installing any package I ran a speed test

[[Album] Imgur ![](https://i.imgur.com/Uropuy5.jpg?fb "Imgur") ](https://imgur.com/a/9ifyuNk)

After Applying SQM my speed test is

[[Album] Imgur ![](https://i.imgur.com/DkHrIQH.jpg?fb "Imgur") ](https://imgur.com/a/nC2XGon)

I would like to know are these Speed Values normal considering the SQM function.  
Below are the setting for SQM

[[Album] Imgur ![](https://i.imgur.com/XpgLTOX.jpg?fb "Imgur") ](https://imgur.com/a/v66IrRF)

---

<div class="post-metadata">

**Author:** ![ergamus](https://forum.openwrt.org/letter_avatar/ergamus/32/5_5575768a8748004e209b776fc1b2916d.png) [@ergamus](https://forum.openwrt.org/u/ergamus)\
**Post date:** [March 29, 2020, 10:59am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/2 "2020-03-29T10:59:28Z")

</div>

CAKE is known to be a bit CPU heavy, especially on a fast line like yours. Try using fq-codel and see if the performance drop is as severe. It might also be good to compare the 1m load average before and after the speed test.

I see your running SQM on your IPv6 WAN connection, you might also need to setup a seperate SQM instance for your IPv4 WAN connection if applicable.

Since IPv6 is designed to not require NAT, I'm not sure if the ingress/egress options actually do anything. Unless you're doing something like NPTv6. I'd wait to hear from someone with more experience with SQM regarding that.

Can you also show the settings on the last tab (Link Layer Adaptation)? To get the most out of SQM, you'll need to set a proper overhead value.

---

<div class="post-metadata">

**Author:** ![trueeasy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trueeasy/32/19184_2.png) [@trueeasy](https://forum.openwrt.org/u/trueeasy)\
**Post date:** [March 30, 2020, 11:08am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/3 "2020-03-30T11:08:31Z")

</div>

Last setting screen  
[![](https://i.imgur.com/CHLWvpd.png) ](https://i.imgur.com/CHLWvpd.png)  
I have disabled IPv6 on my WAN connection as I have no use for it at the moment

Would getting better hardware result in better speeds?  
or would it be unnecessary?

---

<div class="post-metadata">

**Author:** ![dlakelan](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dlakelan/32/2320_2.png) [@dlakelan](https://forum.openwrt.org/u/dlakelan)\
**Post date:** [March 30, 2020, 2:24pm UTC](https://forum.openwrt.org/t/smart-queue-management/58802/4 "2020-03-30T14:24:41Z")

</div>

I would expect the APU to do better than that. It should be good for around a gigabit i would think (j1900 can shape a gigabit and it's a similar era of cpu)

Log into the router and run `top -d 1` then run your speed test and watch the cpu idle, how low does it go?

---

<div class="post-metadata">

**Author:** ![trueeasy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trueeasy/32/19184_2.png) [@trueeasy](https://forum.openwrt.org/u/trueeasy)\
**Post date:** [March 31, 2020, 4:42am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/5 "2020-03-31T04:42:03Z")

</div>

I Just ran the [http://www.dslreports.com/speedtest](http://www.dslreports.com/speedtest) , My cpu idle hovered around 50% to 60 %

---

<div class="post-metadata">

**Author:** ![dlakelan](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dlakelan/32/2320_2.png) [@dlakelan](https://forum.openwrt.org/u/dlakelan)\
**Post date:** [March 31, 2020, 9:12am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/6 "2020-03-31T09:12:03Z")

</div>

remind me, does the device have 2 cores? that would indicate potentially one core saturated. though you can monitor individual cores with an appropriate full version of top and find out... not sure if one is available on OpenWrt.

---

<div class="post-metadata">

**Author:** ![moeller0](https://forum.openwrt.org/user_avatar/forum.openwrt.org/moeller0/32/1591_2.png) [@moeller0](https://forum.openwrt.org/u/moeller0)\
**Post date:** [March 31, 2020, 9:52am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/7 "2020-03-31T09:52:19Z")

</div>

> [@dlakelan](#):
>
> I would expect the APU to do better than that. It should be good for around a gigabit i would think (j1900 can shape a gigabit and it's a similar era of cpu)

See [https://forum.openwrt.org/t/comparative-throughput-testing-including-nat-sqm-wireguard-and-openvpn/44724](https://forum.openwrt.org/t/comparative-throughput-testing-including-nat-sqm-wireguard-and-openvpn/44724) the second x86 (AMD GX-412TC) is an APU IIRC, so in theory an APU might be able to traffic shape at your bandwidth...

> [@trueeasy](#):
>
> My cpu idle hovered around 50% to 60 %

I concur with @dlakelan, this might indicate one CPU running at maximum. (Potentially caused by packet steering).

> [@dlakelan](#):
>
> remind me, does the device have 2 cores?

it is either a dual or more likely a quad code SoC.

> [@dlakelan](#):
>
> though you can monitor individual cores with an appropriate full version of top and find out... not sure if one is available on OpenWrt.

I believe htop is available and will report/display load per core (`opkg update; opkg install htop`).

---

<div class="post-metadata">

**Author:** ![trueeasy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trueeasy/32/19184_2.png) [@trueeasy](https://forum.openwrt.org/u/trueeasy)\
**Post date:** [March 31, 2020, 2:20pm UTC](https://forum.openwrt.org/t/smart-queue-management/58802/8 "2020-03-31T14:20:24Z")

</div>

Here is the test with htop

 ![speed](https://forum.openwrt.org/uploads/default/original/3X/a/a/aa8ee49408970f9efca4933b5706b571463ee822.gif)

---

<div class="post-metadata">

**Author:** ![dlakelan](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dlakelan/32/2320_2.png) [@dlakelan](https://forum.openwrt.org/u/dlakelan)\
**Post date:** [March 31, 2020, 7:23pm UTC](https://forum.openwrt.org/t/smart-queue-management/58802/9 "2020-03-31T19:23:33Z")

</div>

Yeah, it looks like it's saturating the 2nd core during the download at least briefly at different points during the test. I'd maybe suggest setting your download bandwidth to 300Mbps and running another test. You can leave your upload alone.

If you feel that this is not acceptable level of performance for you, I can heartily recommend switching to RPi4: [RPi4 routing performance numbers](https://forum.openwrt.org/t/rpi4-routing-performance-numbers/53996)

---

<div class="post-metadata">

**Author:** ![JonP](https://forum.openwrt.org/user_avatar/forum.openwrt.org/jonp/32/68101_2.png) [@JonP](https://forum.openwrt.org/u/JonP)\
**Post date:** [April 1, 2020, 2:19am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/10 "2020-04-01T02:19:02Z")

</div>

Do you think irqbalance would help him much?

---

<div class="post-metadata">

**Author:** ![dlakelan](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dlakelan/32/2320_2.png) [@dlakelan](https://forum.openwrt.org/u/dlakelan)\
**Post date:** [April 1, 2020, 3:13am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/11 "2020-04-01T03:13:48Z")

</div>

Would be worth a try!

---

<div class="post-metadata">

**Author:** ![trueeasy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trueeasy/32/19184_2.png) [@trueeasy](https://forum.openwrt.org/u/trueeasy)\
**Post date:** [April 1, 2020, 5:18am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/12 "2020-04-01T05:18:18Z")

</div>

> [@dlakelan](#):
>
> an heartily recommend switching

I just installed irqbalance through the software tab, I enabled irqbalace through rc.d and rebooted OpenWRT.  
Below are the results  
 ![speed2](https://forum.openwrt.org/uploads/default/original/3X/2/a/2a541fb6b5958811d369e3d50cbdadf66590dd8f.gif)

It seems to help abit, However the speeds are not acceptable level of performance.

Regarding your RPi4 Recommendation. I am willing to try it, but I would like to know is it capable to shape Gigabit speeds?

This question is based of trying to future proof when ISP will make it available

---

<div class="post-metadata">

**Author:** ![dlakelan](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dlakelan/32/2320_2.png) [@dlakelan](https://forum.openwrt.org/u/dlakelan)\
**Post date:** [April 1, 2020, 5:24am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/13 "2020-04-01T05:24:54Z")

</div>

Yes the data from that link shows it handles gigabit easily

---

<div class="post-metadata">

**Author:** ![trueeasy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trueeasy/32/19184_2.png) [@trueeasy](https://forum.openwrt.org/u/trueeasy)\
**Post date:** [April 1, 2020, 5:26am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/14 "2020-04-01T05:26:08Z")

</div>

Could you recommend a USB to Ethernet adapter

---

<div class="post-metadata">

**Author:** ![dlakelan](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dlakelan/32/2320_2.png) [@dlakelan](https://forum.openwrt.org/u/dlakelan)\
**Post date:** [April 1, 2020, 5:27am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/15 "2020-04-01T05:27:23Z")

</div>

Check the thread

---

<div class="post-metadata">

**Author:** ![trueeasy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trueeasy/32/19184_2.png) [@trueeasy](https://forum.openwrt.org/u/trueeasy)\
**Post date:** [April 1, 2020, 7:19am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/16 "2020-04-01T07:19:32Z")

</div>

Thank you providing that Guide.

---

<div class="post-metadata">

**Author:** ![moeller0](https://forum.openwrt.org/user_avatar/forum.openwrt.org/moeller0/32/1591_2.png) [@moeller0](https://forum.openwrt.org/u/moeller0)\
**Post date:** [April 1, 2020, 8:19am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/17 "2020-04-01T08:19:24Z")

</div>

Mmmh, maybe this is an additional case where packet steering does not work as it should?  
You could temporarily disable this by deleting `/etc/hotplug.d/net/20-smp-packet-steering` and rebooting the router (there should be a copy left in `/rom/etc/hotplug.d/net/20-smp-packet-steering` if you find you need it). I have a hunch that the redhat recommended settings for packet steering really do not work well on low-core-count non-x86 routers.... especially with traffic shaping adding a considerable load.  
irq-balance might work better if packet steering is not enabled (not sure whether it was in your test).

---

<div class="post-metadata">

**Author:** ![trueeasy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trueeasy/32/19184_2.png) [@trueeasy](https://forum.openwrt.org/u/trueeasy)\
**Post date:** [April 1, 2020, 8:35am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/18 "2020-04-01T08:35:00Z")

</div>

> [@moeller0](#):
>
> pecially with traffic shaping adding a considerable load.

i just tried deleting the mentioned "packet steering"

 ![image](https://forum.openwrt.org/uploads/default/original/3X/d/2/d211a97385e78ee62445e97ec99ce2a5bac6cab3.png)  
It does not exist in my OpenWRT

---

<div class="post-metadata">

**Author:** ![moeller0](https://forum.openwrt.org/user_avatar/forum.openwrt.org/moeller0/32/1591_2.png) [@moeller0](https://forum.openwrt.org/u/moeller0)\
**Post date:** [April 1, 2020, 8:38am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/19 "2020-04-01T08:38:54Z")

</div>

Sorry, look for `/etc/hotplug.d/net/20-smp-tune` this was renamed recently, and I copied it from my router running master...

---

<div class="post-metadata">

**Author:** ![trueeasy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trueeasy/32/19184_2.png) [@trueeasy](https://forum.openwrt.org/u/trueeasy)\
**Post date:** [April 1, 2020, 8:50am UTC](https://forum.openwrt.org/t/smart-queue-management/58802/20 "2020-04-01T08:50:41Z")

</div>

I have deleted the `/etc/hotplug.d/net/20-smp-tune` and rebooted OpenWRT

[[Album] Imgur ![](https://i.imgur.com/rNQCtI1.gif?noredirect "Imgur") ](https://imgur.com/a/UXgJCbt)

The connection peaked a little higher, but taxed the CPU more.

[Next page](https://forum.openwrt.org/t/smart-queue-management/58802.md?page=2)
