Community discussions

MikroTik App
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Personal monologue: A Question About Token Bucket Size

Mon Jun 27, 2022 12:57 pm

I want to ask about something
for example if we have 1500 Bytes according to what i understand that would need 1500 token to pass through the queue
so if i have a client with 1mbps he will need 125000 token which represents the whole bucket capacity that he will need for his speed
and according to this formula Bucket capacity = bucket-size * max-limit
125000=(1×1000×1000)*(0.125)
so the bucket size needs to be at least 0.125 not as it is set 0.100
am I right or what ?
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Fri Jul 01, 2022 2:50 pm

up.
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 6:12 pm

up.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 7:25 pm

Have you wondered why no one answers you?
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 7:37 pm

I've been watching the forum all week waiting for an answer and noticed that there aren't many active people
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 7:42 pm

From the beginning of this topic to today, 1723 posts have been written.
Not to mention how many people online were present...

After asking a question, giving yourself an answer, and asking to tell you if it's right or not, after trying to follow your reasoning, everyone gets discouraged.
Instead, try asking what your problem is, and what you want to achieve,
others will likely give you the right answer, or can guide you to understand what you really need.

May the peace be with you.
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 7:48 pm

The question is not for me alone in general, as if what I say is true, mikrotik must adjust the default number to 0.125 according to what I say, so I would like to know if what I said is correct or not in order to submit a request to edit this value or at least add some missing information to the docs
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 7:52 pm

What i meant with "there is no many active people"
that
no one sees my post as for example my free time is not the same as your free time
and many of them are new to mikrotik
you for example is active now and my topic was in the top of the list
before i made that "up" replay you would not see my topic as it was at the bottom
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 8:00 pm

I have already seen this topic, but for what has already been written before, I have not replied.
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 8:01 pm

can you just help me?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 8:04 pm

I never write about what I don't use, I should first start studying how it is best, but luckily for my customers I don't need to queue them to limit traffic...

¯\_(ツ)_/¯
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 8:07 pm

I would like to surprise you and say that I have no clients or network at all I just love theoretical learning and i have no mikrotik devices at home all what i have is my virtual lab thanks for replying by the way.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 8:08 pm

I don't need to queue them to limit traffic
Then how ?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 9:07 pm

@Zacharias
Mmmm... my english is really poor....
I do not need to use non-default values for my clients, i leave do it on automatic by pppoe and user-manager

at this point i don't know if it's better to write by hand, or trust google translate...
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 9:14 pm

I don't need to queue them to limit traffic
Then how ?
what he means is that he does not use static queues
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 9:18 pm

Oh, thanks ;)
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 9:20 pm

@Zacharias
Mmmm... my english is really poor....
I do not need to use non-default values for my clients, i leave do it on automatic by pppoe and user-manager

at this point i don't know if it's better to write by hand, or trust google translate...
I am talking about the default value.
if i was right and you have for example client with speed 100mbps
the client with the default value has only tokens for 80mbps that is a big loss
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 9:23 pm

@rextended ok i understand ...
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 9:23 pm

I wish I had the same problem, as WISP at most I can provide 50Mbps,
it is unthinkable with the wifi, now so congested, to offer more...
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 2990
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 9:25 pm

in this presentation there are some good explanation about bucket size parameter

https://mum.mikrotik.com/presentations/ ... 580004.pdf
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 9:26 pm

I read that before
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 9:32 pm

I am not talking about burst, I am talking about the main function of the token bucket algorithm which is limiting the speed
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 2990
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 9:36 pm

slide 23 to 27, example testing with default bucket-size (0.1) vs max bucket size (10)
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Wed Jul 06, 2022 9:58 pm

Yes but this is not what i want he is doing that to show us how to get kind of burstness using this function that is a secondary usage for the token bucket function
what I am talking about is the main usage which is limiting the speed
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 5:00 pm

up.
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 5:22 pm

I wish I had the same problem, as WISP at most I can provide 50Mbps,
it is unthinkable with the wifi, now so congested, to offer more...
Actually you have the same problem, all mikrotik users using queues have the same problem: 20% of the speed have no tokens; that makes them delay or drop.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 5:39 pm

