SlideShare ist ein Scribd-Unternehmen logo
1 von 37
SMB 2.1 & SMB 3 
Protocol features, Status, 
Architecture, Implementation 
Gordon Ross <gwr@nexenta.com> 
Nexenta Systems, Inc. 
illumos day 2014
Overview of this presentation 
 Summary of SMB versions 
and what do we support? 
 SMB Server Design changes 
 Development approach 
 Lessons learned 
 Next steps 
 Links, more info 
illumos day 2014 2
Summary of SMB versions 
SMB 1 … 2.0 … 2.1 … 3.0 … 
What does each bring to SMB? 
What do we support?
Summary of SMB versions: SMB 1 
SMB1 vs. … (Why a new SMB version?) 
 SMB1 has become very complex 
– Several variants of many operations, many used only in "fall back" paths 
– Need for backward-compatibility increased compliexity 
 A "Heinz 57 variety" of calls, from several generations of clients 
spanning DOS 3.x WfWthrough today (Windows, Mac, etc.) 
 Limited performance 
– small MTU, misaligned data, limited parallelism 
– “chatty” (many round trips required) 
 Limited scale (16-bit IDs) 
 Difficult to document or test. 
illumos day 2014 4
Summary of SMB versions: SMB 2.0 
What’s in SMB 2.0? (vs SMB 1) 
 Far simpler protocol (18 commands vs "Heinz 57") 
 Improved scalability (larger ID sizes) 
 Improved network utilization 
– Compound requests (fewer round trips) 
– Connection per user 
– Allows larger I/O requests * 
– Client caching of files/dirs * 
 Durable handles * 
 Symbolic links * 
* optional features, not currently implemented 
illumos day 2014 5
Summary of SMB versions: SMB 2.1 
What’s in SMB 2.1 (vs SMB 2.0) 
 Previous versions 
exposes ZFS snapshots via SMB 
 Large MTU support * 
also enables a per-client credit system 
 oplock leasing model * 
cache delegations per object (vs per handle) 
 clients can sleep in more situations 
(where they can reclaim handles after resume) 
* optional features, not currently implemented 
illumos day 2014 6
Summary of SMB versions: SMB 3.0 
 What’s in SMB 3.0 (vs SMB 2.1) 
 New signing algorithm (AES-256-CBC) 
 Optional SMB 3.0 features: 
– SMB Transparent Failover * 
– SMB Scale Out * 
– SMB Multichannel * 
– SMB Direct (RDMA) * 
– SMB Encryption * 
– VSS for SMB file shares * 
– SMB Directory Leasing * 
– SMB PowerShell * 
* optional features, not currently implemented 
For more details, see: MS KB 2709568 
illumos day 2014 7
Current Status of SMB support 
What SMB versions and features do we support? 
 Available now, in NexentaStor 4.0.3 
– SMB 2.1 with all required features 
(some "optional" features still to come) 
– AD-member improvements (new DC locator) 
– Extended security, including Kerberos 
 Prototype stage: 
– SMB 3.0 protocol level (no optional features) 
 Under development, or planned: 
– SMB 2.1 optional features: Large MTU, durable handles… 
– SMB 3.0 optional features: Multi-channel, server-side copy 
 When does this arrive in illumos? 
– later, see "next steps" 
illumos day 2014 8
SMB Sever Design Changes 
Existing multi-thread design 
Message processing models 
Challenges, approach
SMB Server: existing multi-thread design 
Relatively simple threads & locking model: 
one thread per smb_request_t 
illumos day 2014 10
Message processing (SMB1) 
SMB 1 request (with “&X” parts) 
header req. 1 &X req. 2 &X req. 3 
SMB 1 worker 
(initialize) 
resp. 1 
illumos day 2014 11 
. . . 
header 
SMB 1 response 
&X resp. 2 &X resp. 3 
(process req. 1) 
2) 
3) 
(send response)
Message processing (SMB2, “related”) 
SMB 2 request (compound, related elements) 
hdr 1 req 1 
SMB 2 worker 
(process req. 1) 
2) 
3) 
hdr 2 req 2 hdr 3 req 3 
(send reply) 
hdr 1 resp 1 hdr 2 resp 2 hdr 3 resp 3 
illumos day 2014 12 
. . . 
SMB 2 responses (compound reply)
Message processing (SMB2, “unrelated”) 
SMB 2 request (compound, unrelated elements) 
hdr 1 req 1 
hdr 2 req 2 hdr 3 req 3 
hdr 1 resp 1 hdr 2 resp 2 hdr 3 resp 3 
illumos day 2014 13 
SMB 2 worker C 
(process req. 3) 
SMB 2 worker B 
(process req. 2) 
SMB 2 worker A 
(process req. 1) 
. . . 
SMB 2 responses (may return separately)
Message processing (SMB2, related, async) 
SMB 2 request (compound, related elements, async!) 
hdr 1 req 1 
SMB 2 worker 
(process req. 1) 
2) 
3) 
hdr 2 req 2 hdr 3 req 3 
async! 
(async work, then reply) 
hdr 1 resp 1 hdr 2 resp 2 hdr 3 resp 3 
illumos day 2014 14 
. . . 
SMB 2 responses (two!) 
initial reply, async reply 
(send 1st reply) 
“pending” 
hdr 2a resp 2a 
async. reply
Message processing, multiple async (Uh oh…) 
SMB 2 request (compound, multiple async!) 
hdr 1 req 1 
SMB 2 worker 
(process req. 1) 
SMB 2 worker 
(initial, req2a) 
2) 
3) 
hdr 2 req 2 hdr 3 req 3 
async! 
2nd SMB worker? 
(for 2nd async cmd) 
“pending” 
hdr 1 resp 1 hdr 2 resp 2 hdr 3 resp 3 
illumos day 2014 15 
. . . 
SMB 2 responses (two!) 
Need a new thread? 
async! 
“pending” 
hdr 2a resp 2a 
async. reply 2 
hdr 3a resp 3a 
async. reply 3
Message processing, multiple async. – How? 
An important simplification 
 "The server is allowed to say 'no' to any compounded request.“ 
