# Samba performance awfull...

## lenkki

Hello, I'm using the vserver-sources and running a samba server on the host system. I've search the forums and found some things that solved the same or similar problems for other users which sadly didn't work for me...

The problem I'm seeing is that when transferring a lot of small files I get something like 30KB/s on a Gigabit link. Both machines are fairly new and each have 2GB DDR2 and the weakest is a 2x2.0GHz Core2 Duo. And the slowest disks can sustain transfer rates of 20MB/s, both machines also run raid1 configurations. 

The most peculiar thing is that if I do 

```

ping -f server

```

While transferring the files the transfer is almost instant. 

Further more I can't mount the shares using CIFS when I try to I get this:

```

QuadChan ~ # mount -t cifs //10.0.1.1/www -o username=myuser /mnt/remote

mount: wrong fs type, bad option, bad superblock on //10.0.1.1/www,

       missing codepage or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

QuadChan ~ # dmesg | tail

 CIFS VFS: cifs_mount failed w/return code = -22

 CIFS VFS: cifs_mount failed w/return code = -22

 CIFS VFS: cifs_mount failed w/return code = -22

 CIFS VFS: cifs_mount failed w/return code = -22

```

Searching for that error code on google gives me nothing, I even tried grokking around the kernel source but couldn't find where it was defined so I have NFI what it means.

To be complete here is my samba config:

```

[global]

   workgroup = MATHEMATICA

   server string = Samba Server %v

   large readwrite = no

   case sensitive = yes

   unix charset = utf-8

   unix extensions = yes

   invalid users = root

   null passwords = no

   security = user

   encrypt passwords = yes

   log file = /var/log/samba/log.%m

   max log size = 50

   log level = 1

   socket options = TCP_NODELAY SO_SNDBUF=65536 SO_RCVBUF=65536

   local master = yes

   domain master = yes

   preferred master = yes

[homes]

   comment = Home Directories

   browseable = yes

   writable = yes

   valid users = myuser

[store]

   comment = Media store

   browseable = yes

   writable = yes

   path = /store

[www]

   path = /vservers/webserver/var/www/localhost/htdocs/

   public = no

   writable = yes

   printable = no

   valid users = myuser

   browseable = yes

```

There are no errors and no overruns on any of the network interfaces on both machines. I've also tried with a 3rd machine with a different kernel and somewhat older software and it too gets the same error.

The kernel on my desktop that is trying to connect is 2.23.9 vanilla , server is 2.6.20-vs2.2.0-gentoo , the third machine I don't remember but somewhere around .20 or .21 .

----------

## tarpman

 *lenkki wrote:*   

> Further more I can't mount the shares using CIFS when I try to I get this:
> 
> ```
> 
> QuadChan ~ # mount -t cifs //10.0.1.1/www -o username=myuser /mnt/remote
> ...

 

Make sure you have net-fs/mount-cifs installed.

----------

## lenkki

Intresting, net-fs/mount-cifs is marked unstable in amd64. That's why I didn't install it earlier, I figured "If they have put it in unstable that must mean that I shouldn't/don't need to use it".

I haven't had time to see if the performance is any better under CIFS, I'll try it later today when I get back from my exam.

----------

## Zebbeman

Nice,

Since when do you need this? My mount -t cifs has worked great for a long time, but now I had to emerge mount-cifs.

Thanks!

----------

## pappy_mcfae

 *Zebbeman wrote:*   

> Nice,
> 
> Since when do you need this? My mount -t cifs has worked great for a long time, but now I had to emerge mount-cifs.
> 
> Thanks!

 

Yeah, I'm with you on this one. With Slackware, CIFS is a part of Samba. It's not broken off into another package. Oh well, such is life. At least I have things working the way I want them to, so all is well. 

I wonder if the lack of CIFS is what made smb4k so unstable...Hmmm. I suppose I could perform a little experiment to find out.

Blessed be!

Pappy

----------

