Solved

linux machine - upload extremely slow

Posted on 2004-08-25
15
589 Views
Last Modified: 2010-03-18
hi !!

i've got root access to a machine (i dunno the linux version number, its either redhat 8 or 9) ... i can only log on remotely using ssh

i'm on a 10/100 mbit LAN

after logging in thru ssh, when i try downloading a file thru ftp , it comes pretty fast .. (i.e., the normal speed that it should come at .. say 2 MB/s)

however, when i try uploading to the ftp, the speed is pathetic (around 50 KB/s) ..

there's nothing wrong with the FTP .. i tried 3 different machines running FTP servers, and in all cases, the same thing was happening ..

its as if there is a restriction on the upload bandwith ..

can someone help me ?? i have root access, but have very little knowledge on working with linux .. and have no idea what to do ...

thanks :)
muskad202
0
Comment
Question by:muskad202
  • 7
  • 4
  • 4
15 Comments
 
LVL 2

Author Comment

by:muskad202
ID: 11895220
forgot to mention .. the linux machine is running a firewall, and only allows SSH into it ..
0
 
LVL 1

Expert Comment

by:master_chris
ID: 11899112
If you are SSH into the Linux box i guess you are going over ADSL/ or some sort of internet connection..  

What has FTP'ing got to do with this???

50kb per second is quick for upload.. thats close to a 512kilobit upload speed.

If you have two linux Boxes. try to (scp) your files over.

0
 
LVL 2

Author Comment

by:muskad202
ID: 11899540
after i get into the linux machine (using SSH) .. i need to transfer a file out of it  onto my machine .. for that purpose i'm using ftp

its not actually than 50 kb/s (just made it up) .. dunno the exact speed , but it took me nearly 14 hours to transfer a 300 mb file out of it .. which is pretty slow considering that it took me just 10 minutes to transfer the same file into it !!!!