(Thanks to David Kruze of MS for this tip.) 
– Server can return STATUS_INSUFFICIENT_RESOURCES for any request in a 
compound and the client will resubmit that request separately. 
– If we ever see more than one request in a compound that needs to 
"go async", we can just return the special error for the 2nd and later. 
 It turns out we never need to actually do this! 
– We've never seen a compound request with more than one 
command that needed to “go async” 
– Commands needing an async. response appear to always be last. 
illumos day 2014 16
Message processing, limited async. 
SMB 2 request (compound, multiple async!) 
hdr 1 req 1 
SMB 2 worker 
(process req. 1) 
2) 
3) 
SMB 2 worker 
(initial, req 1, req 2) 
async! 
“pending” 
illumos day 2014 17 
. . . 
SMB 2 response 
hdr 2 req 2 hdr 3 req 3 
hdr 1 resp 1 hdr 2 resp 2 hdr 3 resp 3 
hdr 2a resp 2a 
async. reply 
async! 
“no res.” 
hdr 3a resp 3a 
async. reply 
hdr 3’ req 3’ 
async! 
SMB 2 worker 
(re-sent req 3’) 
Allow only one async. 
cmd in this compound
SMB Server design changes (summary) 
 The existing multi-thread model continues to work in SMB2, 
because we can limit compounds to at most one async element. 
 Largest design work was the new SMB2 dispatch loop, 
and it’s handling of a possible async. command. 
 Next largest was finding SMB1-specific logic in what would 
now become common code shared by SMB1 & SMB2 
 Significant design changes for authentication and 
RPC over SMB “named pipes” (both use AF_UNIX sockets) 
illumos day 2014 18
SMB Server design changes — impact 
Where the major changes land 
illumos day 2014 19
Development Approach 
Challenges we faced, Solutions chosen, and 
Architecture changes to ease development
SMB 2 Development: challenges 
 400 page specification [MS-SMB2] 
– New dispatch model (sync. vs async. replies) 
– 18 protocol commands. Many are simple… 
a few are huge ("smb2_create") 
 Aggressive schedule (wanted alpha in ~ 6 mo.) 
 Had some "technical debt" to pay 
– some "common" code was really SMB1-specific 
– extended security necessary for SMB2 
 Concurrently support shipping versions 
illumos day 2014 21
SMB 2 Development: desires 
Want accelerated development 
We knew we had a lot of code to write and debug, 
much of that in-kernel code. Wish list: 
 Very fast edit/compile/debug cycle (< 1 min!) 
 Ability to use source-level debuggers 
 Retain ability to use mdb, ::smblist etc. 
illumos day 2014 22
SMB 2 Development: approach taken 
 Re-use as much of the current code as possible 
 Work incrementally (no time to “start over”) 
 Keep a similar reader + taskq dispatch model, 
if possible (was not obvious whether we could) 
 Remove SMB1-specific actions from common code, 
i.e. smbsr_put_error calls (return status instead) 
 Improved testing for both SMB1 & SMB2 using 
open source and commercial testing tools 
illumos day 2014 23
SMB 2 Development: clever tricks! 
Do development in user-space when we can! 
 Implemented a user-space version of the SMB server, 
allowing source-level debuggers, fast edit/compile/debug 
(We call this "fake smbd", or "fksmbd") 
 How does this work? What can it do? 
– Shims for kernel interfaces (“libfakekernel”) 
– Stubs for things we don't need 
– Minimal implementations of many things 
– Many limitations, not suitable for deployment. 
 Credit where credit is due: 
Borrowed ideas and code from ZFS (libzpool) 
How does this affect the architecture? … 
illumos day 2014 24
SMB Server Architecture (“real” server) 
illumos day 2014 25
fksmbd Server Architecture (“fake kernel”) 
illumos day 2014 26
fksmbd debugging features 
 Sufficient functionality for most protocol-level debugging. 
 Source-level debuggers work (dbx/gdb) 
 mdb "just works" (kernel or user-mode) 
commands like "::smblist" work 
(mdb module for “libfksmbsrv”) 
 Also have "quick" scripts (for partial builds) 
sufficient to compile & run "fksmbd“ 
(1 min. edit/compile/debug cycle) 
All of these were key for enabling productivity, 
particularly when making extensive changes. 
illumos day 2014 27
fksmbd limitations 
 Authentication works, but fksmbd uses only the credentials of 
the user who runs it. (all cred. interfaces are stubs) 
 Just one zone; other zone interfaces stubbed out. 
 VFS layer simulation very limited 
