Project

General

Profile

Feature #17697

Add experimental tunable to enable multichannel Samba

Added by Josh Paetzel over 2 years ago. Updated 10 months ago.

Status:
Done
Priority:
Nice to have
Assignee:
John Hixson
Category:
OS
Target version:
Estimated time:
Severity:
Low
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Description

"It's still experimental due to one bug if a channel fails after
we sent a lease break we don't currently resend down other channels
so we could potentially miss the break response.

Otherwise it works great (with aio enabled of course) !

I'd certainly look into adding an "Experimental Multichannel"
checkbox to allow customers to test, as it can have great
performance benefits."

-jra


Related issues

Copied to FreeNAS - Feature #40728: Add experimental sysctl to enable multichannel SambaDone

Associated revisions

Revision 335d0265 (diff)
Added by John Hixson 11 months ago

Secret sauce for enabling multi channel in Samba

- This is experimental, so it's hidden
- We should add more Samba performance knobs here
- When adding sysctl's in the UI, we should probably look for the ones
that control Samba options and re-generate the config and reload
Samba when changed

Ticket: #17697

Revision 875ddf5c (diff)
Added by John Hixson 11 months ago

Secret sauce for enabling multi channel in Samba

- This is experimental, so it's hidden
- We should add more Samba performance knobs here
- When adding sysctl's in the UI, we should probably look for the ones
that control Samba options and re-generate the config and reload
Samba when changed

Ticket: #17697
(cherry picked from commit 335d0265338f86224433e89118baad042859b5b6)

(11.1-stable)
Ticket: #40728

History

#1 Updated by Josh Paetzel over 2 years ago

  • Target version changed from 9.10.2 to 9.10.3

#2 Updated by Josh Paetzel over 2 years ago

  • Status changed from Screened to Unscreened
  • Assignee changed from Josh Paetzel to Kris Moore

#4 Avatar?id=14398&size=24x24 Updated by Kris Moore over 2 years ago

  • Status changed from Unscreened to Closed: Not To Be Fixed

Marking this as NTBF for now, still somewhat experimental, once it matures upstream we can revisit.

#5 Avatar?id=14398&size=24x24 Updated by Kris Moore over 2 years ago

  • Target version changed from 9.10.3 to N/A

#6 Updated by Tino Zidore about 2 years ago

Any progress on this is it going to be available in the next update for 9.10?

#7 Avatar?id=14398&size=24x24 Updated by Kris Moore about 2 years ago

  • Status changed from Closed: Not To Be Fixed to Unscreened
  • Assignee changed from Kris Moore to John Hixson

Sending this over to John for an eval. I dunno, depends on if the upstream has matured enough to warrant exposing it at this time. What do you think John? Risks outweigh rewards?

#8 Updated by John Hixson about 2 years ago

  • Status changed from Unscreened to Screened
  • Target version changed from N/A to 11.1

Kris Moore wrote:

Sending this over to John for an eval. I dunno, depends on if the upstream has matured enough to warrant exposing it at this time. What do you think John? Risks outweigh rewards?

I've been interested in adding this, but yes, still very experimental. I've even read data corruption can occur. We'd have to mark it with a big fat red warning.

#9 Avatar?id=14398&size=24x24 Updated by Kris Moore about 2 years ago

Oh yuck. Yea, no particular rush on this one then ;)

#10 Updated by Tobias Müllauer almost 2 years ago

Finding some info on a blog that can maby help.

This is really simple, just put:

server multi channel support = yes
aio read size = 1
aio write size = 1
in your smb.conf.

It is required to enable async I/O, because a single file transfer is handled by a single process. A single process can’t handle feeding multiple NICs without using separate threads. That’s what async I/O would do for you see Samba ML for details.

Some admins want to tune their samba setup with different options. One well known is use sendfile = yes. With aio enabled, the usage of sendfile is disabled. So you can skip such optimizations.

Hint: If you use ZFS, it is not recommended to use sendfile anyway, because ZFS on Linux has not implemented sendfile() yet.

https://blog.chaospixel.com/linux/2016/09/samba-enable-smb-multichannel-support-on-linux.html

#11 Updated by John Hixson almost 2 years ago

Simple isn't an issue here (though more configuration is necessary for this to be of any use, as in more than a single interface). This feature is still marked experimental and there are issues of corruptions that can occur, so this is not high on my priority list. I'll get it in when I have time ;-)

#12 Updated by Eric Loewenthal almost 2 years ago

Who the hell would want to enable sendfile? That's a waste of time (at best) with ZFS, since it involves copying from ARC to an OS buffer.

Unless Allan Jude fixed it to support sending from ARC already (he was talking about that the other day).

#13 Avatar?id=14398&size=24x24 Updated by Kris Moore over 1 year ago

  • Target version changed from 11.1 to 11.2-BETA1

#14 Updated by Dru Lavigne over 1 year ago

  • Status changed from Screened to Not Started
  • Target version changed from 11.2-BETA1 to 11.2-RC2

#15 Updated by John Hixson about 1 year ago

  • Assignee changed from John Hixson to Timur Bakeyev

#16 Updated by Timur Bakeyev about 1 year ago

  • Severity set to Low

This bug is still not addressed, so this feature is nice for performance testing, but not for production(yet): https://bugzilla.samba.org/show_bug.cgi?id=11897

#17 Updated by John Hixson about 1 year ago

  • Assignee changed from Timur Bakeyev to John Hixson
  • Target version changed from 11.2-RC2 to 11.3

#18 Updated by John Hixson 11 months ago

  • Status changed from Not Started to Ready for Testing

PR https://github.com/freenas/freenas/pull/1523 merged. To test this, set freenas.services.smb.config.server_multi_channel=1 and restart SMB.

#19 Updated by Dru Lavigne 11 months ago

  • Subject changed from Add a checkbox to enable multichannel samba to Add a checkbox to enable multichannel Samba
  • Target version changed from 11.3 to 11.2-BETA2
  • Needs Merging changed from Yes to No

#20 Updated by Bonnie Follweiler 11 months ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

Test Passed in FreeNAS-11.2-MASTER-201807190857
(Build Date: Jul 19, 2018 12:3)

#21 Updated by Timothy Moore II 11 months ago

  • Subject changed from Add a checkbox to enable multichannel Samba to Add a tunable to enable multichannel Samba
  • Status changed from Passed Testing to Done

This will remain a tunable and not exposed in the UI for now.

WARNING: This feature is considered experimental and is to be run "at your own risk". Even though it can seem to work well
in testing, it can result in data corruption under some race conditions.

As mentioned above, set freenas.services.smb.config.server_multi_channel=1 and restart SMB to enable.

Review the smb.conf(5) manual page (https://www.freebsd.org/cgi/man.cgi?query=smb.conf&sektion=5&manpath=FreeBSD+11.2-RELEASE+and+Ports) for more details. See also the Samba History (https://www.samba.org/samba/history/samba-4.4.0.html) for an explanation of Multi-Channel.

#22 Updated by Dru Lavigne 11 months ago

  • Needs Doc changed from Yes to No

#23 Updated by John Hixson 11 months ago

  • Copied to Feature #40728: Add experimental sysctl to enable multichannel Samba added

#24 Updated by Dru Lavigne 10 months ago

  • Subject changed from Add a tunable to enable multichannel Samba to Add experimental tunable to enable multichannel Samba

Also available in: Atom PDF