Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Me and my brother have a home server. It's an old pc with Slackware 11 on it.
The internet provider gives us 2.5MB speed. We have 1 cable that goes into a switch ( 10/100M ) and after that another cable that goes into the server. The problem is that if I start downloading something my speed can't cross 1.5MB what ever I do. It's not from the switch nor the server nor the cables or the OS. If I try to upload or download something from the server I do it with about 3-6MB/sec but when I try the net - 1.5MB....
I've thought "Hey my net ISP is limiting something ..." so I stopped the server and set up my desktop with the settings for my IPS and I was downloading/uploading with 2.5MB... This means that something is not configured right on the server....
So I get my net from ppp0 and eth0 is the local network.
Is there some default setting that limits the connection ? Another thing - how could you limit the connection ( If I know how to limit it I may discover how to unlimit it )
Also just cause you have 2.5MB bandwidth potential max doesn't mean you'll always get such speeds. Perhaps the server your downloading from only has a 1.5MB upload max. I can setup a machine on a GB switch with GB network card but am I always going to get GB speed? I doubt it. More details about your setup might be a little more useful to see if you can't get a little more out of it.
Me and my brother have a home server. It's an old pc(emphasis added) with Slackware 11 on it.
Have you considered the possibility that the file system interface on the "old pc" might be the bottleneck?
You can run tests to see how fast you can write to your file system on your "old pc" and your "desktop". If it takes a lot longer to create a 100 MB file on your "old pc" than your "desktop" then you know the file system interface is the problem. On your Slackware server, you can use
Code:
time dd if=/dev/zero of=/tmp/blah.dat bs=1M count=1024
to write a 1 GB file to see how long it takes to create a very large file. On an old machine here, I got the following result
Code:
[man@machine1:~]:time dd if=/dev/zero of=/tmp/blah.dat bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 35.363 seconds, 30.4 MB/s
real 0m35.436s
user 0m0.020s
sys 0m8.109s
On a more modern machine, I got
Code:
[man@machine2:~]:time dd if=/dev/zero of=/tmp/blah.dat bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 18.984 seconds, 56.6 MB/s
real 0m20.174s
user 0m0.024s
sys 0m12.089s
If your "old pc" is very slow, it may not be able to handle the simultaneous load of hundreds of network interrupts per second at the same time it is performing hundreds of disk writes per second.
If the file system turns out to be fast enough to handle the load, you can use Iperf to measure throughput across your network. You should be able to transfer data as fast as your switch or router allows (100 Mbps or 10 Mbps depending on the actual device). If you see something less than that, you can look at the values in
Code:
/proc/sys/net/core
/proc/sys/net/ipv4
There are a lot of "knobs" to turn in those directories, but if you are patient, you can find the one that will improve your throughput.
Have you considered the possibility that the file system interface on the "old pc" might be the bottleneck?
You can run tests to see how fast you can write to your file system on your "old pc" and your "desktop". If it takes a lot longer to create a 100 MB file on your "old pc" than your "desktop" then you know the file system interface is the problem. On your Slackware server, you can use
Code:
time dd if=/dev/zero of=/tmp/blah.dat bs=1M count=1024
to write a 1 GB file to see how long it takes to create a very large file. On an old machine here, I got the following result
Code:
[man@machine1:~]:time dd if=/dev/zero of=/tmp/blah.dat bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 35.363 seconds, 30.4 MB/s
real 0m35.436s
user 0m0.020s
sys 0m8.109s
On a more modern machine, I got
Code:
[man@machine2:~]:time dd if=/dev/zero of=/tmp/blah.dat bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 18.984 seconds, 56.6 MB/s
real 0m20.174s
user 0m0.024s
sys 0m12.089s
If your "old pc" is very slow, it may not be able to handle the simultaneous load of hundreds of network interrupts per second at the same time it is performing hundreds of disk writes per second.
If the file system turns out to be fast enough to handle the load, you can use Iperf to measure throughput across your network. You should be able to transfer data as fast as your switch or router allows (100 Mbps or 10 Mbps depending on the actual device). If you see something less than that, you can look at the values in
Code:
/proc/sys/net/core
/proc/sys/net/ipv4
There are a lot of "knobs" to turn in those directories, but if you are patient, you can find the one that will improve your throughput.
Thank you very much for this detailed information !
I learned many things. I know that my speed wont be exactly 2.5MB on every site but as I said - If i plug the cable directly to my desktop machine and start downloading from a Bulgarian site I download with about 2.0-2.5MB. If I make my connection thought the server I can't go up 1.5 (which is 50% less)...
This is what "time dd.." returned:
Code:
root@*:~# time dd if=/dev/zero of=/tmp/blah.dat bs=1M count=1024
1024+0 records in
1024+0 records out
real 4m7.108s
user 0m0.010s
sys 0m53.840s
root@*:~#
root@*:~# time dd if=/dev/zero of=/tmp/blah.dat bs=1M count=1024
1024+0 records in
1024+0 records out
real 4m7.108s
user 0m0.010s
sys 0m53.840s
root@*:~#
I don't know if this is bad or good...
Code:
real 4m7.108s
Four minutes to create a 1GB file is 4.1 MB/s. That is very slow. You can assume that is the total bandwidth of your CPU (since the bandwidth of even the slowest ATA interface will be much faster than that).
Assuming a 50/50 CPU bandwidth split with the network interface, you can calculate that your maximum possible file transfer speed is 2.05 MB/s which is close to what you are seeing.
You need a faster CPU (and possibly faster RAM) to see faster transfer speeds.
You are incredible
Thank you VERY much for this valuable information !
My server is 200Mhz with 64ram in the moment... it's a really old machine. I though that was the problem in first place but when I tested with local upload/download I got confused.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.