Community discussions

 
ners
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 99
Joined: Tue Mar 12, 2013 4:30 pm

Upload suffers greatly when download is active

Mon Mar 18, 2013 9:23 am

I use dynamic address-lists (radius sends attribute MT-address-list when a client connects which puts the client's address into an address list). Users connect as PPPoE clients to my Mikrotik which acts as a PPPoE server.

My Mikrotik is the 36 core CCR, RouterOS is 6.0rc11.

Well, everything works fine now, but there's still a little problem which looks more like a bug in RouterOS.

When I connect as a 1Mb/1Mb client and start uploading something to an FTP server, I get 1Mbit upload, however as soon as I start downloading something while the upload is still in progress, Upload falls down to 200-300 kbit/sec, while download gets full 1Mbit.

Ideally I should get ~1Mbit download and ~1Mbit upload at the same time, but this is not the case.

And this bug does not manifest itself when I am downloading and another client in the same address list is uploading. Only when it is specifically one and the same customer who is downloading and uploading at the same time.

For example:
1) I connect to the MT as a pppoe client
2) I start uploading stuff to an FTP server. I get 1Mbit/sec upload.
3) While uploading, I start downloading something from a web server. I get 1Mbit/sec download AND Upload drops to ~250 kbit/sec, while the download is still 1Mbit/sec. As soon as I stop downloading, upload gets back to 1Mbit/sec.

O_o
Maybe it's a bug in Routeros 6.0rc11?

Here's my current config:

ros code

/ip firewall mangle
add action=mark-packet chain=forward new-packet-mark=1m-upload passthrough=no src-address-list=TEST_1MB
add action=mark-packet chain=forward new-packet-mark=1m-download passthrough=no dst-address-list=TEST_1MB

ros code

/queue type
add kind=pcq name=1m_download pcq-classifier=dst-address pcq-rate=1024k pcq-total-limit=50000
add kind=pcq name=1m_upload pcq-classifier=src-address pcq-rate=1024k pcq-total-limit=50000

ros code

/queue tree	
add name=1m_download packet-mark=1m-download parent=global queue=1m_download
add name=1m_upload packet-mark=1m-upload parent=global queue=1m_upload