– Ordinary things like fop_lookup work. 
– Fancy things like fop_setsecattr are just stubs. 
– Would not scale (open FD per active vnode) 
This is intended as a debugging tool, not for deployment. 
illumos day 2014 28
Lessons Learned 
What worked well? 
(or not so well?)
Lessons Learned 
What worked well? (or not so well...) 
 The ability to use all our favorite tools was a huge help in 
accelerating development. (dtrace, mdb, dbx|gdb) 
 This gave us room to "pay down some technical debt" i.e. 
– Reduce SMB1-specific logic in common code 
– Improve the named pipe implementation (use AF_UNIX sockets) 
 Incremental development is a safe bet (small steps) 
 Want the code testable at all times. 
illumos day 2014 30
Lessons Learned (cont.) 
 Automated testing helps a lot. 
– We ran Samba's "smbtorture" after builds (via Jenkins) 
– Also ran some commercial test tools periodically 
 Interfaces with no consumers might not work as advertised 
– Rename bugs in “common” SMB code 
– SO_RCVTIMO bug for AF_UNIX, etc. 
 Early testing in the field would have helped 
(as much as you test, there’s nothing like field experience) 
 Like to use “feature preview” for major new features, 
(better not to enable by default in the first release) 
illumos day 2014 31
Next Steps 
Getting this work upstream to illumos 
continuing SMB development
Next Steps 
 Work on getting what’s “ready” into illumos 
 SMB 2.1 and optional features 
– Large MTU (and multi-credit) 
– Durable handles 
 SMB 3.x, multi-channel, etc. 
– AES-256-CBC signing (done) 
– mult-channel support 
– server-side copy (ODX) 
 Windows Management Interfaces 
New, wbem-based administration APIs 
Usual disclaimers: No promises about future plans here. 
illumos day 2014 33
Upstream this work to illumos? 
Getting the SMB work up to illumos will take some time. 
 There are about 150 commits to look at. With some 
reorganization and related commits "squashed" it's 
still about 50 commits in about 8 chunks. 
 See: smbsrv2-rework in github.com/gwr 
https://github.com/gwr/illumos-gate/compare/smbsrv2-rework 
 The XXXX markers are the points that make sense as 
testable milestones, and reasonable chunks to push. 
Anyone available to help with this? 
illumos day 2014 34
Upstream work, by subject 
Subject Inserts Deletes 
Kerberos auth. inbound 898 119 
New DC Locator, AD join fixes 5,861 2,224 
SMB 2.1 (and follow-up fixes) 14,111 3,878 
Extended Security, inbound 4,615 2,753 
Improved SMB named pipes 1,071 1,865 
User-mode server (for debug) * 13,708 2,090 
Fixes (part B) 284 918 
SMB server in a zone 896 885 
Fixes (part A) 5,457 3,705 
totals: 46,901 18,437 
* Inflated by some necessary copying & repeated changes 
illumos day 2014 35
Links: (for more information) 
 NexentaStor (nexenta.com) 
 Summary of SMB 2.1 features 
http://technet.microsoft.com/en-us/library/ff625695.aspx 
 Summary of SMB 3.0 features 
http://support.microsoft.com/kb/2709568 
 Staging area for integration into illumos 
http://github.com/gwr/illumos-gate/compare/smbsrv2-rework 
 Nexenta’s open fork of illumos gate 
http://github.com/Nexenta/illumos-nexenta 
illumos day 2014 36
www.nexenta.com 
illumos day 2014 
Thank-you!

Weitere ähnliche Inhalte

Was ist angesagt?

TechNet Live spor 1 sesjon 6 - more vdi
TechNet Live spor 1   sesjon 6 - more vdiTechNet Live spor 1   sesjon 6 - more vdi
TechNet Live spor 1 sesjon 6 - more vdiAnders Borchsenius
 
DB2 Pure Scale Webcast
DB2 Pure Scale WebcastDB2 Pure Scale Webcast
DB2 Pure Scale WebcastLaura Hood
 
Секреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-VСекреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-VВиталий Стародубцев
 
Windows Server "10": что нового в виртуализации
Windows Server "10": что нового в виртуализацииWindows Server "10": что нового в виртуализации
Windows Server "10": что нового в виртуализацииВиталий Стародубцев
 
70-412 Objectives
70-412 Objectives70-412 Objectives
70-412 Objectivespupeadra
 
Lotus Admin Training Part II
Lotus Admin Training Part IILotus Admin Training Part II
Lotus Admin Training Part IISanjaya K Saxena
 
Episode 2 DB2 pureScale Installation, Instance Management &amp; Monitoring
Episode 2 DB2 pureScale Installation, Instance Management &amp; MonitoringEpisode 2 DB2 pureScale Installation, Instance Management &amp; Monitoring
Episode 2 DB2 pureScale Installation, Instance Management &amp; MonitoringLaura Hood
 
Avnet & Rorke Data - Open Compute Summit '13
Avnet & Rorke Data - Open Compute Summit '13Avnet & Rorke Data - Open Compute Summit '13
Avnet & Rorke Data - Open Compute Summit '13DaWane Wanek
 
How to Optimize Microsoft Hyper-V Failover Cluster and Double Performance
How to Optimize Microsoft Hyper-V Failover Cluster and Double PerformanceHow to Optimize Microsoft Hyper-V Failover Cluster and Double Performance
How to Optimize Microsoft Hyper-V Failover Cluster and Double PerformanceStarWind Software
 
