# slow network (part of it) [SOLVED, partially^^]

## Dieter@be

fileserver: p3 450MHz with recent (if not latest) software (i emerge sync & update world recently)

Network: 100Mb/s

the samba on it performs really slow ( 100~800kB/s) when copying files to my computer

i tested with netio and it gives me a 11+ MB/s rate so the link between the fileserver and my computer shouldnt be the problem

btw it doesnt matter if my computer has booted gentoo or windows, its always slow!

with an other computer on this lan, samba reads give decent speed (6+ MB/s)

hard disks: boot & root = reiserfs, with more then enough free diskspace, hdparm gives me 20-30MB/s

btw i think the problems started after i emerged apache(2),php5 or mysql ; however, even if they are running, they take very little cpu and little ram (and no bandwith), when i disable all 3 of them there is no change.  However, i think that before i emerged them, the speed was okay

(all 3 of them are stable packages since a few days btw)

 *Quote:*   

> ifconfig -a eth0
> 
> eth0      Link encap:Ethernet  HWaddr 00:02:B3:61:9A:88
> 
>           inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
> ...

 

I did a few minor performance tweaks in smb.conf but it didnt help

http://pastebin.com/527568Last edited by Dieter@be on Tue Jan 31, 2006 7:10 pm; edited 2 times in total

----------

## blu3bird

Hi,

do not compare netio with samba  :Wink: 

for example netio says my line could make 40 up to 55mb/s but with samba i get about 25mb/s(which is quite normal)

Your ifconfig output shows 283 errors and since both os's are slow it is probably an hardware error. I whould suggest replacing eighter the cable or the card itself.

----------

## Aonoa

I would suggest actually trying a different method of transferring files, such as ftp in order to truly know if your network is working properly. Don't use scp (ssh file copy), because it uses encryption and your slow Pentium3 machine would be the bottleneck there, not the network.

----------

## Dieter@be

1) I know that samba file transferring is not very optimal (compared to ftp or nfs or whatever), but i have many windows machines, and it is very user-friendly, i want to use it.

Besides i'm perfectly satisfied with a rate of 6-8 MB/s which should work perfectly (it works with another machine on this lan, and it worked perfectly on this machine too, untill a few weeks ago) 

2)I know that samba transferring goes (much) slower then netio benchmarks, i just benched the link to find out if this was the problem.  I dont think there is a problem with the network link if it can perfectly sustain 11MB/s

----------

## Aonoa

I just mentioned ftp as a network test.  :Smile:  I assume you haven't changed your smb.conf before this happened? could you try transferring something through samba and at the same time browse the internet or some other action that will use bandwidth. See if generating more traffic at the same time will speed it up.

----------

## Dieter@be

first i installed samba, kept smb.conf default (except the share settings themselves offcourse) and i got good 6+MB/s speeds

then for some reason the speed got killed, and since then i reach 1 MB/s maximum.  I didnt do much to invoke this, except maybe emerging some other packages

its only after that i started tinkering with the other smb.conf options (not that i noticed a performance gain because of it   :Wink:  )

btw didnt really notice a performance increase while doing stuff like surfing (or loading 20 websites at once   :Wink:  )

(but i lack the tools for measuring the traffic of 1 specific application, i can only measure the total traffic)

----------

## Aonoa

I have had my own share of performance issues with samba shares as well, and nothing I ever did in smb.conf ever made any difference either. I stream my movies through a samba share, samba is easy to use there's nothing to say about that. As a networking protocol however I really don't like it, I'm considering using shfs instead.

Which filesystem are you using, smbfs or cifs? If you are using smbfs, remove smbfs support and try using cifs only.

```
mount -t cifs /server/share /mnt/point
```

----------

## Dieter@be

hm i think smbfs, i might change it to cifs when i'm in linux, but even when on windows on my computer it goes equally slow (1MB/s MAX download)

funny remark though, i can upload at a rate of 7+MB/s, so its only the download speed

----------

## Aonoa

That is quite odd, same with Linux and Windows? 7MB/s up but <1MB/s down? Weird.   :Surprised: 

Sure it's not a hardware problem then, tried changing the NIC (Network Card) or something?

----------

## Dieter@be

jep, as stated, both on windows and linux on the same system, connected to the fileserver, didnt change anything because network benchmarks give me 11+MB/s tcp traffic

----------

## Aonoa

Benchmarking is one thing, have you tried actual traffic? or does the software send tcp traffic? I can't say I have a clue as to what's wrong then.

----------

## Dieter@be

I found the problem! if you want to know how i found it, read this:

Lets say :

 :Arrow:  Fileserver with samba = A

 :Arrow:  my computer = B

 :Arrow:  the other computer on the lan that gives no problems = C

ftp results: (pure-ftpd server on A, bulletproof ftp server on B, using file of +/- 100MB)

B->A 4-5MB/s

A->B 100~400~800 kB/s ... exactly the same speed as samba (so its not samba's fault).  

C->A about 7MB/s 

A->C 10MB/s !!

B->B upload 12MB/s and climbing 

B->B download 46MB/s (  :Laughing:  )

B->C 7MB/s 

C->B less then 1MB/s ...

so I guess we have found the problem here, sort of... its not samba, its not even the fileserver at all, its just all uploads towards my computer (B) that go wrong, so i'll do some further (hardware) testing...

----------

## Aonoa

Nothing like a bit of thorough network testing.  :Smile:  So it's your computer's (B) input/recieving that's faulty in some way. I'll give it some thought and let you know if I have any ideas. I'm interested in knowing how this is resolved.

----------

## Dieter@be

I have no idea why, but I just unplugged the power from the switch and disconnected and plugged in all the network cables again, and all was just fine again   :Very Happy:   :Confused:   :Surprised: 

i'm just guessing, maybe it was some kind of "noise, build-up" ? caused by using UTP cables and electrical interference or something...

anyway, even samba gives me 10MB/s of traffic now   :Laughing:  (sorry for suspecting you, my dear samba)

thanks Heion and blu3bird

----------

## Aonoa

What kind of switch do you have? and what type of network cards do you have in the three computers? is this the first time you have had any form of unnatural networking error like this?   :Confused: 

----------

## Dieter@be

3com officonnect 100Mbps

all computers have intel 100Mbps cards, except mine, who has nvidia onboard 100Mbps

yep, never had anything like this   :Confused: 

btw my computer and the samba server are connected to the switch with utp cables of 1m or 1,5m or so

computer C has an utp cable of like.. 50metres   :Laughing: 

----------

## Aonoa

In my experience different makes of networking hardware does not work nicely together 100% of the time. What I mean is, they could cause weird problems like this. I think I would have used an external card, maybe a 3Com in your computer instead of the onboard nvidia one. I doubt it's your cabling unless they are homemade or badly made, check if all the pairs match up inside the RJ-45 end-plugs.

----------

## nico_calais

I think it's a negotiation problem with the network card. 

I never looked for it in Linux so I don't know how the auto-negotiation works. 

On a windows server, the network card was configured in auto-nagotiation and the rasfert rate was shit from the server to my PC  (From my PC to the server it was ok).  I  forced the negotiation to 100Mbps/full and the transfert rate was fine.

----------