(on queues everytime the value are on bit, not on Bytes, do not mix or wrong assumtions come out for sure, like 1M * 1000 = 1024M....)

For line speed is counted all packet, not only the data parts, but also the headers.
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 5:51 pm

This is my source
https://www.sciencedirect.com/topics/co ... ken-bucket
he said what i say by the way
give me your source please
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 5:55 pm

@rextended
search for that
"packet A of size 1000 bytes arrives. Since the bucket contains enough tokens, the packet is immediately transmitted and 1000 tokens are removed from the bucket leaving only 2000 tokens."
in that page.
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 2990
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 5:57 pm

i have deployed MikroTik to control traffic up to 4.000 Mbps (4gbps) of traffic using a CHR and works ok

Bucket Size parameter is usefully to control the following specific aspect of the behavior of a queue:

when a queue have none or few traffic (in relation to max-limit) and suddenly receives a big amount of traffic

at that moment

with a big bucket size you can allow traffic to briefly surpass max-limit in that bucket-size proportion, that can lead to a better user experience

i think is very useful when access layer is capable of absorb that kind of traffic increment like GPON networks for example, will give good results
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:03 pm

I will tell you again this thing is called burst this is not the main option that we use the token bucket algorithm for
we use token bucket for limiting the speed
then (if you want) you can have burst with a big bucket size
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 2990
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:05 pm

i dont understand that are you trying to solve or to demonstrate
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:06 pm

i have deployed MikroTik to control traffic up to 4.000 Mbps (4gbps) of traffic using a CHR and works ok
you will not notice a problem because the speed limit is an average parameter
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:07 pm

i dont understand that are you trying to solve or to demonstrate
visit that link in the top and you will understand
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:08 pm

And why you search info how routeros work, on non-routeros manuals?

Is like I search instructions on how windows works inside macos docs...
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:11 pm

Your reported formula on top, come from this:
https://wiki.mikrotik.com/wiki/Manual:H ... _Algorithm

Is not on what you link...
On the page you link "MikroTik" is wroted on same page, but on another article about power consumption...
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:12 pm

And why you search info how routeros work, on non-routeros manuals?
token bucket algorithm is not made my mikrotik
it is a Linux algorithm
they just implemented it
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:13 pm

Your reported formula on top, come from this:
https://wiki.mikrotik.com/wiki/Manual:H ... _Algorithm

Not on what you link...
On the page you link "MikroTik" is wroted on same page, but on another article about power consumption...
yes i did because you can't find information in one place
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:17 pm

Your reported formula on top, come from this:
https://wiki.mikrotik.com/wiki/Manual:H ... _Algorithm

Is not on what you link...
On the page you link "MikroTik" is wroted on same page, but on another article about power consumption...
Mikrotik manual didn't explain everything so i had to know if the tokens are for packets as you said or for bytes so i used that external source to know that
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:19 pm

Just read all documentation and what is observed is: everytime talk about packets and not bits/Bytes in queue...
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:24 pm

They didn't actually talk about how the algorithm work
all they talked about how changing the bucket size to a big number can help you have some kind of burstness without the burst option in the queue
Last edited by Khaled0Ebrahim on Thu Jul 07, 2022 11:22 pm, edited 1 time in total.
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:27 pm

"Before allowing any packet to pass through the queue, the queue bucket is inspected to see if it already contains sufficient tokens at that moment"
that what they say
if the tokens were for packets why they would say that the packet will need more than one token
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:41 pm

do not say "the packet will need more than one token"
say "the queue bucket is inspected to see if it already contains sufficient tokens at that moment" and "any packet", not "one packet"
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 6:47 pm

since your English is not that good and me too, but
i understood what they mean i will try to retype that sentence to help you get what they mean

They say "before allowing any packet to pass"
which means that there is one packet will pass
"queue bucket is inspected to see if there is sufficient tokens" for that packet they didn't say token they said tokens
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 7:03 pm

This is my source
https://www.sciencedirect.com/topics/co ... ken-bucket
he said what i say by the way
Inside what you link, I read that:
Each token can be considered as permission for the source to transmit a certain number of bits into the network
Each token = certain number of bits
I do not read exactly 8 bit, or 1 Byte, but an arbitrary amount of bit/Bytes, and if (and I write: if) for RouterOS 1 token = 1 packet, who forbid it?
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 7:05 pm

