PCQ Advice

Hi,

We have a 10MB internet connection and we are using mikrotik as a proxy server and a quota management solution. I need to distribute the 10MB for about 60 clients PCs. What are the recommended parameters should I use in PCQ?

Any detailed suggestions will be great.

Thanks

Are you limiting each user to a certain speed. or to the 10 mbps total is the max a user can get.

Thanks for replying.

I want to limit each user to a certain speed. and the total of speeds for all users is 10Mbps.

/queue type
add kind=pcq name=pcq-upload-1M pcq-classifier=src-address pcq-rate=1M pcq-total-limit=4000KiB
add kind=pcq name=pcq-down-1M pcq-burst-time=8s pcq-classifier=dst-address pcq-rate=1M pcq-total-limit=4000KiB
/queue simple
add max-limit=10M/10M name=Subnet queue=pcq-upload-1M/pcq-down-1M target=xx.xx.xx.xx/24

Edit the above to what you would like to do. Right now it would limit each user to 1M up/down. I have put the pcq-total-limit at 4000KiB this will allow about 80 concurrent users. This can be decreased or increased but be aware if increased you will use more RAM. If this is a small installation not som uch an issue but as you have more queues and users concurrently connected it can create issues. Target put the whole subnet of the users you would like to control.

Thanks again.

I’ll apply the configurations and notify you.

What about dropped packets? they are affecting the performance of the internet experience of the user, right?

The dropped packets happen when the users queue is full ie they are exceeding there allocated bandwidth. TCP detects these losses and will re-transmit that packet. A certain amount of packet loss is required to reduce throughput or throttling the connection. Without the dropping of packets you would not be able to limit the speed. If you allowed them the full speed of the connection once they reach the capacity of the link packets would be dropped.
The only time dropped packets may affect users is on udp services such as voip.

Thanks for all your efforts.

Any chance you can give me more details on how you choose 4000KiB as pcq-total-limit? I just need to understand this well.

Thanks again

Basically depending on what you set your limit on. Right now it is set to 50 KiB which is the size of each PCQ-queue. you mutiply that by the number of individual queues you require (concurrent users you expect to have connected) ie 80 which gives you the pcq-total-limit= 4000KiB . you then need to make sure you have enough ram. Lets say PCQ-TOTAL-LIMIT=x
RAM required = x*(2000Byte+200Byte) (2000Byte buffer for 1 packet. 200 Byte service data for 1 packet)
Ram required = 4000KiB*2.2 = 8800 Kib = <8.8 MB Ram required if you have 80 people concurrently online at one time. If you only have a few customers then this is not going to affect much but some of the larger ISP’s will be taking this into account. It is covered under this page. http://forum.mikrotik.com/t/pcq-limit-total-limit-settings/12002/1 If you look at https://mum.mikrotik.com//presentations/US08/janism.pdf There is more detail.

Thanks for the explanation.