# Really crappy performance w/ Samba + Network Storage

## kiss-o-matic

Real quick, I have this product:

Io Data 1TB Landisk

It's hooked up to my router.  From Mapping a drive on my Windows box and copying gives

pretty normal results.  Mounting the same windows share as a samba share on my Linux

box gives quite literally, results that take twice as long.

The following is the same file copied from my Linux box to a Windows share on my windows box, and then another mounted windows share which is on the Landisk

Filesize: 734,175,232 bytes, time: 169 seconds

Filesize: 734,175,232 bytes, time: 290 seconds

I don't have times copying from Windows->Landisk as I don't have Perl installed there, but I timed it and it is indeed about half the time of the same file going from Linux to Landisk.

Since I'm getting crappy performance only going to the Landisk from Linux and not my PC, I think it's safe to say the network isn't the bottleneck.  I can't imagine the device itself being complex enough to give Samba issues though.  

Anyone have any experience with this?

----------

## shinjukumaster

this isn't much help to your specific problem but I've experienced no end of issues with SAMBA performance from Windows clients. SAMBA is supposed to offer FTP-like performance but I've only gotten half that at best - despite following SAMBA tuning tips for smb.conf. One thing that does appear to affect performance is specific network adapters. If anyone has pointers towards improved SAMBA performance I'd love to hear... I had a Kuro box (way too slow), then moved to Ubuntu on a VIA ITX, now I'm running Gentoo on a Geode ITX machine. SAMBA is s l o w...

----------

## Hu

What kernel version are you using?  Are you mounting the device as smb or as cifs?  The two exercise different paths in the kernel, and could have differing performance.  Please post the output of cat /proc/mounts and the exact command you are using to copy files to/from the device.

----------

## shinjukumaster

I am using SMB

Client is XP so just using Windows Explorer

cat /proc/mounts:

library ~ # cat /proc/mounts

rootfs / rootfs rw 0 0

/dev/root / ext3 rw,noatime,data=ordered 0 0

proc /proc proc rw,nosuid,nodev,noexec 0 0

sysfs /sys sysfs rw,nosuid,nodev,noexec 0 0

udev /dev tmpfs rw,nosuid 0 0

devpts /dev/pts devpts rw,nosuid,noexec 0 0

shm /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0

/dev/sda1 /mnt/wd500 ext3 rw,data=ordered 0 0

usbfs /proc/bus/usb usbfs rw,nosuid,noexec 0 0

----------

## tarpman

Try using CIFS instead - Windows 2000 and above use CIFS rather than SMB.  Also, I believe Hu meant to post /proc/mounts while the share is mounted.

----------

## shinjukumaster

 *tarpman wrote:*   

> Try using CIFS instead - Windows 2000 and above use CIFS rather than SMB.  Also, I believe Hu meant to post /proc/mounts while the share is mounted.

 

2.6.22-r9

No CIFS?

echo "net-fs/mount.cifs ~x86" ?? /etc/portage/package.keywords

emerge -uDv --newuse mount CIFS

...

Calculating ...

!!! All e-builds that could satisfy "mount-cifs" have been masked

..one of the following masked packages...

-net/fsmount-cifs-3.0.25c (masked by ~x86 keyword)

seems like support for this kernel is not out for x86

Is this going to be a long wait?

----------

## shinjukumaster

a bit further... attempting to mount a CIFS share:

localhost / # mount -t cifs //192.168.0.3/test  /mnt/testdisk                                  

Password:

mount error: cifs filesystem not supported by the system

Refer to the mount.cifs( :Cool:  manual page (e.g.man mount.cifs)

localhost ~ # modprobe cifs

FATAL: Module cifs not found.

localhost ~ # FATAL: Module cifs not found.

I had recompiled the kernel with CIFS support... 

Did I miss something?

----------

## Hu

 *shinjukumaster wrote:*   

> 
> 
> Did I miss something?

 

Yes, but without further information, I cannot say what you missed.  When you rebuilt the kernel, did you include CIFS in the kernel or is it a module?  If it is a module, did you install modules?  If it is in the kernel, did you boot the new kernel?  If you built a different version of the kernel, you must boot that version regardless.  Use uname -v to see when the currently running kernel was built.

What is the output of zgrep CIFS /proc/config.gz when running a kernel for which you believe you have enabled CIFS?

----------