continue reading until you find the example
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 7:06 pm

>EXAMPLE<

And it does not contradict what has already been written before.

And I have already read all, but do not buy the book...


and do not invalidate (if is true):
for RouterOS 1 token = 1 packet, who forbid it?
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 7:08 pm

you do not have to buy the book what i say is mentioned in the example if you can not find it i put it in the top
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 7:10 pm

@rextended
search for that
"packet A of size 1000 bytes arrives. Since the bucket contains enough tokens, the packet is immediately transmitted and 1000 tokens are removed from the bucket leaving only 2000 tokens."
in that page.
here
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 7:15 pm

Yesss.... understanddd.....
Stop with examples, I can read.
But before any examples (that still examples)
Each token can be considered as permission for the source to transmit a certain number of bits into the network
Each token = certain number of bits

and again (probably):
RouterOS 1 token = 1 packet, who forbid it?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 7:17 pm

Now are 10 min that I do bandwidth test with fixed values from Gateway to CPE
(pppoe-client, dynamic static queue, bucket size 0.100, default-small queue size 10 packets pfifo, no burst),
and I do not see drops and all the 20Mbps still pass, I do not see any packet drop or 20% bandwidth lost...
This is more valuable to me than a non-mikrotik example
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 7:20 pm

let me tell you that the speed limit is an average parameter which means that you will never see that there is a problem
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 7:21 pm

for example, what problem?
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 7:43 pm

The packets have different sizes and they are being sent in different times so for example you are sending a packet every 1 ms the average speed is 1 packet per 1 ms which means 1000 packets per sec
but this is not the real world
this is the real world
you are sending packets with different sizes in different time
for example
t1= 1ms packet with a size of 1000 bytes is sent
t2 = 2ms packet with a size of 20 bytes is sent
t3 = 5ms packet with a 1480 bytes is sent

you have here t =5ms data transferred 1000+20+1480
which means your average rate is 2500 bytes/5ms
which means your average rate = 500 megabytes per sec
which is 4gbps

why you will not notice any problem
because if you have for example speed limit with 1 mbps which means 125000 bytes per sec
which also means that every 1 ms you will have a new 125 tokens added to the bucket which means that there is always non noticeable problem
you can notice a problem if you used jumbo frames
theoretically there is a problem but in the real world it is un noticed at most
but it is still a real problem
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 7:58 pm

20Bytes a single packet?

What I know for sure, that a 20Bytes packet can be only an error...
Minimal frame size is 512bit / 64Bytes
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 8:01 pm

it is still a packet
it will not be used by today's protocols
but it is still a packet
and this is for explanation only
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 8:07 pm

you can notice a problem if you used jumbo frames
And why?
What is the difference to send 4Gbit/s with 2500Bytes every 5ms instead of 9000 every 18ms?
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 8:25 pm

This is 1 byte per packet photo from my pc
https://drive.google.com/file/d/1yeqSnq ... p=drivesdk
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 8:34 pm

If you have for example mtu 9000
and you have that 1mbps client
that can cause the problem
125000 bytes per sec
and you are sending 1 packet with 9000 bytes per 1ms or as the previous example but with the big packets number and every 1ms 125 tokens are added to the bucket you will not see more than 80% of the speed because your rate is faster than tokens itself
not as if you used mtu 1500 the tokens rate are faster than your rate
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 8:36 pm

Ok, I understand that all is useless.
You mix payload with packet.

Let me know how inside 1 Byte you can have:
source MAC, dest MAC, source IP, dest IP, protocol data, payload, CRC and for sure I miss something........

a 1500 packet are not 1500 Bytes of usable data, and also for jumbo frames.
probably your 20% lost is all what is needed to transmit useful data from A to B...

The queue take into account also the necessary headers for transmit payload from A to B...
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 8:44 pm

You can find that in the real world actually
i will tell you that happened with me actually
my isp and his friends are getting their internet from another isp
they have 1gbps
and they used a mikrotik ccr to distribute the speed on them and they had that problem
they are at least 20
and each one has from 50 to 500 client
and speeds are more than the total
this can cause the problem as the rate was more faster than the tokens after many trials to solve the problem they filled
so they made the ccr as a switch and they got pfsense which uses another algorithms than HTB and now the problem has gone
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 8:50 pm