i used ssh ftp (is that what is meant by scp ??) (using a ssh client for windows) initially, but it was transferring at the same pathetic speed ... :(
0
 
LVL 1

Assisted Solution

by:master_chris
master_chris earned 25 total points
ID: 11899572
Are you tranfering over the internet???


scp is a form of encryted file tranfer through SSH.

e.g. "scp chris.doc -C root@140.139.4.5:/tmp"
-C = compression on..

If you are trying to tranfer something from your Linux machine locally to a workstation. The easiest way is to create a windows share through samba. in /etc/smb.conf or /etc/samba/smb.conf

[Chris]
   comment = "Chris"
   path = /home/samba
   public = yes
   printable = no
   writable = no

This would make /home/samba  
a windows share. browseable from windows

0
 
LVL 2

Author Comment

by:muskad202
ID: 11901139
nope .. the transfer is thru the LAN ..

i can't use samba becoz there is a firewall .. and i have no idea on how to turn it off ..

is there a possibility of a bandwith estriction being in place ?? and if so, how do i turn it off ??
0
 
LVL 40

Accepted Solution

by:
jlevie earned 35 total points
ID: 11901599
This sounds like it might be a link mode negotiation failure. That occus when one end of a network connection is using a different mode than the other (FDx/HDX). The ususal fix is to force one or both ends of the link to the correct mode (Full Duplex for a switch or Half Duplex for a hub). Most 10/100 ethernet interfaces can be queried/setwith mii-tool. Whether the switch/hub port can be set depends on the device.
0
 
LVL 2

Author Comment

by:muskad202
ID: 11902293
any tips on how i could go about checking whether that is indeed the problem, and remedy it ?? but, how come this problem doesn't occur when i am uploading to the linux machine .. only when i am downloading from it ??
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Expert Comment

by:master_chris
ID: 11908441
huh? you cant use samba because you have a firewall???

isnt your firewall set up at all?
to turn it off try this
/etc/rc.d/init.d/./firewall stop
or
/etc/rc.d/init.d/./iptables stop

man get samba working. its the easiest way to do it.
\
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11908870
A link mode negotiation can affect one or both data transfer directions, dpending on which end of the link has the problem. You have to make sure that each machine has correctly negotitated the appropriate link mode for what they connect to. Note that for more complex network paths involving routers the probblem can lie between the routers.

On the Linux box you can run mii-tool and it will report the link status, like:

root# mii-tool
eth0: negotiated 100baseTx-FD, link ok
0
 
LVL 2

Author Comment

by:muskad202
ID: 11909690
hi !!

i switched off the firewall, and started samab .. tried copying the file, but same problem as before .. windows was showing the estimated time to copy the file as 9 hours,  .. left it on for abou half an hour (the copying process), and it was yet showing 9 hours .. :(

i tried mii-tool also, but got an error :
-->
SIOCGMIIPHY on 'eth0' failed: Operation not supported
no MII interfaces found

(thanks for your help ...)
muskad202
0
 
LVL 1

Expert Comment

by:master_chris
ID: 11909710
hmmmm

you need to test packet loss.

try to ping the Linux server from a workstation, same with workstation to workstation. you could have a cable issue.

or another possibility is your hub/switch is screwed!
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11909802
> SIOCGMIIPHY on 'eth0' failed: Operation not supported

Were you executing the command as root? If you were you've got one of the devices not supported by mii-tool. What NIC do you have ('cat /proc/pci' should tell)
0
 
LVL 2

Author Comment

by:muskad202
ID: 11910498
Hi !!

/proc/pci :

----
PCI devices found:
  Bus  0, device   0, function  0:
    Host bridge: ServerWorks CNB20LE Host Bridge (rev 6).
      Master Capable.  Latency=96.  
  Bus  0, device   0, function  1:
    Host bridge: ServerWorks CNB20LE Host Bridge (#2) (rev 6).
      Master Capable.  Latency=96.  
  Bus  0, device   1, function  0:
    VGA compatible controller: S3 Inc. Savage 4 (rev 4).
      Master Capable.  Latency=248.  Min Gnt=4.Max Lat=255.
      Non-prefetchable 32 bit memory at 0xfeb80000 [0xfebfffff].
      Prefetchable 32 bit memory at 0xf0000000 [0xf7ffffff].
  Bus  0, device   2, function  0:
    Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 8).
      IRQ 15.
      Master Capable.  Latency=96.  Min Gnt=8.Max Lat=56.
      Non-prefetchable 32 bit memory at 0xfeb7f000 [0xfeb7ffff].
      I/O at 0x2000 [0x203f].
      Non-prefetchable 32 bit memory at 0xfea00000 [0xfeafffff].
  Bus  0, device  15, function  0:
    ISA bridge: ServerWorks OSB4 South Bridge (rev 80).
  Bus  0, device  15, function  1:
    IDE interface: ServerWorks OSB4 IDE Controller (rev 0).
      Master Capable.  Latency=64.  
      I/O at 0x700 [0x70f].
  Bus  0, device  15, function  2:
    USB Controller: ServerWorks OSB4/CSB5 OHCI USB Controller (rev 4).
      IRQ 10.
      Master Capable.  Latency=96.  Max Lat=80.
      Non-prefetchable 32 bit memory at 0xfeb7e000 [0xfeb7efff].
  Bus  1, device   3, function  0:
    SCSI storage controller: Adaptec AIC-7892P U160/m (rev 2).
      IRQ 9.
      Master Capable.  Latency=96.  Min Gnt=40.Max Lat=25.
      I/O at 0x2100 [0x21ff].
      Non-prefetchable 64 bit memory at 0xeffff000 [0xefffffff].
  Bus  1, device   7, function  0:
    Ethernet controller: Intel Corp. 82543GC Gigabit Ethernet Controller (rev 2).
      IRQ 10.
      Master Capable.  Latency=96.  Min Gnt=255.
      Non-prefetchable 32 bit memory at 0xeffc0000 [0xeffdffff].
      Non-prefetchable 32 bit memory at 0xeffe0000 [0xeffeffff].
---

this make no sense to me :) ..
0
 
LVL 2

Author Comment

by:muskad202
ID: 11910504
master_chris: pinging works fine ..
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11915557
My guess, right now, is that you are using RedHat 9 and it hasn't been updated. The kernel shipped on the CD's has problems with certain NIC cards, the Intel card being one of them. On one of my RedHat 8/9 systems I can see:

  Bus  0, device   6, function  0:
    Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (#2) (rev 8).
      IRQ 31.
 
in /proc/pci and executing mii-tool yields:

eth0: negotiated 100baseTx-FD, link ok
eth1: no link


Since that same command, on the same hardware, fails on your system the most probable cause is that the system needs updating. However, it also could be a BIOS problem and I'd recommend checking with your MB vendor for a later BIOS version.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now