Hi there
instead of using a time treshold what about using a volume of bytes already downloaded treshold?
The idea is : currently a client downloaded 12 Mbytes of data. As soon as the client will reach the treshold of 15 Mbytes it will loose the current priority 1 and classified as priority 2 until it reach the new treshold of 30 Mbytes where, again, it will be de-classified as less priority 3 client until it reach the worst class (queue ) that will be with priority 8 where it will remain until the connection will be completed and closed. Of course, new connection will be marked in independet way so new connection coming from the same client will start with super fast and brilliant priority 1.
You can define 1,2 N queues partioning the current status of each client in centralized way, giving each client a specific dynmaic priority based on the "history of his consumed bytes on the current connection" (/ip firewall mangle connection-bytes is used on purpose) .
Here an overview of a possible config procedure:
(the example is related to download , almost analogous process take place on up direction):
1) create queues : Q1,Q2,Q3 ...QN:
/queue tree
add disabled=no limit-at=0 max-limit=80M name=GLOBAL_DOWN parent=global-in priority=1
add disabled=no limit-at=1k max-limit=80M name=QoS1_DOWN packet-mark=QoS1 parent=GLOBAL_DOWN priority=1 queue=pcq-download
add disabled=no limit-at=1k max-limit=80M name=QoS2_DOWN packet-mark=QoS2 parent=GLOBAL_DOWN priority=2 queue=pcq-download
...
2) Classify the subscribers dynamically according to the nymber of bytes exchanged on the connection (accomplished trough connection-bytes)
/ip firewall mangle
add action=mark-packet chain=prerouting connection-bytes=1-15000000 disabled=no in-interface=ether2 new-packet-mark=Qos1 passthrough=no protocol=tcp
add action=mark-packet chain=prerouting connection-bytes=15000001-30000000 disabled=no in-interface=ether2 new-packet-mark=Qos2 passthrough=no protocol=tcp
...
add action=mark-packet chain=prerouting connection-bytes=1-15000000 disabled=no in-interface=ether2 new-packet-mark=Qos1 passthrough=no protocol=udp
add action=mark-packet chain=prerouting connection-bytes=15000001-30000000 disabled=no in-interface=ether2 new-packet-mark=Qos2 passthrough=no protocol=udp
...
/queue type
add kind=pcq name=pcq-download pcq-classifier=dst-address pcq-dst-address-mask=32 pcq-dst-address6-mask=128 \
pcq-limit=100 pcq-rate=0 pcq-src-address-mask=32 pcq-src-address6-mask=128 pcq-total-limit=20000
The suggested queue type to see is pcq classifed on dst address.
Hoping this will help you.
Have a nice day