Any ideas? :(

P.S. It only happens on rates lower than 10M, when I set pcq-rate=10M, I get full throughput 10Mbit upload and 10Mbit download.
 
derr12
Member
Member
Posts: 411
Joined: Fri May 01, 2009 11:32 pm

Re: Upload suffers greatly when download is active

Tue Mar 19, 2013 10:55 pm

That's a new one.

Maybe try making a simple queue instead of a queue tree and see if it still does it?

/queue simple
add disabled=no name=1meg queue=1m_upload-default/1m_download-default

simple queues are supposed to be like 8 times faster in ROS6 so usinga simple queue instead of a queue tree for this should have zero impact on performance.

once you have your findings you might want to report it in the ROS beta forum.
 
ners
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 99
Joined: Tue Mar 12, 2013 4:30 pm

Re: Upload suffers greatly when download is active

Wed Mar 20, 2013 9:37 am

Thank you, derr12. I'll try your suggestion with queues as soon as I complete testing of NAT performance.

Ultimately, I'm afraid simple queues are not an option for me, since I expect the amount of as many as 1000+ pppoe users to be connected to the NAS at the same time. I read somewhere here a post by a MT support guy that it is really better to use queue trees than simple queues with that many clients.

Anyway, I will be doing real world PPPoE testing next week (starting with ~300 online-at-the-same-time users of our branch office) and will report back with the results. This shaping problem really worries me.
 
derr12
Member
Member
Posts: 411
Joined: Fri May 01, 2009 11:32 pm

Re: Upload suffers greatly when download is active

Wed Mar 20, 2013 5:38 pm

That was true prior to ROS6. QOS has been re-done in version 6. Simple queue are processed as fast as queue tree's now, appearantly you can double QOS now.

I think PCQ got a performance boost too.
 
derr12
Member
Member
Posts: 411
Joined: Fri May 01, 2009 11:32 pm

Re: Upload suffers greatly when download is active

Wed Mar 20, 2013 5:40 pm

The other thing you could do since you are using PPPOE... what does your pppoe authentication, radius? you can set user speeds via radius attributes too. All they do is dynamically create a simple queue tho.
 
ners
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 99
Joined: Tue Mar 12, 2013 4:30 pm

Re: Upload suffers greatly when download is active

Wed Mar 20, 2013 6:52 pm

The other thing you could do since you are using PPPOE... what does your pppoe authentication, radius? you can set user speeds via radius attributes too. All they do is dynamically create a simple queue tho.
Yes, I authenticate users via RADIUS. Right now RADIUS supplies MT-Address-List attribute which puts the user's IP address into the appropriate address list.

I'll try simple queues instead of queue trees. I think I won't need to create one queue per user, only one queue per rate plan which will result in like 30 simple queues in the end.
 
derr12
Member
Member
Posts: 411
Joined: Fri May 01, 2009 11:32 pm

Re: Upload suffers greatly when download is active

Wed Mar 20, 2013 7:14 pm

We use radius to authenticate Ptmp wireless clients. I use aradial radius tho. You place the users in groups(home, business, etc). When the pppoe client asks the router for access it sucks down the radius attributes (including what speed they should get) and makes a simple queue automatically.


Considering the changes in ROS6, it might not be a bad "plan C".
 
ners
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 99
Joined: Tue Mar 12, 2013 4:30 pm

Re: Upload suffers greatly when download is active

Wed Mar 20, 2013 7:24 pm

Hmmm, was just reading through mikrotik wiki looking for info on simple queues and noticed this:

Flow Identifiers

target-addresses (multiple choice: IP address/netmask) : list of IP address ranges that will be limited by this queue.
interface (Name of the interface, or all) : identifies interface the target is connected to. Useful when it is not possible to specify targets addresses.
It seems I will have to either point at an interface to which the users are connected or set a target IP range for the queue to differentiate between upload/download traffic. If this is PPPoE (which is true in my case), every user is connected via his/her own virtual interface <pppoe-user_a>, <pppoe-user_b> and so on, so I can't really point at the correct interface for the whole src-address-list group.
Also target-addresses supports only IP ranges, not address lists, and as my users' IPs are not contiguous in any way (they are randomly distributed and are not in any way related) setting target-addresses will not work.

So it seems what I'm left with is the Plan C (every connected user gets his own simple queue) if all else with the queue tree fails.

Today I tried to replicate the problem on my home Mikrotik RB751G (ROS 5.24) and I got the same problem: setting up 1024k/1024k limit with PCQ and queue tree results in upload taking a hit when I'm downloading something. As soon as I raise the limit to 10Mbit/10Mbit the problem goes away -- i'm getting full upload when download is in progress.
 
derr12
Member
Member
Posts: 411
Joined: Fri May 01, 2009 11:32 pm

Re: Upload suffers greatly when download is active

Wed Mar 20, 2013 7:41 pm

Odd.. Ive used plain jane PCQ via simple rules minus the mangle rules with speeds as low as 512k/256k before without issue... someone else will have to chime in, im totally stumped.
 
ners
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 99
Joined: Tue Mar 12, 2013 4:30 pm

Re: Upload suffers greatly when download is active

Wed Mar 20, 2013 7:50 pm

Odd.. Ive used plain jane PCQ via simple rules minus the mangle rules with speeds as low as 512k/256k before without issue... someone else will have to chime in, im totally stumped.
Yes, minus the mangle rules. Something tells me this problem is related to packet marking. Something in that department could be sick. However, might be not...

If you're interested, you could probably replicate my setup which I described in the original post and see if you get this problem on your Mikrotik. (/ip fire mangle, /queue type, /queue tree parts).

As I'm experiencing the problem with both a CCR-1036 on ROS 6.0rc11 and an RB751G with ROS 5.24, this might be not a particular fault of my unit.
 
derr12
Member
Member
Posts: 411
Joined: Fri May 01, 2009 11:32 pm

Re: Upload suffers greatly when download is active

Wed Mar 20, 2013 9:28 pm

change the mangle chain to pre-routing and see what it does. In theory there should be no difference but i think forward might be after the queue tree and before simple queues in the new ROS6 packet map.

Who is online

Users browsing this forum: No registered users and 118 guests