Ok, I understand that all is useless.
You mix payload with packet.

Let me know how inside 1 Byte you can have:
source MAC, dest MAC, source IP, dest IP, protocol data, payload, CRC and for sure I miss something........

a 1500 packet are not 1500 Bytes of usable data, and also for jumbo frames.
probably your 20% lost is all what is needed to transmit useful data from A to B...

The queue take into account also the necessary headers for transmit payload from A to B...
yes i know cmd does not calculate anything other than payload in that photo it is still a packet with one byte
in the computer before putting the headers but before putting the headers you can not call this a packet used for networking it is a packet used in the device memory
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 8:58 pm

I'm sorry, you just wasted my time, because I was seriously interested in understanding what the problem is.
Since I have never documented this in such detail, I thought you were better informed about this than I am.

Actually there is no problem,
what can I ever learn from those who claim to have produced a 1 Byte packet with ping?

in the computer before putting the headers but before putting the headers
you can not call this a packet used for networking it is a packet used in the device memory
Speaking of queues inside the router, what does computer memory have to do with it?
Let's end it here, useless you climb up the mirrors....
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 9:00 pm

let me explain what i say by 1 byte packet
The HTB algorithm is used to limit data rate in the memory of a device
not limiting internet speed only
when i say 1 byte packet that means that this packet has 1 byte data and its place is in the memory in that example i was talking about the algorithm in general not its usage in the internet only
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 9:04 pm

i know that there is nothing called 1 byte packet in networking but there is in computer memory
if you didn't noticed yet limiting the speed happens in memory and queue types and token bucket capacity have a bytes size not bits and 1 token represents a permission to move 1 byte
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 9:16 pm

what can I ever learn from those who claim to have produced a 1 Byte packet with ping?
i did that to tell you that the computer memory have that not the networking
you said the packet can't be less than 512bits
i gave you a non internet packet that holds 8 bits
and again limiting the speed happens in the memory and limiting speed here can be anything not internet speed only
the algorithm is made for limiting the speed not limiting the internet speed only
you just wasted my time
sorry for that
and you know more than me of course because iam just 17
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 9:25 pm

Try to learn that if we are talking about TRANSITING packets through a router,
for sure they were created on the right size,
so it makes absolutely no sense to fall back on bullshit like 1 Byte packets in memory...


Whatever happens, if you ask other things (that I know) in other topics, on other arguments I will answer you.
I don't want to go back to this anymore.

May the Peace be with you.
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 9:30 pm

Again, I have talked about the algorithm in general
not only its usage in limiting networking speeds
and that was just an example for connecting what i mean, thank you for replying any way
May the Peace be with you
Peace be upon you too
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 9:56 pm

a 1500 packet are not 1500 Bytes of usable data, and also for jumbo frames.
probably your 20% lost is all what is needed to transmit useful data from A to B...
not right and they do not use jambo frames
the same issue happens because the massive number of people using Low speed than they need
and i didn't measure the 20% from that issue
i measured it like that
if i have 1mbps which is 125000 bytes per sec
if i use 0.100 i will get only 80% of that 125000
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Thu Jul 07, 2022 10:09 pm

you will notice that problem in the real world if for example you have 100mbps and your clients use from 10000 bytes up to 12500 bytes per 1ms with the default bucket size 0.100
the problem is that you will loss 20% of the speed
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Fri Jul 08, 2022 4:08 am

This is the most reliable source i could find about how token bucket works
https://support.huawei.com/enterprise/e ... -mechanism
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Fri Jul 08, 2022 11:15 am

Here is linux source
https://linux.die.net/man/8/tc-tbf
it covers some missing information
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: A Question About Token Bucket Size

Sat Jul 09, 2022 5:18 pm

Proving that 1 token = 1 byte

my lab:
pppoe server mtu 1480
client address 10.10.11.1
router address 10.10.10.10
firewall drop anything coming from 10.10.11.1 instead icmp
simple queue
target 10.10.11.1
rate 10k/10k
bucket size 0.100 or 0.125 will give the same results

queue type pfifo 100

