CIFS is slow to read from, and choppy to write to, compared to smbfs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Incomplete
|
Medium
|
Unassigned |
Bug Description
I recently started using an old USB1.1 network interface with dapper, and have been having problems reading files from a remote Windows machine on the LAN. I can download packages from the ubuntu repositories at speeds up to 600Kb/s, but from the local cifs mount I am only getting something like 100Kb/s.
Also, when I try to copy a large file to a cifs mount, the system starts running very slowly, even the mouse pointer keeps getting 'stuck' for a few seconds at a time.
I would like to continue using cifs, since it works with large files better than smbfs, but it's currently not very usable.
Using 'smbfs' instead of 'cifs' to mount the remote Windows share fixes both of these problems, and gets my something in the region of 700Kb/s in both directions, which is approaching what I would expect to be able to achieve with a USB1.1 interface.
The 'smbfs' mount looks like this:
//192.168.1.12/d on /mnt/breezy/
The 'cifs' mount looks like this:
//192.168.1.12/d on /mnt/breezy/
I can't find any documentation for what the 'mand' option does, but I didn't specify it when mounting.
I ran 4 tests, both reading and writing a large file using both smbfs and cifs. Here's what happened:
1. reading from smbfs: reads a steady 700Kb/s (14M in 20s)
2. writing to smbfs: writes around 700Kb/s (14M in 20s)
3. reading from cifs: takes a couple of seconds to read anything at all, then reads at about 100Kb/s (2.2M in 20s)
4. writing to cifs: starts very fast, but then system gets choppy, the mouse pointer freezes regularly. note the 8 second lock up from 23:52:27 to 23:52:35. After killing the 'cp' command, it doesn't die for a long time, output is still going on - some buffer is being flushed to the network I guess. Writes around 700Kb/s on average.
Here are transcripts of the tests I ran:
.----
| 1. reading from smbfs
`----
$ sudo mount -t smbfs -o password=,uid=chris //192.168.1.12/d ~/smb/server/d
$ cd /tmp/tmp; /bin/rm -f local/dest; /bin/cp -f remote/source local/dest & while :; do sleep 1; echo $(date; ls -lh local/dest); done
[1] 25921
Mon May 22 23:56:54 CEST 2006 -rwxr-xr-x 1 chris chris 512K May 22 23:56 local/dest
Mon May 22 23:56:55 CEST 2006 -rwxr-xr-x 1 chris chris 1.2M May 22 23:56 local/dest
Mon May 22 23:56:56 CEST 2006 -rwxr-xr-x 1 chris chris 1.8M May 22 23:56 local/dest
Mon May 22 23:56:57 CEST 2006 -rwxr-xr-x 1 chris chris 2.5M May 22 23:56 local/dest
Mon May 22 23:56:58 CEST 2006 -rwxr-xr-x 1 chris chris 3.2M May 22 23:56 local/dest
Mon May 22 23:57:00 CEST 2006 -rwxr-xr-x 1 chris chris 3.8M May 22 23:56 local/dest
Mon May 22 23:57:01 CEST 2006 -rwxr-xr-x 1 chris chris 4.5M May 22 23:57 local/dest
Mon May 22 23:57:02 CEST 2006 -rwxr-xr-x 1 chris chris 5.2M May 22 23:57 local/dest
Mon May 22 23:57:03 CEST 2006 -rwxr-xr-x 1 chris chris 5.8M May 22 23:57 local/dest
Mon May 22 23:57:04 CEST 2006 -rwxr-xr-x 1 chris chris 6.5M May 22 23:57 local/dest
Mon May 22 23:57:05 CEST 2006 -rwxr-xr-x 1 chris chris 7.2M May 22 23:57 local/dest
Mon May 22 23:57:06 CEST 2006 -rwxr-xr-x 1 chris chris 7.8M May 22 23:57 local/dest
Mon May 22 23:57:07 CEST 2006 -rwxr-xr-x 1 chris chris 8.4M May 22 23:57 local/dest
Mon May 22 23:57:08 CEST 2006 -rwxr-xr-x 1 chris chris 9.0M May 22 23:57 local/dest
Mon May 22 23:57:09 CEST 2006 -rwxr-xr-x 1 chris chris 9.8M May 22 23:57 local/dest
Mon May 22 23:57:10 CEST 2006 -rwxr-xr-x 1 chris chris 11M May 22 23:57 local/dest
Mon May 22 23:57:11 CEST 2006 -rwxr-xr-x 1 chris chris 11M May 22 23:57 local/dest
Mon May 22 23:57:12 CEST 2006 -rwxr-xr-x 1 chris chris 12M May 22 23:57 local/dest
Mon May 22 23:57:13 CEST 2006 -rwxr-xr-x 1 chris chris 13M May 22 23:57 local/dest
Mon May 22 23:57:14 CEST 2006 -rwxr-xr-x 1 chris chris 13M May 22 23:57 local/dest
Mon May 22 23:57:15 CEST 2006 -rwxr-xr-x 1 chris chris 14M May 22 23:57 local/dest
Mon May 22 23:57:16 CEST 2006 -rwxr-xr-x 1 chris chris 15M May 22 23:57 local/dest
Mon May 22 23:57:17 CEST 2006 -rwxr-xr-x 1 chris chris 15M May 22 23:57 local/dest
Mon May 22 23:57:18 CEST 2006 -rwxr-xr-x 1 chris chris 16M May 22 23:57 local/dest
Mon May 22 23:57:19 CEST 2006 -rwxr-xr-x 1 chris chris 17M May 22 23:57 local/dest
Mon May 22 23:57:20 CEST 2006 -rwxr-xr-x 1 chris chris 17M May 22 23:57 local/dest
Mon May 22 23:57:21 CEST 2006 -rwxr-xr-x 1 chris chris 18M May 22 23:57 local/dest
Mon May 22 23:57:22 CEST 2006 -rwxr-xr-x 1 chris chris 19M May 22 23:57 local/dest
$ kill %
$ umount ~/smb/server/d
[1]+ Terminated /bin/cp -f remote/source local/dest
.----
| 2. writing to smbfs
`----
$ sudo mount -t smbfs -o password=,uid=chris //192.168.1.12/d ~/smb/server/d
$ cd /tmp/tmp; /bin/rm -f remote/dest; /bin/cp -f local/source remote/dest & while :; do sleep 1; echo $(date; ls -lh remote/dest); done
[1] 25714
Mon May 22 23:55:21 CEST 2006 -rwxr-xr-x 1 chris root 636K May 22 23:55 remote/dest
Mon May 22 23:55:22 CEST 2006 -rwxr-xr-x 1 chris root 1.3M May 22 23:55 remote/dest
Mon May 22 23:55:23 CEST 2006 -rwxr-xr-x 1 chris root 2.0M May 22 23:55 remote/dest
Mon May 22 23:55:24 CEST 2006 -rwxr-xr-x 1 chris root 2.7M May 22 23:55 remote/dest
Mon May 22 23:55:25 CEST 2006 -rwxr-xr-x 1 chris root 3.3M May 22 23:55 remote/dest
Mon May 22 23:55:26 CEST 2006 -rwxr-xr-x 1 chris root 4.0M May 22 23:55 remote/dest
Mon May 22 23:55:28 CEST 2006 -rwxr-xr-x 1 chris root 4.7M May 22 23:55 remote/dest
Mon May 22 23:55:29 CEST 2006 -rwxr-xr-x 1 chris root 5.3M May 22 23:55 remote/dest
Mon May 22 23:55:30 CEST 2006 -rwxr-xr-x 1 chris root 6.0M May 22 23:55 remote/dest
Mon May 22 23:55:31 CEST 2006 -rwxr-xr-x 1 chris root 6.6M May 22 23:55 remote/dest
Mon May 22 23:55:32 CEST 2006 -rwxr-xr-x 1 chris root 7.3M May 22 23:55 remote/dest
Mon May 22 23:55:33 CEST 2006 -rwxr-xr-x 1 chris root 8.0M May 22 23:55 remote/dest
Mon May 22 23:55:34 CEST 2006 -rwxr-xr-x 1 chris root 8.6M May 22 23:55 remote/dest
Mon May 22 23:55:35 CEST 2006 -rwxr-xr-x 1 chris root 9.3M May 22 23:55 remote/dest
Mon May 22 23:55:36 CEST 2006 -rwxr-xr-x 1 chris root 10M May 22 23:55 remote/dest
Mon May 22 23:55:37 CEST 2006 -rwxr-xr-x 1 chris root 11M May 22 23:55 remote/dest
Mon May 22 23:55:38 CEST 2006 -rwxr-xr-x 1 chris root 12M May 22 23:55 remote/dest
Mon May 22 23:55:39 CEST 2006 -rwxr-xr-x 1 chris root 12M May 22 23:55 remote/dest
Mon May 22 23:55:40 CEST 2006 -rwxr-xr-x 1 chris root 13M May 22 23:55 remote/dest
Mon May 22 23:55:41 CEST 2006 -rwxr-xr-x 1 chris root 14M May 22 23:55 remote/dest
$ kill %
[1]+ Terminated /bin/cp -f local/source remote/dest
$ umount ~/smb/server/d
.----
| 3. reading from cifs
`----
$ sudo mount -t cifs -o password=,uid=chris //192.168.1.12/d ~/smb/server/d
$ cd /tmp/tmp; /bin/rm -f local/dest; /bin/cp -f remote/source local/dest & while :; do sleep 1; echo $(date; ls -lh local/dest); done
[1] 25827
Mon May 22 23:56:18 CEST 2006 -rwxr-Sr-t 1 chris chris 0 May 22 23:56 local/dest
Mon May 22 23:56:19 CEST 2006 -rwxr-Sr-t 1 chris chris 0 May 22 23:56 local/dest
Mon May 22 23:56:20 CEST 2006 -rwxr-Sr-t 1 chris chris 128K May 22 23:56 local/dest
Mon May 22 23:56:21 CEST 2006 -rwxr-Sr-t 1 chris chris 256K May 22 23:56 local/dest
Mon May 22 23:56:22 CEST 2006 -rwxr-Sr-t 1 chris chris 384K May 22 23:56 local/dest
Mon May 22 23:56:23 CEST 2006 -rwxr-Sr-t 1 chris chris 384K May 22 23:56 local/dest
Mon May 22 23:56:24 CEST 2006 -rwxr-Sr-t 1 chris chris 512K May 22 23:56 local/dest
Mon May 22 23:56:25 CEST 2006 -rwxr-Sr-t 1 chris chris 640K May 22 23:56 local/dest
Mon May 22 23:56:26 CEST 2006 -rwxr-Sr-t 1 chris chris 768K May 22 23:56 local/dest
Mon May 22 23:56:27 CEST 2006 -rwxr-Sr-t 1 chris chris 896K May 22 23:56 local/dest
Mon May 22 23:56:28 CEST 2006 -rwxr-Sr-t 1 chris chris 1.0M May 22 23:56 local/dest
Mon May 22 23:56:29 CEST 2006 -rwxr-Sr-t 1 chris chris 1.2M May 22 23:56 local/dest
Mon May 22 23:56:30 CEST 2006 -rwxr-Sr-t 1 chris chris 1.3M May 22 23:56 local/dest
Mon May 22 23:56:31 CEST 2006 -rwxr-Sr-t 1 chris chris 1.4M May 22 23:56 local/dest
Mon May 22 23:56:32 CEST 2006 -rwxr-Sr-t 1 chris chris 1.4M May 22 23:56 local/dest
Mon May 22 23:56:33 CEST 2006 -rwxr-Sr-t 1 chris chris 1.5M May 22 23:56 local/dest
Mon May 22 23:56:34 CEST 2006 -rwxr-Sr-t 1 chris chris 1.7M May 22 23:56 local/dest
Mon May 22 23:56:35 CEST 2006 -rwxr-Sr-t 1 chris chris 1.8M May 22 23:56 local/dest
Mon May 22 23:56:36 CEST 2006 -rwxr-Sr-t 1 chris chris 1.9M May 22 23:56 local/dest
Mon May 22 23:56:37 CEST 2006 -rwxr-Sr-t 1 chris chris 2.0M May 22 23:56 local/dest
Mon May 22 23:56:38 CEST 2006 -rwxr-Sr-t 1 chris chris 2.2M May 22 23:56 local/dest
$ kill %
$ umount ~/smb/server/d
[1]+ Terminated /bin/cp -f remote/source local/dest
.----
| 4. writing to cifs
`----
$ sudo mount -t cifs -o password=,uid=chris //192.168.1.12/d ~/smb/server/d
$ cd /tmp/tmp; /bin/rm -f remote/dest; /bin/cp -f local/source remote/dest & while :; do sleep 1; echo $(date; ls -lh remote/dest); done
[1] 25411
Mon May 22 23:52:10 CEST 2006 -rw-r--r-- 1 chris root 13M May 22 23:52 remote/dest
Mon May 22 23:52:11 CEST 2006 -rw-r--r-- 1 chris root 22M May 22 23:52 remote/dest
Mon May 22 23:52:12 CEST 2006 -rw-r--r-- 1 chris root 32M May 22 23:52 remote/dest
Mon May 22 23:52:13 CEST 2006 -rw-r--r-- 1 chris root 43M May 22 23:52 remote/dest
Mon May 22 23:52:14 CEST 2006 -rw-r--r-- 1 chris root 53M May 22 23:52 remote/dest
Mon May 22 23:52:15 CEST 2006 -rw-r--r-- 1 chris root 55M May 22 23:52 remote/dest
Mon May 22 23:52:16 CEST 2006 -rw-r--r-- 1 chris root 59M May 22 23:52 remote/dest
Mon May 22 23:52:17 CEST 2006 -rw-r--r-- 1 chris root 65M May 22 23:52 remote/dest
Mon May 22 23:52:18 CEST 2006 -rw-r--r-- 1 chris root 69M May 22 23:52 remote/dest
Mon May 22 23:52:19 CEST 2006 -rw-r--r-- 1 chris root 75M May 22 23:52 remote/dest
Mon May 22 23:52:20 CEST 2006 -rw-r--r-- 1 chris root 77M May 22 23:52 remote/dest
Mon May 22 23:52:21 CEST 2006 -rw-r--r-- 1 chris root 81M May 22 23:52 remote/dest
Mon May 22 23:52:23 CEST 2006 -rw-r--r-- 1 chris root 81M May 22 23:52 remote/dest
Mon May 22 23:52:24 CEST 2006 -rw-r--r-- 1 chris root 81M May 22 23:52 remote/dest
Mon May 22 23:52:25 CEST 2006 -rw-r--r-- 1 chris root 81M May 22 23:52 remote/dest
Mon May 22 23:52:26 CEST 2006 -rw-r--r-- 1 chris root 83M May 22 23:52 remote/dest
Mon May 22 23:52:27 CEST 2006 -rw-r--r-- 1 chris root 86M May 22 23:52 remote/dest
Mon May 22 23:52:35 CEST 2006 -rw-r--r-- 1 chris root 86M May 22 23:52 remote/dest
Mon May 22 23:52:36 CEST 2006 -rw-r--r-- 1 chris root 88M May 22 23:52 remote/dest
Mon May 22 23:52:37 CEST 2006 -rw-r--r-- 1 chris root 89M May 22 23:52 remote/dest
Mon May 22 23:52:40 CEST 2006 -rw-r--r-- 1 chris root 90M May 22 23:52 remote/dest
Mon May 22 23:52:41 CEST 2006 -rw-r--r-- 1 chris root 91M May 22 23:52 remote/dest
Mon May 22 23:52:42 CEST 2006 -rw-r--r-- 1 chris root 92M May 22 23:52 remote/dest
Mon May 22 23:52:45 CEST 2006 -rw-r--r-- 1 chris root 93M May 22 23:52 remote/dest
Mon May 22 23:52:46 CEST 2006 -rw-r--r-- 1 chris root 94M May 22 23:52 remote/dest
Mon May 22 23:52:47 CEST 2006 -rw-r--r-- 1 chris root 94M May 22 23:52 remote/dest
Mon May 22 23:52:48 CEST 2006 -rw-r--r-- 1 chris root 95M May 22 23:52 remote/dest
Mon May 22 23:52:49 CEST 2006 -rw-r--r-- 1 chris root 96M May 22 23:52 remote/dest
Mon May 22 23:52:50 CEST 2006 -rw-r--r-- 1 chris root 96M May 22 23:52 remote/dest
Mon May 22 23:52:51 CEST 2006 -rw-r--r-- 1 chris root 97M May 22 23:52 remote/dest
Mon May 22 23:52:52 CEST 2006 -rw-r--r-- 1 chris root 97M May 22 23:52 remote/dest
Mon May 22 23:52:54 CEST 2006 -rw-r--r-- 1 chris root 98M May 22 23:52 remote/dest
Mon May 22 23:52:56 CEST 2006 -rw-r--r-- 1 chris root 99M May 22 23:52 remote/dest
Mon May 22 23:52:57 CEST 2006 -rw-r--r-- 1 chris root 99M May 22 23:52 remote/dest
Mon May 22 23:52:58 CEST 2006 -rw-r--r-- 1 chris root 101M May 22 23:52 remote/dest
Mon May 22 23:52:59 CEST 2006 -rw-r--r-- 1 chris root 101M May 22 23:52 remote/dest
Mon May 22 23:53:00 CEST 2006 -rw-r--r-- 1 chris root 102M May 22 23:53 remote/dest
Mon May 22 23:53:02 CEST 2006 -rw-r--r-- 1 chris root 102M May 22 23:53 remote/dest
Mon May 22 23:53:03 CEST 2006 -rw-r--r-- 1 chris root 103M May 22 23:53 remote/dest
$ kill %
$ umount ~/smb/server/d
unmount error 16 = Device or resource busy
Refer to the umount.cifs(8) manual page (man 8 umount.cifs)
unmount error 16 = Device or resource busy
Refer to the umount.cifs(8) manual page (man 8 umount.cifs)
$ while :; do echo $(date; ifconfig eth1 | grep bytes); sleep 1; done
Mon May 22 23:54:23 CEST 2006 RX bytes:2019288574 (1.8 GiB) TX bytes:3650860013 (3.4 GiB)
Mon May 22 23:54:24 CEST 2006 RX bytes:2019315071 (1.8 GiB) TX bytes:3651600385 (3.4 GiB)
Mon May 22 23:54:25 CEST 2006 RX bytes:2019341524 (1.8 GiB) TX bytes:3652343259 (3.4 GiB)
Mon May 22 23:54:26 CEST 2006 RX bytes:2019367862 (1.8 GiB) TX bytes:3653084932 (3.4 GiB)
Mon May 22 23:54:27 CEST 2006 RX bytes:2019393942 (1.8 GiB) TX bytes:3653813531 (3.4 GiB)
Mon May 22 23:54:28 CEST 2006 RX bytes:2019420538 (1.8 GiB) TX bytes:3654561080 (3.4 GiB)
Mon May 22 23:54:29 CEST 2006 RX bytes:2019447134 (1.8 GiB) TX bytes:3655305601 (3.4 GiB)
Mon May 22 23:54:30 CEST 2006 RX bytes:2019473575 (1.8 GiB) TX bytes:3656048788 (3.4 GiB)
Mon May 22 23:54:31 CEST 2006 RX bytes:2019500080 (1.8 GiB) TX bytes:3656793176 (3.4 GiB)
Mon May 22 23:54:33 CEST 2006 RX bytes:2019526573 (1.8 GiB) TX bytes:3657537877 (3.4 GiB)
Mon May 22 23:54:34 CEST 2006 RX bytes:2019553096 (1.8 GiB) TX bytes:3658280863 (3.4 GiB)
Mon May 22 23:54:35 CEST 2006 RX bytes:2019579492 (1.8 GiB) TX bytes:3659024216 (3.4 GiB)
Mon May 22 23:54:36 CEST 2006 RX bytes:2019605842 (1.8 GiB) TX bytes:3659764242 (3.4 GiB)
Mon May 22 23:54:37 CEST 2006 RX bytes:2019632343 (1.8 GiB) TX bytes:3660505969 (3.4 GiB)
Mon May 22 23:54:38 CEST 2006 RX bytes:2019658848 (1.8 GiB) TX bytes:3661251871 (3.4 GiB)
Mon May 22 23:54:39 CEST 2006 RX bytes:2019685198 (1.8 GiB) TX bytes:3661993411 (3.4 GiB)
Mon May 22 23:54:40 CEST 2006 RX bytes:2019711573 (1.8 GiB) TX bytes:3662732514 (3.4 GiB)
[1]+ Terminated /bin/cp -f local/source remote/dest
Mon May 22 23:54:41 CEST 2006 RX bytes:2019727566 (1.8 GiB) TX bytes:3663176101 (3.4 GiB)
Mon May 22 23:54:42 CEST 2006 RX bytes:2019727657 (1.8 GiB) TX bytes:3663176234 (3.4 GiB)
Mon May 22 23:54:43 CEST 2006 RX bytes:2019727818 (1.8 GiB) TX bytes:3663176479 (3.4 GiB)
Mon May 22 23:54:44 CEST 2006 RX bytes:2019727909 (1.8 GiB) TX bytes:3663176612 (3.4 GiB)
Mon May 22 23:54:45 CEST 2006 RX bytes:2019727909 (1.8 GiB) TX bytes:3663176612 (3.4 GiB)
$ umount ~/smb/server/d
---
ApportVersion: 2.6.1-0ubuntu10
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/pcmC0D0c: chris 2865 F...m pulseaudio
DistroRelease: Ubuntu 12.10
HibernationDevice: RESUME=
InstallationDate: Installed on 2012-07-23 (267 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
Lsusb:
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0402:7675 ALi Corp.
MachineType: Acer Aspire 5749
MarkForUpload: True
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware 1.95
Tags: quantal
Uname: Linux 3.5.0-26-generic x86_64
UpgradeStatus: Upgraded to quantal on 2012-10-23 (176 days ago)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
dmi.bios.date: 11/29/2011
dmi.bios.vendor: INSYDE
dmi.bios.version: V1.08
dmi.board.
dmi.board.name: HMA51_HR
dmi.board.vendor: Acer
dmi.board.version: Base Board Version
dmi.chassis.type: 10
dmi.chassis.vendor: Chassis Manufacturer
dmi.chassis.
dmi.modalias: dmi:bvnINSYDE:
dmi.product.name: Aspire 5749
dmi.product.
dmi.sys.vendor: Acer
Changed in samba: | |
status: | New → Confirmed |
summary: |
- cifs is slow to read from, and choppy to write to, compared to smbfs + RTL81xx cards: CIFS is slow to read from, and choppy to write to, + compared to smbfs |
Changed in samba (Ubuntu): | |
status: | Confirmed → Triaged |
affects: | samba (Ubuntu) → linux (Ubuntu) |
Changed in linux (Ubuntu): | |
status: | Triaged → New |
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
Makes Amarok unusable with my music collection on Windows file server. Another thing to notice in my case is that when you copy 2 files from a remote partition simultaneously, the speeds are fine (each gets 10-15 MB/sec), but as soon as you stop one, the second gets slow (100 KB/sec). I'm seeing this in the traffic monitor and also by the file sizes.
Used to work all right in Edgy.