NIC 2013 - VM Mobility
NIC 2013 - VM MobilityNIC 2013 - VM Mobility
NIC 2013 - VM MobilityKristian Nese
 
What's new in System Center 2012 R2: Virtual Machine Manager
What's new in System Center 2012 R2: Virtual Machine ManagerWhat's new in System Center 2012 R2: Virtual Machine Manager
What's new in System Center 2012 R2: Virtual Machine ManagerTomica Kaniski
 
Ibm db2 10.5 for linux, unix, and windows installing ibm data server clients
Ibm db2 10.5 for linux, unix, and windows   installing ibm data server clientsIbm db2 10.5 for linux, unix, and windows   installing ibm data server clients
Ibm db2 10.5 for linux, unix, and windows installing ibm data server clientsbupbechanhgmail
 

Was ist angesagt? (13)

TechNet Live spor 1 sesjon 6 - more vdi
TechNet Live spor 1   sesjon 6 - more vdiTechNet Live spor 1   sesjon 6 - more vdi
TechNet Live spor 1 sesjon 6 - more vdi
 
DB2 Pure Scale Webcast
DB2 Pure Scale WebcastDB2 Pure Scale Webcast
DB2 Pure Scale Webcast
 
Секреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-VСекреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-V
 
Windows Server "10": что нового в виртуализации
Windows Server "10": что нового в виртуализацииWindows Server "10": что нового в виртуализации
Windows Server "10": что нового в виртуализации
 
70-412 Objectives
70-412 Objectives70-412 Objectives
70-412 Objectives
 
Lotus Admin Training Part II
Lotus Admin Training Part IILotus Admin Training Part II
Lotus Admin Training Part II
 
Episode 2 DB2 pureScale Installation, Instance Management &amp; Monitoring
Episode 2 DB2 pureScale Installation, Instance Management &amp; MonitoringEpisode 2 DB2 pureScale Installation, Instance Management &amp; Monitoring
Episode 2 DB2 pureScale Installation, Instance Management &amp; Monitoring
 
Avnet & Rorke Data - Open Compute Summit '13
Avnet & Rorke Data - Open Compute Summit '13Avnet & Rorke Data - Open Compute Summit '13
Avnet & Rorke Data - Open Compute Summit '13
 
L2 lotus help
L2 lotus helpL2 lotus help
L2 lotus help
 
How to Optimize Microsoft Hyper-V Failover Cluster and Double Performance
How to Optimize Microsoft Hyper-V Failover Cluster and Double PerformanceHow to Optimize Microsoft Hyper-V Failover Cluster and Double Performance
How to Optimize Microsoft Hyper-V Failover Cluster and Double Performance
 
NIC 2013 - VM Mobility
NIC 2013 - VM MobilityNIC 2013 - VM Mobility
NIC 2013 - VM Mobility
 
What's new in System Center 2012 R2: Virtual Machine Manager
What's new in System Center 2012 R2: Virtual Machine ManagerWhat's new in System Center 2012 R2: Virtual Machine Manager
What's new in System Center 2012 R2: Virtual Machine Manager
 
Ibm db2 10.5 for linux, unix, and windows installing ibm data server clients
Ibm db2 10.5 for linux, unix, and windows   installing ibm data server clientsIbm db2 10.5 for linux, unix, and windows   installing ibm data server clients
Ibm db2 10.5 for linux, unix, and windows installing ibm data server clients
 

Andere mochten auch

Presentation on samba server
Presentation on samba serverPresentation on samba server
Presentation on samba serverVeeral Bhateja
 
1.2 build cloud_fabric_final
1.2 build cloud_fabric_final1.2 build cloud_fabric_final
1.2 build cloud_fabric_finalPaulo Freitas
 
Dfs (Distributed computing)
Dfs (Distributed computing)Dfs (Distributed computing)
Dfs (Distributed computing)Sri Prasanna
 
Using samba
Using sambaUsing samba
Using sambaAli Abdo
 
Samba power point presentation
Samba power point presentationSamba power point presentation
Samba power point presentationMd Maksudur Rahman
 
JSX 速さの秘密 - 高速なJavaScriptを書く方法
JSX 速さの秘密 - 高速なJavaScriptを書く方法JSX 速さの秘密 - 高速なJavaScriptを書く方法
JSX 速さの秘密 - 高速なJavaScriptを書く方法Kazuho Oku
 
Developing the fastest HTTP/2 server
Developing the fastest HTTP/2 serverDeveloping the fastest HTTP/2 server
Developing the fastest HTTP/2 serverKazuho Oku
 
H2O - the optimized HTTP server
H2O - the optimized HTTP serverH2O - the optimized HTTP server
H2O - the optimized HTTP serverKazuho Oku
 
HTTP/2の課題と将来
HTTP/2の課題と将来HTTP/2の課題と将来
HTTP/2の課題と将来Kazuho Oku
 
Unix Programming with Perl
Unix Programming with PerlUnix Programming with Perl
Unix Programming with PerlKazuho Oku
 
Reorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and BeyondReorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and BeyondKazuho Oku
 

Andere mochten auch (18)

Presentation on samba server
Presentation on samba serverPresentation on samba server
Presentation on samba server
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
1.2 build cloud_fabric_final
1.2 build cloud_fabric_final1.2 build cloud_fabric_final
1.2 build cloud_fabric_final
 
