LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-16-2008, 12:31 PM   #1
alpha_hack
Member
 
Registered: Jul 2007
Location: Sofia, Bulgaria
Distribution: Slackware 13.1x86_64
Posts: 75

Rep: Reputation: 15
Question Slackware server ( network problem... )


Hey,

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....

ifconfig:
Code:

eth0      Link encap:Ethernet  HWaddr **:**:**:**:**:**  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20e:2eff:fe95:c34a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:153051191 errors:57 dropped:130 overruns:26 frame:0
          TX packets:147246539 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3492006881 (3330.2 Mb)  TX bytes:787993544 (751.4 Mb)
          Interrupt:11 Base address:0x6500 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4417 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4417 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:579540 (565.9 Kb)  TX bytes:579540 (565.9 Kb)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:***.***.***.***  P-t-P:***.***.***.***  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:65483421 errors:0 dropped:0 overruns:0 frame:0
          TX packets:84541643 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:2770589270 (2642.2 Mb)  TX bytes:4043721561 (3856.3 Mb)
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 )

If somebody has a question feel free to ask me




Thanks in advance,
tftd
 
Old 07-16-2008, 02:29 PM   #2
pruneau
Member
 
Registered: Jul 2008
Location: Montreal
Distribution: Debian/Fedora/RHEL
Posts: 45

Rep: Reputation: 15
I'm no sure I understand your network setup when everything is plugged in and up. Do you have a router/modem ?
 
Old 07-16-2008, 03:07 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 07-16-2008, 03:45 PM   #4
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by alpha_hack View Post
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.
 
Old 07-16-2008, 05:22 PM   #5
alpha_hack
Member
 
Registered: Jul 2007
Location: Sofia, Bulgaria
Distribution: Slackware 13.1x86_64
Posts: 75

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by David1357 View Post
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@*:~#
I don't know if this is bad or good...
 
Old 07-17-2008, 05:15 PM   #6
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by alpha_hack View Post
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@*:~#
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.
 
Old 07-17-2008, 08:42 PM   #7
alpha_hack
Member
 
Registered: Jul 2007
Location: Sofia, Bulgaria
Distribution: Slackware 13.1x86_64
Posts: 75

Original Poster
Rep: Reputation: 15
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.

Once again - Thank you !
 
  


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
Add Slackware Server to Home Network iseeuu Linux - Server 5 12-16-2007 08:18 PM
Slackware 10 network configuration. Problem with 8139 network card drivers ! Padmakiran Linux - Networking 8 03-27-2007 06:48 AM
slackware server/network question barn63 Slackware 2 05-05-2006 12:09 AM
Slackware Network Server peachy Slackware 3 02-20-2005 12:34 AM
network connection slow to server on slackware niehls Linux - Networking 2 04-30-2003 07:13 AM

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

All times are GMT -5. The time now is 11:41 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