Here I assumed you flashed an existing router you own with tomato firmware.
First make sure you Enable QoS and choose “SFQ” as the Qdisc scheduler. Then set download and upload bandwidth to 85% of your total bandwidth. Save your settings. After that run the speed test from dslreports. If your bufferbloat rating is good you can incrementally increase your total bandwidth above 85% until pings start to spike. Otherwise if your rating is still not good try reducing the max bandwidth limits. Picture’s describing this are posted below.
If your “ping www.google.com -t” measurements are is still very low during the speedtest… you can incrementally increase your total bandwidth above the 85% you initially set until pings start to spike higher than desired. Otherwise if your rating is not good try reducing the max bandwidth limits. Doing this allows you to figure out the sweet spot between getting max bandwidth vs experiencing high pings.