Dfs (Distributed computing)
Dfs (Distributed computing)Dfs (Distributed computing)
Dfs (Distributed computing)
 
Rhel4
Rhel4Rhel4
Rhel4
 
Introduction to samba
Introduction to samba Introduction to samba
Introduction to samba
 
Using samba
Using sambaUsing samba
Using samba
 
Samba power point presentation
Samba power point presentationSamba power point presentation
Samba power point presentation
 
FILE SERVER
FILE SERVERFILE SERVER
FILE SERVER
 
Samba
SambaSamba
Samba
 
Samba
SambaSamba
Samba
 
Samba server
Samba serverSamba server
Samba server
 
JSX 速さの秘密 - 高速なJavaScriptを書く方法
JSX 速さの秘密 - 高速なJavaScriptを書く方法JSX 速さの秘密 - 高速なJavaScriptを書く方法
JSX 速さの秘密 - 高速なJavaScriptを書く方法
 
Developing the fastest HTTP/2 server
Developing the fastest HTTP/2 serverDeveloping the fastest HTTP/2 server
Developing the fastest HTTP/2 server
 
H2O - the optimized HTTP server
H2O - the optimized HTTP serverH2O - the optimized HTTP server
H2O - the optimized HTTP server
 
HTTP/2の課題と将来
HTTP/2の課題と将来HTTP/2の課題と将来
HTTP/2の課題と将来
 
Unix Programming with Perl
Unix Programming with PerlUnix Programming with Perl
Unix Programming with Perl
 
Reorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and BeyondReorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and Beyond
 

Ähnlich wie illumos day 2014 SMB2

How to scale your web app
How to scale your web appHow to scale your web app
How to scale your web appGeorgio_1999
 
Client/Server Paradigm And Its Implementation
Client/Server Paradigm And Its ImplementationClient/Server Paradigm And Its Implementation
Client/Server Paradigm And Its ImplementationRoman Agaev
 
What\'s new with SMB Traffic Analyzer
What\'s new with SMB Traffic AnalyzerWhat\'s new with SMB Traffic Analyzer
What\'s new with SMB Traffic Analyzerhhetter
 
Ims12 workbench data visualization - IMS UG May 2014 Sydney & Melbourne
Ims12   workbench data visualization - IMS UG May 2014 Sydney & MelbourneIms12   workbench data visualization - IMS UG May 2014 Sydney & Melbourne
Ims12 workbench data visualization - IMS UG May 2014 Sydney & MelbourneRobert Hain
 
Boltdb - an embedded key value database
Boltdb - an embedded key value databaseBoltdb - an embedded key value database
Boltdb - an embedded key value databaseManoj Awasthi
 
Getting Maximum Performance from Amazon Redshift (DAT305) | AWS re:Invent 2013
Getting Maximum Performance from Amazon Redshift (DAT305) | AWS re:Invent 2013Getting Maximum Performance from Amazon Redshift (DAT305) | AWS re:Invent 2013
Getting Maximum Performance from Amazon Redshift (DAT305) | AWS re:Invent 2013Amazon Web Services
 
20180825 jssug 09_migration_aws
20180825 jssug 09_migration_aws20180825 jssug 09_migration_aws
20180825 jssug 09_migration_awsKunihisa Abukawa
 
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...WASdev Community
 
Virtual Distro Dispatcher - A light-weight Desktop-as-a-Service solution
Virtual Distro Dispatcher - A light-weight Desktop-as-a-Service solutionVirtual Distro Dispatcher - A light-weight Desktop-as-a-Service solution
Virtual Distro Dispatcher - A light-weight Desktop-as-a-Service solutionFlavio Bertini
 
RDBMS-based Coverage Collection and Analysis
RDBMS-based Coverage Collection and AnalysisRDBMS-based Coverage Collection and Analysis
RDBMS-based Coverage Collection and AnalysisDVClub
 
Virtual Distro Dispatcher - A costless distributed virtual environment from T...
Virtual Distro Dispatcher - A costless distributed virtual environment from T...Virtual Distro Dispatcher - A costless distributed virtual environment from T...
Virtual Distro Dispatcher - A costless distributed virtual environment from T...Flavio Bertini
 
NetBSD and Linux for Embedded Systems
NetBSD and Linux for Embedded SystemsNetBSD and Linux for Embedded Systems
NetBSD and Linux for Embedded SystemsMahendra M
 
Web browser - How web browsers work?
Web browser - How web browsers work?Web browser - How web browsers work?
Web browser - How web browsers work?Arun Kumar
 
MySQL for Large Scale Social Games
MySQL for Large Scale Social GamesMySQL for Large Scale Social Games
MySQL for Large Scale Social GamesYoshinori Matsunobu
 
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB
 
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...Zahid Anwar (OCM)
 
DB2 Accounting Reporting
DB2  Accounting ReportingDB2  Accounting Reporting
DB2 Accounting ReportingJohn Campbell
 

Ähnlich wie illumos day 2014 SMB2 (20)

How to scale your web app
How to scale your web appHow to scale your web app
How to scale your web app
 
Client/Server Paradigm And Its Implementation
Client/Server Paradigm And Its ImplementationClient/Server Paradigm And Its Implementation
Client/Server Paradigm And Its Implementation
 
What\'s new with SMB Traffic Analyzer
What\'s new with SMB Traffic AnalyzerWhat\'s new with SMB Traffic Analyzer
What\'s new with SMB Traffic Analyzer
 