testing steps
10kbits = 1250 bytes

please note that i am using here cmd and the 1250 here is the payload only that will affect the results a little bit because i am not considering the full packet size but it is still enough to prove that 1 byte = 1 token


step-1 run that test via cmd ping 10.10.10.10 -l 1250 -t
result no problems everything is ok ping is 1 for all the results.
step-2 increase that 1250 to 1300 and disable the simple queue and re-enable it then run the test results: after 2 or 3 requests ping will start in rising
so
if 1 token = 1 packet
there were in that lab 10000×0.1=1000 tokens
why after 2 or 3 packets ping started in rising and we didn't even used all the 1000 tokens
and why going more than 1250 made the ping higher
the answer is that 1 token = 1 byte

for those who will ask why even you used more than your rate since 1250 is the payload only you still get ping one and why also you get the same results when you use bucket size 0.100 not 0.125 as you say
The answer is
the ping is rising but you can't see that
for instance first packet with less than 1
the second 1
the third 1.014 ... etc
and I do not need to be that accurate because the results are less affected by these settings since i am proving that tokens is not = packets
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Personal monologue: A Question About Token Bucket Size

Sun Jul 10, 2022 1:12 pm

Packets are of arbitrary sizes, so there is no constant to multiply the packets-per-second rate to get a bits-per-second rate. Hence if each token was enabling a single packet regardless its size, it would not be able to control bandwidth usage in bits per second.
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: Personal monologue: A Question About Token Bucket Size

Sun Jul 10, 2022 8:35 pm

Packets are of arbitrary sizes, so there is no constant to multiply the packets-per-second rate to get a bits-per-second rate. Hence if each token was enabling a single packet regardless its size, it would not be able to control bandwidth usage in bits per second.
Yes tell him please he said more than time that Mikrotik manual says that 1 token = 1 packet
i told him something similar to what you said and then got him another source then finally he satisfied but he still doesn't get that 1 token = 1 byte

Even Mikrotik support made the token bucket diagram photo looks like 1 token = 1 packet at least, Mikrotik if you are not going to change the default bucket size to 0.125
fix that photo and put a good information in that manual
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Personal monologue: A Question About Token Bucket Size

Mon Jul 11, 2022 12:13 am

@Khaled0Ebrahim, I completely agree with you that the diagram strongly suggests that you need one token to release one packet regardless its size. I assume it is because the purpose of the diagram was not to express the relationship between a single token and the amount of data sent, so the author has simplified it too much, not anticipating the possible impact.

But to respond your OP - you have misunderstood multiple aspects. @Chechito has already tried to explain that, so I'll try to use other words.

Put both the bucket and the packets aside at first. There is a constant flow of tokens, and there is a byte stream of data in the queue. If you prefer, you can think of it as if each token was permitting a certain number of bits or bytes to be taken from the queue and sent, but in fact the question of "how much data does a token represent exactly" is irrelevant because there are actually no discrete tokens, it is a continuous flow.

Without the bucket, the data are taken from the queue with exactly the same rate (in bits per second units) as the one at which the tokens arrive (also in bits per second units). If there are no data in the queue, the tokens for that queue keep nevertheless arriving, but they are wasted. So when further data arrive to the queue, they cannot be released from it faster than new tokens arrive. So if the average rate of data arrival is lower than the token rate, but the data arrive in bursts larger than the queue capacity, some of the data get dropped.

The "bucket" (🪣) is a reservoir of tokens, whose only purpose is to allow the data to be taken from the queue at an unlimited rate for a certain amount of time - i.e. to allow bursting not only above the constant flow rate but even above the normal burst rate. The idea is that while there are no data in the queue, the tokens are collected in the bucket rather than being wasted immediately, so once some data arrive to the queue, they can use the tokens accumulated in the bucket. So using the tokens accumulated in the bucket, the data are taken from the queue at an unlimited rate until the bucket becomes empty; once there are no more tokens in the bucket, the data sending rate falls back to the normal token arrival rate.

When there are no data for an extended period of time, the bucket becomes full of tokens and further tokens don't fit into it and get wasted as they arrive.

