LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-03-2004, 08:08 AM   #1
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
Linux router = slower downloads


I really notice it with kazaa. Now that I've got my linux server acting as a router, kazaa only downloads around 4Kb. When I plug the cable modem directly to my desktop, I can get 20-50Kb depending on how many users have the file.

Does someone know why my linux router would cause this? I have port 1214 open on the firewall which is the port I've read that kazaa uses.


THanks
 
Old 08-03-2004, 04:42 PM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Your Linux box has introduced a bottleneck. It could be that your networking cards are too slow (10BaseT or coaxial won't give you 50kbps).

When you say “router” I assume you have two network cards? In which case, another possibility is that the motherboard is too slow to transfer the data between them efficiently. Make sure that they are both using DMA.

It could also be that the networking side of the Linux kernel isn't optimal. Try recompiling the kernel. By the way, there's a slightly dangerous trick you might want to try when you're doing this, and that is to change the HOSTCFLAGS and HOSTCXXFLAGS from -O2 to -O3 in the kernel's Makefile. This may break some drivers; others will work fine (rather hit-and-miss) but you will also notice a significant speed increase if it works. (Remember to keep the old kernel to fall back on if it doesn't).

Hope that helps,

— Robert J. Lee
 
Old 08-03-2004, 09:07 PM   #3
w33k
Member
 
Registered: Aug 2004
Distribution: Mandrake 10, Gentoo, and FreeBSD
Posts: 61

Rep: Reputation: 15
yeah, its a bottleneck somewhere in the hardware most likely.....

--Things to Check--

-Motherboard Speed
-RAM
-Processor
-Type of Ethernet Card (10Mbps ISA is slower than 10Mbps PCI)
 
Old 08-03-2004, 09:09 PM   #4
w33k
Member
 
Registered: Aug 2004
Distribution: Mandrake 10, Gentoo, and FreeBSD
Posts: 61

Rep: Reputation: 15
it shouldn't have anything to do with the kernel.....
 
Old 08-03-2004, 10:07 PM   #5
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Original Poster
Rep: Reputation: 46
Ok. I'll give the answers to everyones questions/assumptions.

The system is
1ghz cpu
512 RAM PC133
both nics are PCI 10/100

How to I verify or enable DMA on the NICs?
This server does a lot of services for the internal network, but because there are a max of 10 computers and most of the time only 3 are actually on, I wouldn't think its too much of a load on it.
 
Old 08-04-2004, 04:09 AM   #6
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Are several computers using the router at the same time? If so, do you have an ethernet hub or a switch?

If you have a hub, and two or more computers send packets at the same time, their packets will collide, and both PCs will retry after a short random timeout. This approach gives a much lower bandwidth than using a switch or a direct (unshared) connection.

Also, check that the 100/10baseT light on the NICs (or the hub) indicates that both NICs are running at 100baseT, rather than 10baseT.

You can find out what DMA channels are being used for by looking at the /proc/dma file.
 
Old 08-04-2004, 09:25 AM   #7
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Original Poster
Rep: Reputation: 46
Its a switch, and the max computers being used at the same time are 2 or 3.

If I cat /proc/dma I get this

4:cascade


So, I don't think anything is using DMA. How to I make things use DMA
 
Old 08-04-2004, 11:03 AM   #8
w33k
Member
 
Registered: Aug 2004
Distribution: Mandrake 10, Gentoo, and FreeBSD
Posts: 61

Rep: Reputation: 15
hmm... your system looks pretty good... its simply that when there are more computers on the internet at the same time, they each take up more bandwith..... thus taking away from your computer with kaza..... try using just your kaza computer and see if you get full speed....... the only way to give you a faster connection while other users of your network online is to upgrade to a faster connection / get a dual connection
 
Old 08-04-2004, 11:25 AM   #9
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
there is everything right with your hardware. it's more likely too fast ;-)

i think about your firewall. just switch it off (except nat for now, if in use.) the firewall and messure performance. if this doesn't help, raise the values in (for 2.4-kernel, maybe 2.6 too)
/proc/sys/net/core:
rmem_default, wmem_default, rmem_max, wmem_max (~double)
/proc/sys/net/ipv4:
tcp_rmem and tcp_wmem to ~ 4096 87380 2097152
enable (echo "1" >):
tcp_sack, tcp_fack, tcp_window_scaling
disable (echo "0" >):
tcp_ecn

maybe tune your mtu on your outgoing interface to ~1464 if your overall performance is too low/high latency.

have a look at the dsl howto about tuning the device (www.tldp.org).

sl mritch.
 
Old 08-04-2004, 05:09 PM   #10
zaphodiv
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 30
All the answers given so far are almost certainly wrong.

This problem is because your kazaa client cannot receive incoming connections when it is behind a connection sharing system.

To transfer data from one computer to another over the internet one computer has to open a
connection to another.
When your computer is behind your linux NAT router your computer can open connections to other
machines but other kazaa users out on the internet cannot initate a connection to your machine.

You only have one internet ip address. When the linux box receives an attempt to connect to the kazaa port it refuses it. You have to configure port forwarding on the linux box to allow incoming kazaa connections to reach the machine running kazaa.

Lot's of people use kazaa behind connection sharing systems. You can't exchange files with those
people when your client is NATed or firewalled.
 
Old 08-04-2004, 08:40 PM   #11
w33k
Member
 
Registered: Aug 2004
Distribution: Mandrake 10, Gentoo, and FreeBSD
Posts: 61

Rep: Reputation: 15
Quote:
Originally posted by rjlee


......Also, check that the 100/10baseT light on the NICs (or the hub) indicates that both NICs are running at 100baseT, rather than 10baseT........

[/B]

Shouldn't have anything to do with this...... his net connection isnt faster than 10Mbps..... you should have a 10/100 card for the link to the switch/hub if your running any internal services....
 
Old 08-05-2004, 11:23 AM   #12
w33k
Member
 
Registered: Aug 2004
Distribution: Mandrake 10, Gentoo, and FreeBSD
Posts: 61

Rep: Reputation: 15
Quote:
Originally posted by zaphodiv
All the answers given so far are almost certainly wrong.

This problem is because your kazaa client cannot receive incoming connections when it is behind a connection sharing system.

To transfer data from one computer to another over the internet one computer has to open a
connection to another.
When your computer is behind your linux NAT router your computer can open connections to other
machines but other kazaa users out on the internet cannot initate a connection to your machine.

You only have one internet ip address. When the linux box receives an attempt to connect to the kazaa port it refuses it. You have to configure port forwarding on the linux box to allow incoming kazaa connections to reach the machine running kazaa.

Lot's of people use kazaa behind connection sharing systems. You can't exchange files with those
people when your client is NATed or firewalled.

yes, that is true if people are downloading from him. but in this case, he's talking about downloading files from other people, which he can do, but, are slow.....


back to the problem..... im still stumped
 
Old 08-06-2004, 10:38 AM   #13
zaphodiv
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 30
Quote:
yes, that is true if people are downloading from him. but in this case, he's talking about downloading files from other people, which he can do, but, are slow.....
Wrong. When you download from a webserver your browser allways initiates the connection between it and the server. Filesharing programs can and do initiate connections from either end. If it did not work this way then firewalled/NATed clients would not be able to upload.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fast torrents downloads behind router on Gentoo ? KaZiber Linux - Networking 4 09-20-2005 06:35 AM
apt-get dist-upgrade downloads slower than d4x exit3219 Debian 4 09-01-2005 06:23 AM
Why is Mandrake/KDE getting slower and slower? KWTm Mandriva 12 09-28-2004 09:43 PM
Internet connection becomes slower and slower. caesius_01 Linux - General 1 03-14-2004 02:59 PM
Linux slower? Cutlass Linux - Newbie 9 10-01-2002 05:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration