Does Mangle rules slows down the router?

I need to give 100 mangle rules in my Router OS…I am concerned that whether these rules will slow down the router or not…I will basically mark the packets in those rules…So will the packet processing be slow?..I will use those rules to control the downlaod/upload limit…please I need some experts comments…Thank you for your co-operation…I have 1GB RAM…I am also running webproxy caching…

The execution of those rules are burning CPU cycles. How they are arranged can be important though. For example, if 90% of your traffic is marked by rule X, then try to put rule X farther up in the chain (assuming no passthrough). That causes 90% of the traffic to not process through the majority of the rules in the chain.

Now, that being said, if the CPU of the router is never getting pushed to 100% usage, it doesn’t really matter. CPU cycles are cheap – buy a faster one or split the proxy functions off to another box.

thankx very much JJCinAZ…But my 100 mangle rules will be equally important for me as all of them will be for different clients…I cannot prioritize among them…I have 2 GHZ pocessor and 1GB RAM (884 MB)…Moreover I have already around 100 queues in the /ip queues and I am running web proxy caching…Buddy should I add those extra 100 mangle rules… But it is really important for me to add those..Will the cpu cycles be able to handle the pressure?..What should I DO?..HELP ME OUT PLEASE…

A simple answer, yes.

Anything that causes more overhead for a packet to traverse interfaces will affect latency. With that said, RouterOS is amazing at what it does and it will handle it with very little effort. Just help it out and optimize optimize optimize.

It would be a good visual to see some testing/graphing done in this area if anyone is up for the task.

If this would help you, we’ve got the following on our MT:

2000+ Mangle rules (mostly doing Nth as per the load balancing wiki)
500+ NAT rules
300+ Queues

Hardware is generic Intel Core 2 Quad 2.4 GHz with 2 GB RAM. The one thing that we have separately is the Proxy. We’ve got a separate squid array to do proxy for our 4000+ clients.