And now we finally get to the bucket-size parameter. It controls the amount of tokens that can be accumulated. Here it becomes complicated to imagine, as the physical dimension of this value is actually time - it says for how long, in seconds, the tokens can be accumulated while no data arrive to the queue. So for a queue with a 10 Mbit/s data rate, a bucket of 0.1 second "size" will hold tokens worth 1 Mbit of data; a bucket of 10 second "size" will hold tokens worth 100 Mbits of data.
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: Personal monologue: A Question About Token Bucket Size

Mon Jul 11, 2022 12:45 am

@sindy

I already read all about token bucket from all the sources i could
and i know all you said
but there is something i want to explain for you
this is my explanation for the token bucket algorithm

first before i start token bucket algorithm is used for limiting speed this is the main function
burst is a secondary function

also iam using in my examples here queue type fifo

what happens
There is a continuous flow of token is falling into the bucket by your rate for example if your rate is 1 mbps
there is 125 token is falling every 1ms
1mbps = 125000 byte

the bucket has a capacity in mikrotik this size is being calculated from this formula capacity = bucket size × your speed limit in bit

if the bucket is full the tokens are dropped

every packet in the queue should have its size in tokens to pass for example packet 1500 needs 1500 token

if there is no enough tokens for example packet 1500 arrives and there is 1400 token
the packet will stay at the start of the queue waiting for tokens this causes what we call "delay"
after 1ms the bucket should have received 125 tokens now we have 1525
so the packet can move after 1ms delay and 1500 tokens are removed from the bucket

if there is no space in the queue packets are dropped

what happens when the user stop using his speed for 1 second if the bucket size was 0.125 or less than that
the bucket becomes full again and he can pull all the bucket capacity without any delay or queueing or dropping
then he have no tokens again wait for 125 every 1ms

what about burst
if you used a bucket size more than 0.125 you will have a bucket capacity more than your speed and if you used the speed for some time the bucket will empty again and you will back to your speed
and when you do not use the speed for 10 sec if the bucket size was 10 the bucket will be full again


what happens if you used bucket size less than 0.125
for example 0.100
you will have a bucket capacity less than your speed and the same tokens rate 125 per 1ms is falling into the bucket
the bucket only can hold 80% of the tokens per sec
the other 20% is dropped as there is no any space in the bucket for them
and this is what the topic about
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Personal monologue: A Question About Token Bucket Size

Mon Jul 11, 2022 7:44 pm

I think you source your understanding from the description of the token bucket algorithm in bare Linux, where the bucket is used to collect the tokens all the time, i.e. also while a packet is waiting in the queue, for the purpose of the basic traffic shaping. However, the model Mikrotik uses in their explanation is different - it uses a bucket only to save tokens that would otherwise be wasted for later use while no packets are waiting in the queue.

Let's admit that the tokens are actually not flowing continuously but arrive in 1 ms "ticks", which means that a "continuous" bit rate of 1 Mbit/s is expressed as 1 kbit/ms, i.e. 1 kbit/tick. In bytes, this is indeed 125 bytes/tick.

Even if you use the bare Linux understanding of the bucket - if the queue rate is set to 1 Mbit/s, which means 125 bytes/tick, a 1500-byte packet needs to wait for exactly 12 ticks (12 ms) for enough tokens to arrive to set it free from the queue. If you express that in Mikrotik's bucket-size units (seconds), it still means just 0.012, not 0.125.

But I am afraid you cannot calculate it this rigid way - if the basic queue rate is only 100 kbit/s, you need 120 ticks to accumulate enough tokens to release a single 1500-byte packet, so then the corresponding bucket-size would be 0.12. But in the Mikrotik model, the bucket-size really has to be understood as a limitation of the time for which the unused tokens can be collected for future use.

To me, the Mikrotik model is internally consistent, although the actual implementation is most likely very close to the bare Linux one (because it is simpler and safer to work with a single bucket than with two separate ones). What I don't like about the manual is that it doesn't explicitly state whether the bucket-size unit is indeed seconds (so 0.1 means 100 ticks and 10 means 10000 ticks) - only the examples https://wiki.mikrotik.com/wiki/Manual:H ... eue_Bucket and https://wiki.mikrotik.com/wiki/Manual:H ... eue_Bucket, both with a 10 Mbit/s basic rate, lead to this conclusion.
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: Personal monologue: A Question About Token Bucket Size

