How to (optimizely) setup SQM?

Hi, I have an Edgerouter-X with 18.06.5 with 200/80 Mbits/s @ Fiber over PPPoE.
I setup SQM using Cake + Piece of Cake, 175/70 Mbits/s, Ethernet with 44 of packet for overheading, all over PPPoE-wan interface (my ISP does not use VLAN for voip or tv).

In speedtest I can't get more than 130Mbits/s. I dunno if I should set a little bit less packets for overheading, or change something in setup.

Plus, I didn't change MTU on PPPoE interface. running some MTU test, I can afford 1464 (which means, I can handle 1492 bytes, am I right?)

The main reason I'm setting up this, is to lower the bufferbloat when some parent is downloading hard. Plus, my ISP seems to be incapable to handle the traffic over high intensity, giving me some packet loss, etc.

My main use is competitive gaming, lower latency + stability is the intention.

Nah theoretically the maximum you could be able to see from your settings is around:
175 * (1500-8-20-20)/(1500-8+44) = 165.4296875 Mbps

maybe a bit less if you use rfc1323 timestamps, but I believe you only see ~130 Mbps, as your router simply runs out of CPU cycles. You could test this by logging into the router over ssh while running a long speedtest and look at the idle% reported in the top row(s) of top -d 1. If that drops to <= 5% you most likely are CPU bound.
So I believe playing around with the overhead is not going to give you much...

On PPPoE MTU often is 1500, but the PPPoE header costs 8 bytes and the remote PPPoE-tunnel side will remove the PPPoE header before passng packets into the wider internet, that is quite normal. typically that corresponds to a MSS of 1500-8-20-20 = 1452 B, so 1464 sounds odd, but feel free to copy and paste the contents of the "Share Your Results" box on

In that case have a look at the "sing and dance" section in per internal-IP-fairness should give you the isolation you want.

Not sure you can solve this from your end....

Well, try it and report any issues back, please.

1 Like

Hey, damn! What a complete answer.

I'll check about %idle, but I don't think it's the problem. Edgerouter-X has 2 cores at 880MHz.

About PPPoE question, I said 1464 after use:
So, 1464 B is the max I can receive with no fragmentation. 1464 + 28 (for ICMP, etc.) = 1492 B (the normal value we can see all around in PPPoE cases)
Anyway, I didn't force any MTU value on PPPoE Interface. It's unchanged (1500, by default, I guess).
I talked about MSS, and I talked about MTU.

I'll ready carefully the "sing and dance" you've posted. But I'd like to add: My ISP burst the connection at begginning. So, I have 200 Mbps of download speed, at the start of any downloading, or speedtesting, the speed reaches 500~600 Mbps and comes lowering until stabilize at 200. With QoS, or SQM, the graphic of the speed x time is more linear. At beginning the download starts growing until reach 200 and stabilize.

About my ISP cant handle high traffic, I know I can't do nothing unless argue with 'em.

I really appreciate your reply. Thanks!

P.S.: I dunno how to multi quote using this forum interface.

SQM cannot is multiple cores so you limited to the throughput of a single one.

1 Like

I note that the typical two instances of cake sqm starts can happily run on different CPUs but a single instance is limited to a single CPU.

1 Like

Anyway, I think the CPU isnt the bottleneck.
I put 800Mbps, only for testing, in SQM configs and it reached 200Mbps.

But that, less achieved bandwidth than configured is typically a strong indicator of a maxed out CPU. But again that is easy to test. Just as side-note the ~800 MHz Mips CPU's in the edgerouter X are really not as powerful as one would wish...

High-light the text and a transparent "quote" button appears, click it and the quote will be added at the current cursor position in the editor window.

Well, the way sqm-scripts shaper work is that they require a fixed upper limit, so any kind of burst technology will not be effective for you anymore with sqm active.

I'm on work, at night I'll do some test.

I got it! hahaha

Actually, that's one of my intentions. I really do not like burst.

Maybe I can "solve" my problem only fixing a maximum up/down bandwidth, what do you think about it?
Is that possible with SQM? Or better find out other "openwrt-mod"?

1 Like

How is two instances typical? Normally there is only a need for one instance in a wan interface.

There is one qdisc for egress and one for ingress, for a total of two qdisc instances.