How to shape slow net connection more equally?

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
witek
Posts: 233
Joined: 16. Nov 2009, 13:41
Location: Poland.Łódź

How to shape slow net connection more equally?

Post by witek »

I have a 512 Mb/s connection and I feel that windows XP deals better with it that F15. When I download a big file in a linux distribution then www pages don`t load at all or load very very slowly. When I do that on XP www pages load slowly bit by bit, however they do at all. Is there a switch to make linux shape the connection more equally?
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: How to shape slow net connection more equally?

Post by Shador »

A quick search reveals tons of results for traffic shaping/controll on linux.. I personally have no experiences setting this up. But this solution looks like what you want: http://lartc.org/wondershaper/
Linux afaik just treats traffic fair i e. FIFO, which is not necessarily the best for througput. If you have a router that might have a traffic controll solution too that affects all machines in the network or you could just limit download speed in your manager, that's what I do for p2p.
Image
User avatar
witek
Posts: 233
Joined: 16. Nov 2009, 13:41
Location: Poland.Łódź

Re: How to shape slow net connection more equally?

Post by witek »

I know there are special tools for shaping bandwidth but all I need is simple: each application or each connection to get equal amount of bandwith. I would assume this should have been default, but it looks as if it was not. I thought there might be some simple solutions like kernel parameter or /proc/net option.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: How to shape slow net connection more equally?

Post by mimosa »

I have a somewhat similar problem, but across the local network. For instance, if I'm downloading a torrent, browsing on the other Windows machines generally slows down to a crawl, even if the torrent itself is very slow.

I imagine there's little I can do about this inside my Linux box. In my case, it must be something to do with the router, as Shador suggests. And rubbish internet, of course.
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: How to shape slow net connection more equally?

Post by Shador »

witek wrote:I know there are special tools for shaping bandwidth but all I need is simple: each application or each connection to get equal amount of bandwith. I would assume this should have been default, but it looks as if it was not. I thought there might be some simple solutions like kernel parameter or /proc/net option.
The best scheduler entirely depends on the intended application. There is no solution that provides best results with any use case. Now why should we use your solution of equal bandwidth? Actually for example p2p programms create a bunch of connections thus would gain a much bigger share than any other program of the bandwidth.
The problem is that solutions which try to handle the traffic more "fair" as in equal shares (which is actually not the definition of fair here) provide worse throughput than really fair algorithms as in FIFO. This is not what you would want on server systems for example and they still are a major application of linux.


And I can't help you if you don't even consider looking at the solutions I suggested. A simple search for example would have turned up this:
http://linux-ip.net/articles/Traffic-Control-HOWTO/
and more specifically this:
http://linux-ip.net/articles/Traffic-Co ... ring-flows
The script I linked to previously is also just a script that configures functionality provided by the kernel (much like iptables firewalls). So your claim that it were a special tool for shaping bandwidth is not true either.
mimosa wrote:I have a somewhat similar problem, but across the local network. For instance, if I'm downloading a torrent, browsing on the other Windows machines generally slows down to a crawl, even if the torrent itself is very slow.

I imagine there's little I can do about this inside my Linux box. In my case, it must be something to do with the router, as Shador suggests. And rubbish internet, of course.
Nothing to blame the internet for. I suggest you limit torrents to have some unused bandwidth for browsing. Any decent downloader and torrent manager provides such functionality. Otherwise only the router or some other central instance can provide traffic shaping based on data type/port/source/... Technically you could also setup your network in such a way that all traffic is routed over some linux box that provides e.g. traffic shaping and forwards that to the router, if the router doesn't support it by itself.
This is a different problem though and could also be related to your local network or your internet provider.
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: How to shape slow net connection more equally?

Post by mimosa »

And I can't help you if you don't even consider looking at the solutions I suggested.
Is this meant for me or Witek? ;)
And rubbish internet, of course.
Nothing to blame the internet for. I suggest you limit torrents to have some unused bandwidth for browsing.
To be more accurate, a rubbish internet *connection*. The internet as such is not to blame. And I do use throttling.

Sounds like the ideal solution could be hacking the router somehow, as you suggest :)
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: How to shape slow net connection more equally?

Post by Shador »

mimosa wrote: Is this meant for me or Witek? ;)
witek, must have actually replaced his quote with yours ;)
mimosa wrote: To be more accurate, a rubbish internet *connection*. The internet as such is not to blame. And I do use throttling.

Sounds like the ideal solution could be hacking the router somehow, as you suggest :)
Probably, as I mentioned before throttling is enough for me. I tend to avoid traffic shaping as it can take up cpu power especially on low-ressource machines like routers. That's probably another reason why it's not enabled by default in the kernel.
Image
Post Reply