Bug 811676 - Extremely poor performance of mount.cifs
Extremely poor performance of mount.cifs
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Jeff Layton
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-04-11 13:07 EDT by Zenith88
Modified: 2014-06-18 03:42 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
tested between Phenom II X4 PC built on Gigabyte AMD890 motherboard with Realtek gigabit NIC and Athlon PC built on ASUS AMD890 motherboard with same NIC, connected using Cat6 cable and ASUS gigabit switch.
Last Closed: 2012-04-11 14:19:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Zenith88 2012-04-11 13:07:13 EDT
Description of problem: Windows shares mounted using mount.cifs copy files from at 50% of speed when mounted with smbclient.

Version-Release number of selected component (if applicable): mount.cifs version: 4.8.1

How reproducible: every time

Steps to Reproduce:
1. Share a folder on a WinXP or Win7 machine with a gigabit NIC
2. Mount share on a Fedora machine with a gigabit NIC using mount.cifs
3. Copy files from Win share onto Linux
Actual results: Copy speed may range from 0.2-0.3 MB/s with default options of mount.cifs, to 15-16 MB/s when using directio and fsc options.

Expected results: Copy speed should be at least equal to smbclient speed of 26-28 MB/s, ideally 55-60 MB/s as on the same machine dual-booted into Win7.

Additional info: Please do not offer to upgrade to F15 and up, with it's horrific smartphone-like Gnome which makes PC a miserable likeness of a big cellphone.
Comment 1 Jeff Layton 2012-04-11 14:19:11 EDT
To be pedantic...

It's not mount.cifs that's slow here. mount.cifs is just the mount helper
that does things like resolve addresses and hand them off to the kernel. The
bulk of the cifs code lives in the kernel and that's where the slowness that
you're complaining about is...

More recent kernels have support for async reads and writes. Performance
should be much better there. While it may not be what you want to hear, F14 is
now past it's end-of-life and you'll likely need to update to a newer release
in order to get that benefit.
Comment 2 Zenith88 2012-04-11 14:24:54 EDT
How is it then that the same share mounted in Gnome's Nautilus (via smbclient) pumps data at 28 MB/s?
Comment 3 Jeff Layton 2012-04-11 14:39:48 EDT
Gnome's nautilus uses the (userspace) samba client libraries to do its bidding. It has very little in common with cifs.ko, other than the fact that they speak
the same protocol on the wire.
Comment 4 Zenith88 2012-04-11 14:43:48 EDT
Excellent, then it's just a copy-paste job to fix poor performance of cifs.
Comment 5 Jeff Layton 2012-04-11 14:57:04 EDT
It's even easier than that. It's just a kernel upgrade to something ~3.2-ish.
Comment 6 Zenith88 2012-04-11 15:10:21 EDT
My users are refusing upgrade to anything further F14 due to the horrific look and feel of Gnome 3, which in their opinion turns their PCs into giant likeness of a cellphone, while lacking many features they are used to.

I can't find fault in their thinking.

As you understand, series 3 kernels are not provided for F14.
Comment 7 Jeff Layton 2012-04-11 15:19:44 EDT
No more updates at all are provided for F14 any longer. It's past its end of life at this point:

Comment 8 Zenith88 2012-04-11 15:24:23 EDT
Ok, you win, I loose.
I'll just budget for more Win7 copies then. 55-60 MB/s can't argue with that.
Comment 9 Jeff Layton 2012-04-11 15:35:36 EDT
FWIW, these benchmarks were just posted upstream the other day by a user who
was seeing a similar problem:

kernel 2.6.35
writing with dd if=/dev/zero bs=1M:
1073741824 octets (1,1 GB) copés, 15,393 s, 69,8 MB/s 

reading with dd:
2147483648 octets (2,1 GB) copiés, 62,5917 s, 34,3 MB/s

kernel 3.2.14

1073741824 octets (1,1 GB) copiés, 9,83073 s, 109 MB/s

2147483648 octets (2,1 GB) copiés, 18,2867 s, 117 MB/s read

YMMV of course.
Comment 10 Zenith88 2012-04-11 15:42:22 EDT
I've said it right off the bat - won't upgrade.
After seeing Gnome 3 I puked on the keyboard and so did the users on campus.
No one will upgrade to F15 or F16 here, period. Nobody wants to abandon their habits made over the last decade or so in favor of the new cellphone look and feel.

If it was fairly straightforward to install vanilla kernel on F14, I would try, but alas it just does not work.

If it was fairly straightforward to get replace Gnome 3 with Gnome 2 on F15/16, I would try, but that's not working either.
Comment 11 Dmitri Pal 2012-04-11 17:51:07 EDT
It seems like you are unaware that you still can switch it to the old "menu" style look and feel. It is a bit different but 80% close to what it was and tolerable. So you can continue using the older style UI but move on to later versions of Fedora.
Comment 12 Zenith88 2012-04-11 19:32:15 EDT
Gnome 2 fallback mode does not cut it - lots of applets are missing and that impacts productivity and morale.

Note You need to log in before you can comment on or make changes to this bug.