Ims12 workbench data visualization - IMS UG May 2014 Sydney & Melbourne
Ims12   workbench data visualization - IMS UG May 2014 Sydney & MelbourneIms12   workbench data visualization - IMS UG May 2014 Sydney & Melbourne
Ims12 workbench data visualization - IMS UG May 2014 Sydney & Melbourne
 
Boltdb - an embedded key value database
Boltdb - an embedded key value databaseBoltdb - an embedded key value database
Boltdb - an embedded key value database
 
Mongo db roma replication and sharding
Mongo db roma replication and shardingMongo db roma replication and sharding
Mongo db roma replication and sharding
 
Getting Maximum Performance from Amazon Redshift (DAT305) | AWS re:Invent 2013
Getting Maximum Performance from Amazon Redshift (DAT305) | AWS re:Invent 2013Getting Maximum Performance from Amazon Redshift (DAT305) | AWS re:Invent 2013
Getting Maximum Performance from Amazon Redshift (DAT305) | AWS re:Invent 2013
 
20180825 jssug 09_migration_aws
20180825 jssug 09_migration_aws20180825 jssug 09_migration_aws
20180825 jssug 09_migration_aws
 
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
 
Low-level Graphics APIs
Low-level Graphics APIsLow-level Graphics APIs
Low-level Graphics APIs
 
Virtual Distro Dispatcher - A light-weight Desktop-as-a-Service solution
Virtual Distro Dispatcher - A light-weight Desktop-as-a-Service solutionVirtual Distro Dispatcher - A light-weight Desktop-as-a-Service solution
Virtual Distro Dispatcher - A light-weight Desktop-as-a-Service solution
 
RDBMS-based Coverage Collection and Analysis
RDBMS-based Coverage Collection and AnalysisRDBMS-based Coverage Collection and Analysis
RDBMS-based Coverage Collection and Analysis
 
Virtual Distro Dispatcher - A costless distributed virtual environment from T...
Virtual Distro Dispatcher - A costless distributed virtual environment from T...Virtual Distro Dispatcher - A costless distributed virtual environment from T...
Virtual Distro Dispatcher - A costless distributed virtual environment from T...
 
NetBSD and Linux for Embedded Systems
NetBSD and Linux for Embedded SystemsNetBSD and Linux for Embedded Systems
NetBSD and Linux for Embedded Systems
 
Web browser - How web browsers work?
Web browser - How web browsers work?Web browser - How web browsers work?
Web browser - How web browsers work?
 
How To Scale v2
How To Scale v2How To Scale v2
How To Scale v2
 
MySQL for Large Scale Social Games
MySQL for Large Scale Social GamesMySQL for Large Scale Social Games
MySQL for Large Scale Social Games
 
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
 
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...
 
DB2 Accounting Reporting
DB2  Accounting ReportingDB2  Accounting Reporting
DB2 Accounting Reporting
 

Kürzlich hochgeladen

UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profileakrivarotava
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 

Kürzlich hochgeladen (20)

UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profile
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 

