13. Using SMB Direct & Multichannel
Without Multichannel
•No automatic failover
•Can’t use full bandwidth
–Only one NIC engaged
–RDMA capability not used
With Multichannel
•Automatic NIC failover
•Combined NIC bandwidth available
–Multiple NICs engaged
–Multiple RDMA connections
Reference by Jose Barreto's Blog
13
21. SQL Server 2012 using
SMB3 file shares
By Mario Broodbakker, Insight
Technology Inc
21
22. whoami
• Joined Insight Technology in August 2011
mostly worked on SQL Server DMA.
Helped ITI acquiring Oracle DMA
techniques in 2003 already.
• Before that: over 10 years of performance
engineering work on Oracle and SQL
Server, working for Baan, Compaq and HP
in Holland and USA.
• Started DBA career 25 years ago..
22
23. Windows 2012 SMB
• New version of SMB (Server Message Block
protocol): SMB3.0
• New features that can be used for SQL
Server:
– SMB Direct: SMB using RDMA (see next slides)
– SMB Multichannel, use multiple NICs for
throughput and failover (demo, if time permits)
– VSS (volume snapshot service) for SMB file
shares, to enable backup/restore
– SMB transparent failover (not yet on IQube..)
– PowerShell scriptable
23
24. SMB Direct 1
• RDMA: Remote Direct Memory Access
– Low latency protocol
– Low CPU overhead
SQL
Server
user
SMB SMB
Client Server
NTFS kernel
RDMA RDMA
network network
RDMA RDMA
NIC NIC
24
25. SMB Direct 2
• Direct memory copy by NIC hardware (must
be RDMA capable)
– Bypass TCP/IP and OS stack: while NIC
hardware copies data, CPU can do other work
• Transport Offload
• Zero Copy
• Kernel Bypass
• Can be used over any RDMA capable NIC
like Infiniband, (10Gb) Ethernet.
• Different protocols: Infiniband, iWarp, RoCE
• SMB client decides when to use RDMA
25
26. Advantages SMB
• Ease of use: everybody ‘understands’ file
shares
• No configuration or specialist knowledge
necessary to manage
– Out-of-the-box (almost): SMB Multichannel,
automatic failover, auto detection
– DBA can use standard perfmon counters to
understand IO load
26
27. SQL Server on SMB
• Possible since SQL Server 2008R2
http://sqlcat.com/sqlcat/b/technicalnotes/archive/2010/05/07/top-10-hidden-gems-in-sql-2008-r2.aspx
– Create database and logfiles on shares:
Create Database tpch100g on
Primary (name=tpch100g,
filename='¥¥fs1¥disk1¥tpch100g.mdf',size=10mb,filegrowth=0),
FileGroup iqdemo ..etc..
– But needs Windows 2012 to use SMB Direct
– Make sure SQL Server (domain) account has
permissions on the file share, and folders.
– SQL Server 2012: System DB on file share: install
root directly on share
– SQL Server AlwaysOn Failover Cluster supported
http://www.sqlskills.com/blogs/jonathan/post/Failover-Clustering-without-a-SAN-SQL-Server-2012-and-SMB-for-Shared-Storage.aspx
27
28. Verify RDMA
• Why? SMB can choose to use RDMA or IP at
runtime
• Also not all inbox drivers (and firmware
combinations) work.
– Perfmon Counters: RDMA Activity, SMB Direct
Connection .(SMB Server/Client Shares)
– PowerShell: Get-NetAdapterRDMA, Get-
SmbServerNetworkInterface, Get-
SmbClientNetworkInterface
– netstat.exe -xan | ? {$_ -match “445”}
28
30. Mellanox toolbox
C:¥Program Files¥Mellanox¥MLNX_VPI¥IB¥Tools>ibstat
CA 'ibv_device0'
CA type:
Number of ports: 1
Firmware version: 0x2000903e8
Hardware version: 0xb0
Node GUID: 0x002590ffff2ed2bc
System image GUID: 0x002590ffff2ed2bf
Port 1:
State: Active
Physical state: LinkUp
Rate: 40
Real rate: 32.00 (QDR)
Base lid: 16
LMC: 0
SM lid: 15
Capability mask: 0x90580000
Port GUID: 0x002590ffff2ed2bd
30
31. Benchmarking your setup
• Verify if all components work as expected
– Use an IO generator tool like sqlio or iometer
– Understand that you are generating serious
amounts of IO.
Therefore use multiple processes and
multiple threads
– Start testing local IO, then move on to network
– Use big (>10GB) test files to get smooth
performance
– Get a TPC-H kit from tpc.org (and scripts from
full disclosure reports posted by vendors)
31
32. Things to think about..
• Extent allocation: defaults to 1 extent (64k)
per file (round robin) ‘proportional fill’
• Use –E to get 64 extent proportional fill
• Traceflags: -T834 (large pages), -T2301
(DSS optimizations
http://support.microsoft.com/kb/920093
• Minimal logging options for dataloading,
see also:
– Microsoft Data loading performance guide
http://msdn.microsoft.com/en-us/library/dd425070.aspx
32
33. Insight Qube test
disks2.5 GB/sec
SQL Server s
ib
4.2 GB/sec
Windows 2012 IB
Switch
6.5 GB/sec ib
IB card: 3.5 GB/sec
ib
PCI-E Gen2
x8 4 GB/sec
ib ib
33
34. Summary
• SMB, RDMA, Infiniband combination
scales very well, mostly limited by PCI bus
speeds
• Easy to understand and administer
• Know your system, benchmark your
components and system.. or
• Insight Qube can do it for you !
34