Koozali.org: home of the SME Server

Cifs mount is very slow

Offline Belial

  • *
  • 11
  • +0/-0
Cifs mount is very slow
« on: January 02, 2012, 09:23:26 PM »
I was going to say hello, but i must confess i'm a bit upset ! I've screwed the captcha, and my whole message is just gone...  :x

Edit : third attempt, now, the system says that i have already post my message  :(

So, i just have to start again.

I'm lookig for some help to have decent performance when writing data from sme server to a Windows XP share.

I mounter the share with mount.cifs. I managed to backup my data (around 17 Go), but transfert rate was around 3.5 mbps on a 100 mbps network



Here is some test i've done. I've transferred the same file three times. The file is around 64 Mo.

First (35 % bandwidth) is a transfert using the explorer from xp client to an ibay. Fine.

Second, if getting the file back, using http. i used firefox on the XP client. Bandwidth is a little higher. Fine again.

Third, is a transfert using a comand like
Code: [Select]
cp NVIDIA_9600GS_91.47_Win2KXP.zip /mnt/smb/This is slow. Bandwidth is stuck to 5 %

If you have any suggestions, it would be great !

Now, some information on my system.

I'm running SME Server 7.5.1
smbclient --version gives : version 3.0.33-0.34.el4
TCP_NODELAY is present is smb.conf

Code: [Select]
ifconfig
eth0      Link encap:Ethernet  HWaddr 00:48:54:51:E4:03
          inet adr:192.168.1.200  Bcast:192.168.1.255  Masque:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:27261221 errors:359 dropped:1518 overruns:148 frame:0
          TX packets:42809497 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          RX bytes:3917147076 (3.6 GiB)  TX bytes:425122888 (405.4 MiB)
          Interruption:169 Adresse de base:0xde00

lo        Link encap:Boucle locale
          inet adr:127.0.0.1  Masque:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:133849 errors:0 dropped:0 overruns:0 frame:0
          TX packets:133849 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0
          RX bytes:237022344 (226.0 MiB)  TX bytes:237022344 (226.0 MiB)

[root@nidamour ~]# dmesg | grep eth0
divert: allocating divert_blk for eth0
eth0: RealTek RTL8139 at 0xde00, 00:48:54:51:e4:03, IRQ 169
eth0:  Identified 8139 chip type 'RTL-8139B'
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1



Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Cifs mount is very slow
« Reply #1 on: January 03, 2012, 10:02:55 PM »
Third, is a transfert using a comand like
Code: [Select]
cp NVIDIA_9600GS_91.47_Win2KXP.zip /mnt/smb/This is slow. Bandwidth is stuck to 5 %

If you have any suggestions, it would be great !

I suspect you are discovering limitations in the file server capabilities of Windows XP.

Offline Belial

  • *
  • 11
  • +0/-0
Re: Cifs mount is very slow
« Reply #2 on: January 03, 2012, 10:38:05 PM »
I suspect you are discovering limitations in the file server capabilities of Windows XP.

...I suspect you are right  :lol:

I tried some other file transfert, from XP to XP workstation. It's a bit faster, but still very slow (and not very stable). Bandwidth fluctuate between 5 and 20 %.

I think i will make following backups on an usb drive, connected to the sme-server. I've seen the backupPC contrib, that seems to to the job.

Thanks. May be my question would have more answers on some XP forum, then.


Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Cifs mount is very slow
« Reply #3 on: January 03, 2012, 10:56:25 PM »
You can use a second SME server as the destination of the backups.

Offline Belial

  • *
  • 11
  • +0/-0
Re: Cifs mount is very slow
« Reply #4 on: January 03, 2012, 11:04:13 PM »
You can use a second SME server as the destination of the backups.

I'm afraid another server might not be wife-compliant (...maybe a small one  :-D )

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: Cifs mount is very slow
« Reply #5 on: January 05, 2012, 03:47:47 PM »
I'd  like suggest you to test your network using another computer running linux.
Maybe a boot from a Ubuntu live cd.

Transfer a big file (1GB) using scp, ftp and smb in Ubuntu.
If you have same throughput so you have a infra problem.
On a 100M network transfer speed should be close to 10M/s .
On a 1GB network transfer speed should be close to 30M/s (at least that's mine!)

Slow CPU or slow HDD (on any side of transfer) will slow down.
If your NIC is not ok, or your cable is not ok... you'll have problems.

You can see what speed your computer is connecting ? (10 or 100) ?
On server side, you can run "ethtool eth0" and discover if 100 or 10.
See an example:
Code: [Select]
[root@guepardo ~]# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes:   10baseT/Half 10baseT/Full
                        100baseT/Half 100baseT/Full
                        1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full
                        100baseT/Half 100baseT/Full
                        1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: g
Current message level: 0x000000ff (255)
Link detected: yes


This server NIC is running at Gigabit Full Duplex:
   Speed: 1000Mb/s
   Duplex: Full

And my MacMini can copy data to them at 24MB/s:
Code: [Select]
macmini:~ jader$ scpk antinsect2.iso root@guepardo:
antinsect2.iso                                                                               100% 1077MB  24.5MB/s   00:44   
macmini:~ jader$

and I'm not happy... should be higher... but for now... it's all I can get.
I'll try to find out why it's just 24 to 30MB/s ASAP!

Regards and good luck to you.

Jáder
« Last Edit: January 05, 2012, 03:49:21 PM by jader »
...

Offline Belial

  • *
  • 11
  • +0/-0
Re: Cifs mount is very slow
« Reply #6 on: January 05, 2012, 04:08:21 PM »

You can see what speed your computer is connecting ? (10 or 100) ?
On server side, you can run "ethtool eth0" and discover if 100 or 10.


I've already tested this one. Got the following 100Mbps full duplex.

(I was in my first post, but you have to scroll down).

Code: [Select]
[root@nidamour ~]# dmesg | grep eth0
divert: allocating divert_blk for eth0
eth0: RealTek RTL8139 at 0xde00, 00:48:54:51:e4:03, IRQ 169
eth0:  Identified 8139 chip type 'RTL-8139B'
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

I will perform additional testing this evening.

Already have successful transfer using http, though.

Offline Belial

  • *
  • 11
  • +0/-0
Re: Cifs mount is very slow
« Reply #7 on: January 05, 2012, 08:56:04 PM »
Now, it's geting strange...

So. I've setup a sme-server, inside a Virtual Box (sorry, no spare PC available).

1. local guest to sme-server : network utilization is 100 % (100 Mbps). So, i don't have performance issue.
2. sme-server (the real one) to sme (in virtual box), using cifs mount. it's so slow i can see the bytes going through the cable  :D
3. XP client (other one) to sme in virtual box. network utilization is around 40 %. Which is very good.

Another strange thing : i can't stop the cp command. Not with ctrl-c, and not with ctrl-z either. kill -9 does not work... Looks like the 'cp' has gone 'zombie'. Is it possible my sme box got hacked ? It's in server only mode; behind a D-Link DSL-604. Only http port has been forwarded to the server.

PS: Once again, a wrong captcha, and my post is gone. Only this time, i saved it before Posting

Offline Belial

  • *
  • 11
  • +0/-0
Re: Cifs mount is very slow
« Reply #8 on: January 05, 2012, 09:07:27 PM »
Finaly, an ftp transfert, from sme-server (real one) to sme (virtual box).

About 120 Mbytes / minute -> around 30 mbps. (don't have monitoring).

Edit : ftp stats : 859275264 bytes sent in 401 secs (2.1e+03 Kbytes/sec)
« Last Edit: January 05, 2012, 09:12:37 PM by Belial »

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: Cifs mount is very slow
« Reply #9 on: January 06, 2012, 10:01:59 AM »
ok...great news... your network is 100Full and you can get it going thru this speed.

Now try to create two new virtual machines: one Ubuntu and one WinXP and do same tests.
If you can get 30Mbps on Ubuntu but not in WinXP, you'll know XP is the problem and start looking for answers on XP forums.
(I'll make a server migration this weekend and will have several Ubuntu and ONE WinXP... if I get time I'll measure throughput on both of them).
...

Offline Belial

  • *
  • 11
  • +0/-0
Re: Cifs mount is very slow
« Reply #10 on: January 13, 2012, 05:42:19 PM »
Sorry for late answer, but one of my computers had ram issues.

I made some additional testing with MTU. It seems that it is badlw configured.

Code: [Select]
ping -s 1472 www.dslreports.com
PING www.dslreports.com (209.123.109.175) 1472(1500) bytes of data.
From pc-00001.homeip.net (192.168.1.1) icmp_seq=0 Frag needed and DF set (mtu = 1492)
1480 bytes from www.dslreports.com (209.123.109.175): icmp_seq=1 ttl=53 time=135 ms

I got the same issue on XP box. I'm now reading some documentation to fix all that.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Cifs mount is very slow
« Reply #11 on: January 13, 2012, 05:58:44 PM »
I made some additional testing with MTU. It seems that it is badlw configured.

Code: [Select]
ping -s 1472 www.dslreports.com
PING www.dslreports.com (209.123.109.175) 1472(1500) bytes of data.
From pc-00001.homeip.net (192.168.1.1) icmp_seq=0 Frag needed and DF set (mtu = 1492)
1480 bytes from www.dslreports.com (209.123.109.175): icmp_seq=1 ttl=53 time=135 ms

I believe that is normal, not misconfiguration. Your Internet link cannot have an infinite MTU, so if you use DF you will discover a maximum packet size.

If you don't want to see that message, use:

Code: [Select]
ping -s 1472 -M dont www.dslreports.com

Offline Belial

  • *
  • 11
  • +0/-0
Re: Cifs mount is very slow
« Reply #12 on: January 13, 2012, 06:11:13 PM »
I believe that is normal, not misconfiguration. Your Internet link cannot have an infinite MTU, so if you use DF you will discover a maximum packet size.

If you don't want to see that message, use:

Code: [Select]
ping -s 1472 -M dont www.dslreports.com

Edit : my mistake. On local network, there is no MTU issue.
« Last Edit: January 13, 2012, 06:20:21 PM by Belial »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Cifs mount is very slow
« Reply #13 on: January 13, 2012, 06:19:59 PM »
I thought that my eth0 has MTU set to 1500, and i think this is too big.

That's normal. MTU of 1492 is also normal for a DSL link.