Mon Jul 11, 2022 7:59 pm

@sindy
you misunderstood me in some points
before going to those points
why i didn't tell anything about ticks
tick is 1/frequency
we have now super processors which mean that its tick is less than 1ms of course tokens is still added per tick but i thought it is easy to share it like that because i do not want the topic to be complicated so everyone can share

back to our main points
i said in my first post if my speed is 1mbps which is 125000 bytes i need a bucket capacity 125000
as token rate will be the same as my speed 125000 token per second
mikrotik gave us a formula here it is
bucket capacity = max limit in bit × bucket size
in our example
125000=1000000 × 0.125
if we used 0.100
that gives us 100000 which means if the bucket is full you can not have more than 80% of your speed
when you use your speed like some examples i said before you can not also get more than 80% of your speed and this what is the topic about
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

A Question About Token Bucket Size

Mon Jul 11, 2022 8:49 pm

I will explain again how token bucket in (mikrotik) works

from the diagram there is only one bucket
so if you are going to see other sources see the one bucket one

Assume that we have 1mbps user
that is 125000 bytes per second
if for example you use processor with frequency 2GHZ
2000Hz
your tick should be 1/2000 = 0.0005 s
tokens added per tick should be 125000×0.0005=62

there is a flow of tokens 62 token per tick(in our example) falling into the bucket if the bucket is full tokens are dropped

when the user use the speed
the packets passes from the queue
if the queue is full packets are dropped if there is no tokens for the packet packet will wait for the tokens

assume that the bucket is full now the user started to use the speed that way t1= 1ms packets comes with size 1500 since there is 125000 in the bucket (if we used 0.125 of course)
packet can go and 1500 tokens are removed from the bucket the bucket has now 123500 token (remember the flow of tokens added per tick) since the bucket is not full tokens can fill it with its rate (in our example 62 per tick) user still using the speed t2 = 3ms packet 1400
we have 123500 + (125×3) =123875 tokens in the bucket now so 1400 tokens are removed packet can pass this process contains

let us go forward now to a bucket has 1400 tokens because our user used the speed
a packet 1500 wants to pass the queue (I am using fifo in that example) since there are no enough tokens for the packet the packet will stay at the start of the queue then after two ticks we will have 125 tokens so the packet will pass after 1 ms second delay

if the user stopped using his speed for 1 sec if the bucket size was 0.125 the bucket will be full again

if we used for example bucket size > 0.125 we will have a bucket capacity more than our speed which means that you can have (if we used 10 for example) 10 times your speed until the bucket becomes empty then you can use your speed and after 10sec from empty( if you did not use your speed) you can have the same function again

if we used for example 0.100 which is < 0.125
you will have a bucket capacity less than your speed and this is my problem here and what the topic is about
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Personal monologue: A Question About Token Bucket Size

Mon Jul 11, 2022 9:30 pm

ALL IS WRONG, or if is not wrong, you make continuosly wrong assumptions and bad calcs.
The bucket is filled at the max-speed rate.
If user have 1Mbit/s, the bucket is filled 1Mbit/s
The token are used only for simulate bursts for have peak speed for some seconds, but the max-speed is already respected and already can pass without restrictions.
The packets wait on queue only if the user try to use more speed than what have, and "extra token" are depleted for overuse.
But if the bucket is empty, next time tokens for keep max-speed rate are added...

Work on this way, and the connnection never stop.
The problem is only yours if you try to send more data than what you have subscribed with your provider.
If you want send a file at 4Gbps speed, calculate overhead ~12% for various protocol involved, and for go all smootly, send the file at 3520Mbps max,
that corrispnd near of 4Gbps datarate of packets.
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: Personal monologue: A Question About Token Bucket Size

Mon Jul 11, 2022 9:37 pm

hh sir what are you saying hhhh
the bucket algorithm is the one who controls the speed please learn what iam talking about then come back the sources are there
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Personal monologue: A Question About Token Bucket Size

Mon Jul 11, 2022 9:40 pm

You write too much and say nothing, they are always there and the usual round phrases.