illumos day 2014 SMB2

  • 1. SMB 2.1 & SMB 3 Protocol features, Status, Architecture, Implementation Gordon Ross <gwr@nexenta.com> Nexenta Systems, Inc. illumos day 2014
  • 2. Overview of this presentation  Summary of SMB versions and what do we support?  SMB Server Design changes  Development approach  Lessons learned  Next steps  Links, more info illumos day 2014 2
  • 3. Summary of SMB versions SMB 1 … 2.0 … 2.1 … 3.0 … What does each bring to SMB? What do we support?
  • 4. Summary of SMB versions: SMB 1 SMB1 vs. … (Why a new SMB version?)  SMB1 has become very complex – Several variants of many operations, many used only in "fall back" paths – Need for backward-compatibility increased compliexity  A "Heinz 57 variety" of calls, from several generations of clients spanning DOS 3.x WfWthrough today (Windows, Mac, etc.)  Limited performance – small MTU, misaligned data, limited parallelism – “chatty” (many round trips required)  Limited scale (16-bit IDs)  Difficult to document or test. illumos day 2014 4
  • 5. Summary of SMB versions: SMB 2.0 What’s in SMB 2.0? (vs SMB 1)  Far simpler protocol (18 commands vs "Heinz 57")  Improved scalability (larger ID sizes)  Improved network utilization – Compound requests (fewer round trips) – Connection per user – Allows larger I/O requests * – Client caching of files/dirs *  Durable handles *  Symbolic links * * optional features, not currently implemented illumos day 2014 5
  • 6. Summary of SMB versions: SMB 2.1 What’s in SMB 2.1 (vs SMB 2.0)  Previous versions exposes ZFS snapshots via SMB  Large MTU support * also enables a per-client credit system  oplock leasing model * cache delegations per object (vs per handle)  clients can sleep in more situations (where they can reclaim handles after resume) * optional features, not currently implemented illumos day 2014 6
  • 7. Summary of SMB versions: SMB 3.0  What’s in SMB 3.0 (vs SMB 2.1)  New signing algorithm (AES-256-CBC)  Optional SMB 3.0 features: – SMB Transparent Failover * – SMB Scale Out * – SMB Multichannel * – SMB Direct (RDMA) * – SMB Encryption * – VSS for SMB file shares * – SMB Directory Leasing * – SMB PowerShell * * optional features, not currently implemented For more details, see: MS KB 2709568 illumos day 2014 7
  • 8. Current Status of SMB support What SMB versions and features do we support?  Available now, in NexentaStor 4.0.3 – SMB 2.1 with all required features (some "optional" features still to come) – AD-member improvements (new DC locator) – Extended security, including Kerberos  Prototype stage: – SMB 3.0 protocol level (no optional features)  Under development, or planned: – SMB 2.1 optional features: Large MTU, durable handles… – SMB 3.0 optional features: Multi-channel, server-side copy  When does this arrive in illumos? – later, see "next steps" illumos day 2014 8
  • 9. SMB Sever Design Changes Existing multi-thread design Message processing models Challenges, approach
  • 10. SMB Server: existing multi-thread design Relatively simple threads & locking model: one thread per smb_request_t illumos day 2014 10
  • 11. Message processing (SMB1) SMB 1 request (with “&X” parts) header req. 1 &X req. 2 &X req. 3 SMB 1 worker (initialize) resp. 1 illumos day 2014 11 . . . header SMB 1 response &X resp. 2 &X resp. 3 (process req. 1) 2) 3) (send response)
  • 12. Message processing (SMB2, “related”) SMB 2 request (compound, related elements) hdr 1 req 1 SMB 2 worker (process req. 1) 2) 3) hdr 2 req 2 hdr 3 req 3 (send reply) hdr 1 resp 1 hdr 2 resp 2 hdr 3 resp 3 illumos day 2014 12 . . . SMB 2 responses (compound reply)
  • 13. Message processing (SMB2, “unrelated”) SMB 2 request (compound, unrelated elements) hdr 1 req 1 hdr 2 req 2 hdr 3 req 3 hdr 1 resp 1 hdr 2 resp 2 hdr 3 resp 3 illumos day 2014 13 SMB 2 worker C (process req. 3) SMB 2 worker B (process req. 2) SMB 2 worker A (process req. 1) . . . SMB 2 responses (may return separately)
  • 14. Message processing (SMB2, related, async) SMB 2 request (compound, related elements, async!) hdr 1 req 1 SMB 2 worker (process req. 1) 2) 3) hdr 2 req 2 hdr 3 req 3 async! (async work, then reply) hdr 1 resp 1 hdr 2 resp 2 hdr 3 resp 3 illumos day 2014 14 . . . SMB 2 responses (two!) initial reply, async reply (send 1st reply) “pending” hdr 2a resp 2a async. reply
  • 15. Message processing, multiple async (Uh oh…) SMB 2 request (compound, multiple async!) hdr 1 req 1 SMB 2 worker (process req. 1) SMB 2 worker (initial, req2a) 2) 3) hdr 2 req 2 hdr 3 req 3 async! 2nd SMB worker? (for 2nd async cmd) “pending” hdr 1 resp 1 hdr 2 resp 2 hdr 3 resp 3 illumos day 2014 15 . . . SMB 2 responses (two!) Need a new thread? async! “pending” hdr 2a resp 2a async. reply 2 hdr 3a resp 3a async. reply 3
  • 16. Message processing, multiple async. – How? An important simplification  "The server is allowed to say 'no' to any compounded request.“ (Thanks to David Kruze of MS for this tip.) – Server can return STATUS_INSUFFICIENT_RESOURCES for any request in a compound and the client will resubmit that request separately. – If we ever see more than one request in a compound that needs to "go async", we can just return the special error for the 2nd and later.  It turns out we never need to actually do this! – We've never seen a compound request with more than one command that needed to “go async” – Commands needing an async. response appear to always be last. illumos day 2014 16
  • 17. Message processing, limited async. SMB 2 request (compound, multiple async!) hdr 1 req 1 SMB 2 worker (process req. 1) 2) 3) SMB 2 worker (initial, req 1, req 2) async! “pending” illumos day 2014 17 . . . SMB 2 response hdr 2 req 2 hdr 3 req 3 hdr 1 resp 1 hdr 2 resp 2 hdr 3 resp 3 hdr 2a resp 2a async. reply async! “no res.” hdr 3a resp 3a async. reply hdr 3’ req 3’ async! SMB 2 worker (re-sent req 3’) Allow only one async. cmd in this compound
  • 18. SMB Server design changes (summary)  The existing multi-thread model continues to work in SMB2, because we can limit compounds to at most one async element.  Largest design work was the new SMB2 dispatch loop, and it’s handling of a possible async. command.  Next largest was finding SMB1-specific logic in what would now become common code shared by SMB1 & SMB2  Significant design changes for authentication and RPC over SMB “named pipes” (both use AF_UNIX sockets) illumos day 2014 18
  • 19. SMB Server design changes — impact Where the major changes land illumos day 2014 19
  • 20. Development Approach Challenges we faced, Solutions chosen, and Architecture changes to ease development
  • 21. SMB 2 Development: challenges  400 page specification [MS-SMB2] – New dispatch model (sync. vs async. replies) – 18 protocol commands. Many are simple… a few are huge ("smb2_create")  Aggressive schedule (wanted alpha in ~ 6 mo.)  Had some "technical debt" to pay – some "common" code was really SMB1-specific – extended security necessary for SMB2  Concurrently support shipping versions illumos day 2014 21
  • 22. SMB 2 Development: desires Want accelerated development We knew we had a lot of code to write and debug, much of that in-kernel code. Wish list:  Very fast edit/compile/debug cycle (< 1 min!)  Ability to use source-level debuggers  Retain ability to use mdb, ::smblist etc. illumos day 2014 22
  • 23. SMB 2 Development: approach taken  Re-use as much of the current code as possible  Work incrementally (no time to “start over”)  Keep a similar reader + taskq dispatch model, if possible (was not obvious whether we could)  Remove SMB1-specific actions from common code, i.e. smbsr_put_error calls (return status instead)  Improved testing for both SMB1 & SMB2 using open source and commercial testing tools illumos day 2014 23
  • 24. SMB 2 Development: clever tricks! Do development in user-space when we can!  Implemented a user-space version of the SMB server, allowing source-level debuggers, fast edit/compile/debug (We call this "fake smbd", or "fksmbd")  How does this work? What can it do? – Shims for kernel interfaces (“libfakekernel”) – Stubs for things we don't need – Minimal implementations of many things – Many limitations, not suitable for deployment.  Credit where credit is due: Borrowed ideas and code from ZFS (libzpool) How does this affect the architecture? … illumos day 2014 24
  • 25. SMB Server Architecture (“real” server) illumos day 2014 25
  • 26. fksmbd Server Architecture (“fake kernel”) illumos day 2014 26
  • 27. fksmbd debugging features  Sufficient functionality for most protocol-level debugging.  Source-level debuggers work (dbx/gdb)  mdb "just works" (kernel or user-mode) commands like "::smblist" work (mdb module for “libfksmbsrv”)  Also have "quick" scripts (for partial builds) sufficient to compile & run "fksmbd“ (1 min. edit/compile/debug cycle) All of these were key for enabling productivity, particularly when making extensive changes. illumos day 2014 27
  • 28. fksmbd limitations  Authentication works, but fksmbd uses only the credentials of the user who runs it. (all cred. interfaces are stubs)  Just one zone; other zone interfaces stubbed out.  VFS layer simulation very limited – Ordinary things like fop_lookup work. – Fancy things like fop_setsecattr are just stubs. – Would not scale (open FD per active vnode) This is intended as a debugging tool, not for deployment. illumos day 2014 28
  • 29. Lessons Learned What worked well? (or not so well?)
  • 30. Lessons Learned What worked well? (or not so well...)  The ability to use all our favorite tools was a huge help in accelerating development. (dtrace, mdb, dbx|gdb)  This gave us room to "pay down some technical debt" i.e. – Reduce SMB1-specific logic in common code – Improve the named pipe implementation (use AF_UNIX sockets)  Incremental development is a safe bet (small steps)  Want the code testable at all times. illumos day 2014 30
  • 31. Lessons Learned (cont.)  Automated testing helps a lot. – We ran Samba's "smbtorture" after builds (via Jenkins) – Also ran some commercial test tools periodically  Interfaces with no consumers might not work as advertised – Rename bugs in “common” SMB code – SO_RCVTIMO bug for AF_UNIX, etc.  Early testing in the field would have helped (as much as you test, there’s nothing like field experience)  Like to use “feature preview” for major new features, (better not to enable by default in the first release) illumos day 2014 31
  • 32. Next Steps Getting this work upstream to illumos continuing SMB development
  • 33. Next Steps  Work on getting what’s “ready” into illumos  SMB 2.1 and optional features – Large MTU (and multi-credit) – Durable handles  SMB 3.x, multi-channel, etc. – AES-256-CBC signing (done) – mult-channel support – server-side copy (ODX)  Windows Management Interfaces New, wbem-based administration APIs Usual disclaimers: No promises about future plans here. illumos day 2014 33
  • 34. Upstream this work to illumos? Getting the SMB work up to illumos will take some time.  There are about 150 commits to look at. With some reorganization and related commits "squashed" it's still about 50 commits in about 8 chunks.  See: smbsrv2-rework in github.com/gwr https://github.com/gwr/illumos-gate/compare/smbsrv2-rework  The XXXX markers are the points that make sense as testable milestones, and reasonable chunks to push. Anyone available to help with this? illumos day 2014 34
  • 35. Upstream work, by subject Subject Inserts Deletes Kerberos auth. inbound 898 119 New DC Locator, AD join fixes 5,861 2,224 SMB 2.1 (and follow-up fixes) 14,111 3,878 Extended Security, inbound 4,615 2,753 Improved SMB named pipes 1,071 1,865 User-mode server (for debug) * 13,708 2,090 Fixes (part B) 284 918 SMB server in a zone 896 885 Fixes (part A) 5,457 3,705 totals: 46,901 18,437 * Inflated by some necessary copying & repeated changes illumos day 2014 35
  • 36. Links: (for more information)  NexentaStor (nexenta.com)  Summary of SMB 2.1 features http://technet.microsoft.com/en-us/library/ff625695.aspx  Summary of SMB 3.0 features http://support.microsoft.com/kb/2709568  Staging area for integration into illumos http://github.com/gwr/illumos-gate/compare/smbsrv2-rework  Nexenta’s open fork of illumos gate http://github.com/Nexenta/illumos-nexenta illumos day 2014 36
  • 37. www.nexenta.com illumos day 2014 Thank-you!

Hinweis der Redaktion

  1. Lots of cheating on things we didn’t need: The CRED() macro returns static data. Things like zoneid always say “this is the global zone”