MTU greater than 1500 ??? This only matters when the transfer takes place in the local network, when all devices support such a high MTU.
And anyway even using a 9000 MTU, you increase the payload, but the headers remain,
decreasing from 12% to 2%, so to send a file at 4Gbps of packets,
the device must send it at a maximum of 3920Mbps or exceed the maximum allowed, and sure packets are queued (then if too much on queue, discarded)...

The bucket is filled at the max-speed rate
You can run out of tokens in the bucket only if you exceed the maximum allowed rate
bucket-size 0.100 (or 0.125, not mind) is involved exclusively when max-speed is exceeded
It works like this, and whatever you say or do, you can't change the facts.


@sindy
please say if I'm wrong or not, I'm not an expert, BUT, is so easy UNDERSTAND how it works on dozen of MikroTik & MUM examples everywhere...
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: Personal monologue: A Question About Token Bucket Size

Mon Jul 11, 2022 10:05 pm

First you need to know that bucket token algorithm's first usage is for speed limit
i explained that in the top and the sources say the same
burst is a secondary usage

secondly if we used jumbo frames that increases the payload which means that i can send more data without no fragmentation which also means that i should consume more tokens per tick because fragmentation takes time
this makes the problem which is if the user's rate was more than 10000 bytes per 1 ms if his rate was 100mbps with the 0.100

I don't say that the problem is personal or said that i saw the problem or got the 20% from a pleace else than theory


somthing else i want you to know
you think that i am mixing the bytes with bits but i do not, everything i wrote is correct
queues are in the computer memory we don't use bits in there we use bytes the same thing is the token bucket capacity and queue types( bfifo for example )
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: Personal monologue: A Question About Token Bucket Size

Mon Jul 11, 2022 10:11 pm

@rextended
hh sir again if you are going to stick with mikrotik manuals and MUMs you will not no anything, search in everything by your hands.
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: Personal monologue: A Question About Token Bucket Size

Mon Jul 11, 2022 10:17 pm

Work on this way, and the connnection never stop.
The problem is only yours if you try to send more data than what you have subscribed with your provider.
If you want send a file at 4Gbps speed, calculate overhead ~12% for various protocol involved, and for go all smootly, send the file at 3520Mbps max,
that corrispnd near of 4Gbps datarate of packets
sir i told you before rate is an average parameter
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Personal monologue: A Question About Token Bucket Size

Tue Jul 12, 2022 12:26 am

secondly if we used jumbo frames that increases the payload which means that i can send more data without no fragmentation which also means that i should consume more tokens per tick because fragmentation takes time
this makes the problem which is if the user's rate was more than 10000 bytes per 1 ms if his rate was 100mbps with the 0.100
This discussion is getting ridiculous.
On one line you say "i can send more data without no fragmentation"
and on other line "more tokens per tick because fragmentation takes time".

And you again not understand if the user can go to 100mbps, stil go to 100mbps with the bucket size 0,000000000000000000000000000000000000000001 or 10000000000000000000000,0
because EVERYTIME the user can go to max-limit, are queued or discarded only packets that exceeded the max-limit.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Personal monologue: A Question About Token Bucket Size

Tue Jul 12, 2022 12:27 am

And now it's time for you to just stop insisting, whether I'm right or saying some big bullshit that I need to be whipped,
now STOP this monologue, write to staff@mikrotik.com if you have any requests.

I leave this topic open, but if you still write something before someone else has intervened in the discussion
(who is authorized to offend me, if he wants to),
I close this topic and you will no longer be able to open a topic for the same subject.
 
User avatar
Khaled0Ebrahim
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sun Sep 19, 2021 7:58 pm
Location: Egypt

Re: Personal monologue: A Question About Token Bucket Size

Tue Jul 12, 2022 12:34 am

I said he can consume more tokens per tick read what i wrote not what in your head

i didn't tell that the 20% of the speed will be dropped i said they have no tokens
they are dropped if you achieved the conditions i wrote before

and please if you do not know about something do not share
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Personal monologue: A Question About Token Bucket Size

Tue Jul 12, 2022 12:35 am

Ok, is your choice.

As you want, the topic is locked.
Only MikroTik staff, if want, can unlock this and reply.

Who is online

Users browsing this forum: baragoon, Bing [Bot], Guntis, sch and 99 guests