898ca1521107c94a642ae6629b9660499bf39f84
[obnox/slides/2015-05-sambaXP-multi-channel.git] / content.wiki
1 %
2 % colors:
3 %  _blue_text text_
4 %  _red_text text_
5 %
6
7
8 %%% ==== Samba... ====
9 %%% 
10 %%% <[center]
11 %%% <<<samba-kisses-better-selection.jpg,height=.8\textheight>>>
12 %%% [center]>
13 %%% 
14 %%% 
15 %%% ==== Short History ====
16 %%% 
17 %%% * 1.9.17: 1996/08
18 %%% * 2.0: 1999/01: domain-member, +SWAT
19 %%% * 2.2: 2001/04: NT4-DC
20 %%% * 3.0: 2003/09: AD-member, Samba4 project started
21 %%% * 3.2: 2008/07: GPLv3, experimental clustering
22 %%% * 3.3: 2009/01: clustering
23 %%% * 3.4: 2009/07: merged S3+S4 code
24 %%% * 3.5: 2010/03: experimental SMB 2.0
25 %%% * 3.6: 2011/09: SMB 2.0
26 %%% * 4.0: 2012/12: AD/DC, SMB 2.0 durable handles, 2.1, 3.0
27 %%% * 4.1: 2013/10: stability
28 %%% * 4.2: 2015/03: AD trusts, leases, performance, scalability, CTDB
29 %%% %%%CTDB included
30
31 %%% ==== Release Stream ====
32 %%% 
33 %%% 
34 %%% <[center]
35 %%% <<<samba-release-stream_exp.png,width=.8\textwidth>>>
36 %%% [center]>
37
38 %%% ==== Release Planning ====
39 %%% 
40 %%% <[center]
41 %%% \large
42 %%% @https://wiki.samba.org/index.php/Samba\_Release\_Planning@
43 %%% [center]>
44
45 %%% ==== Samba Team ====
46 %%% 
47 %%% <[center]
48 %%% <<<samba-team-20141011.png,height=.9\textheight>>>
49 %%% [center]>
50 %%% 
51 %%% ==== Samba Team ====
52 %%% 
53 %%% <[center]
54 %%% <<<samba-team-20141011-colorized.png,height=.9\textheight>>>
55 %%% [center]>
56
57
58 %%% ==== ====[plain]
59 %%% 
60 %%% %%\transdissolve
61 %%% 
62 %%% <[center]
63 %%% <[columns]
64 %%% [[[.3\textwidth]]]
65 %%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
66 %%% [[[.3\textwidth]]]
67 %%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
68 %%% [[[.3\textwidth]]]
69 %%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
70 %%% [columns]>
71 %%% [center]>
72
73
74
75 %% ==== Samba File Server Topics / Challenges ====
76 %% 
77 %% # performance: scalable file server
78 %% #* scale-up: exhaust powerful boxes
79 %% #* scale-out: flexible all-active clusters
80 %% #* scale-down: perform well on low-end boxes
81 %% # interop: multi-protocol access (nfs, afp, ...)
82 %% # server workloads / SMB features
83 %% #* tune for: small \# of connections, threaded applications
84 %% #* Hyper-V, ...
85 %% #* SMB3 (clustering, RDMA, ...)
86 %% # special file systems support (gluster, ceph, gpfs, btrfs, ...)
87 %% # cloud / openstack?...
88 %% %* (samba $\leftrightarrow$ cifs.ko alternative to nfs?...)
89
90
91 %% ==== Samba File Serving Topics ====
92 %% 
93 %% * Performance
94 %% * Clustering (CTDB)
95 %% * SMB features (SMB3...)
96 %% * Interop (protocols, NFS, AFP, ...)
97 %% * special file systems support (gluster, ceph, gpfs, btrfs...)
98 %% * ...
99
100 %%==== Other Samba Topics ====
101 %%
102 %%* Auth/Domain Member
103 %%* RPC server
104 %%* AD Sever
105 %%* ...
106
107 %%% ==== Performance ====[plain]
108 %%% 
109 %%% %%\transdissolve
110 %%% 
111 %%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
112 %%% 
113 %%% 
114 %%% ==== Performance - low end systems ====
115 %%% 
116 %%% 
117 %%% <[block]{Reduction of CPU usage for low profile platforms like arm (SMB2)}
118 %%% * Samba 4.0:
119 %%% ** didn't saturate 1G nic (arm), CPU 100\%
120 %%% * reduced memory allocations
121 %%% * instrument SMB 2.1 multi-credit / large MTU
122 %%% * Samba 4.2:
123 %%% ** saturates 1G nic (arm), CPU $<$ 100\%
124 %%% * ==> continuing
125 %%% [block]>
126 %%% 
127 %%% ==== Performance - DB performance ====
128 %%% 
129 %%% <[block]{TDB}
130 %%% * trivial database
131 %%% * used for IPC (smbd processes)
132 %%% * cluster (CTDB): local copies
133 %%% [block]>
134 %%% 
135 %%% <[block]{hot databases}
136 %%% * @locking.tdb@ (open files)
137 %%% * @brlock.tdb@ (byte range locks)
138 %%% * @notify\_index.tdb@ (for change notify)
139 %%% [block]>
140 %%% 
141 %%% ==== Performance - DB performance ====
142 %%% 
143 %%% <[block]{problem 1}
144 %%% * fcntl byte range locks for record locks
145 %%% * contention via single kernel spinlock
146 %%% [block]>
147 %%% 
148 %%% <[block]{solution}
149 %%% * alternative to fcntl: pthread robust mutexes
150 %%% * ==> massive speedup
151 %%% * ==> included in TDB 1.3.1,  Samba 4.2
152 %%% [block]>
153 %%% 
154 %%% ==== Performance - DB performance ====
155 %%% 
156 %%% <[block]{problem 2}
157 %%% * freelist:
158 %%% ** single chain, contended (@locking.tdb@)
159 %%% ** gets fragmented (singly linked)
160 %%% * especially a problem in ctdb-cluster: vacuuming
161 %%% [block]>
162 %%% 
163 %%% <[block]{improvements}
164 %%% * make use of small per-record freelists (dead records)
165 %%% * add automatic defragmentation upon traversal
166 %%% * ==> included in TDB 1.3.1, Samba 4.2
167 %%% [block]>
168 %%% 
169 %%% ==== Performance - DB performance ====
170 %%% <[block]{problem 3}
171 %%% * change notify not scalable
172 %%% [block]>
173 %%% 
174 %%% <[block]{first improvement}
175 %%% * restructured @notify.tdb@ to
176 %%% ** global @notify\_index.tdb@ and
177 %%% ** local @notify.tdb@
178 %%% ** ==> better but still not good enough for some workloads
179 %%% [block]>
180 %%% 
181 %%% <[block]{next steps}
182 %%% * replace DB-approach by new scalable, async notify daemon using messaging
183 %%% * some false positives do not harm
184 %%% * ==> TODO
185 %%% [block]>
186 %%% 
187 %%% 
188 %%% ==== Performance - scaling ====
189 %%% 
190 %%% <[block]{parellelism}
191 %%% * samba is multi-process:
192 %%% ** smbd child process $\leftrightarrow$ TCP connection
193 %%% ** event-loop in one process
194 %%% * within a smbd process:
195 %%% ** pthread-pool jobs for potentially blocking syscalls
196 %%% ** ==> parallelism for reads/writes
197 %%% ** default for async I/O since Samba 4.0
198 %%% [block]>
199 %%% 
200 %%% ==== Performance - scaling ====
201 %%% 
202 %%% <[block]{messaging}
203 %%% * classical messaging:
204 %%% ** messages.tdb and signals between processes
205 %%% ** does not scale well
206 %%% * new massaging in Samba 4.2:
207 %%% ** fast and scalable messaging based on unix datagram messages
208 %%% ** ==> WIP: integrate with AD/DC messaging
209 %%% ** ==> features fd-passing for sockets (SMB3 multi-channel)
210 %%% ** ==> TODO: integrate into CTDB inter-node-messaging
211 %%% [block]>
212
213
214 %%% ==== Interop ====[plain]
215 %%% 
216 %%% %\transdissolve
217 %%% 
218 %%% <[center]
219 %%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
220 %%% [center]>
221 %%% 
222 %%% 
223 %%% ==== Interop-Central ====
224 %%% 
225 %%% <[block]{multi-protocol access}
226 %%% * nfs (kernel, ganesha, ...)
227 %%% * afp: netatalk
228 %%% * local access
229 %%% * SMB2+ unix-extensions
230 %%% [block]>
231
232
233 %%% ==== File Server Layout/Scope ====
234 %%% 
235 %%% <[center]
236 %%% <<<samba-layers.jpg,height=.8\textheight>>>
237 %%% [center]>
238
239
240 %%% ==== Interop - Fruit ====
241 %%% 
242 %%% 
243 %%% <[columns]
244 %%% [[[.9\textwidth]]]
245 %%% * MacOS 10.9: SMB 2.1 preferred file protocol
246 %%% * @vfs\_fruit@ - new module in Samba 4.2
247 %%% [[[.05\textwidth]]]
248 %%% [columns]>
249 %%% 
250 %%% <[columns]
251 %%% [[[.55\textwidth]]]
252 %%% 
253 %%% * spotlight
254 %%% ** indexed search
255 %%% ** dcerpc service
256 %%% ** ==> under review
257 %%% * AAPL
258 %%% ** SMB2 create context
259 %%% ** speed up directory listings
260 %%% ** ==> under review
261 %%% 
262 %%% [[[.4\textwidth]]]
263 %%% <<<apfel_1280.jpg,width=.9\textwidth>>>
264 %%% [columns]>
265 %%% 
266 %%% ==== ====[plain]
267 %%% 
268 %%% <[center]
269 %%% \Large
270 %%% Fruit Demo
271 %%% [center]>
272
273 %% ==== SMB features ====[plain]
274 %% 
275 %% %\transdissolve
276 %% 
277 %% <[center]
278 %% <[columns]
279 %% [[[.6\textwidth]]]
280 %% 
281 %% [[[.3\textwidth]]]
282 %% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
283 %% [columns]>
284 %% [center]>
285
286
287 %% ==== SMB features in Samba - SMB2 ====
288 %% 
289 %% 
290 %% <[center]
291 %% <[columns]
292 %% [[[.7\textwidth]]]
293 %% 
294 %% * SMB 2.0 (Vista / 2008):
295 %% ** durable file handles [4.0]
296 %% * SMB 2.1 (Win7 / 2008R2):
297 %% ** multi-credit / large mtu [4.0]
298 %% ** dynamic reauthentication [4.0]
299 %% ** leasing [WIP++]
300 %% ** resilient file handles [WIP-tracer]
301 %% 
302 %% [[[.3\textwidth]]]
303 %% <<<durable-crop-colormod-1024,width=.9\textwidth>>>
304 %% [columns]>
305 %% [center]>
306
307
308
309 ==== SMB3 features in Samba ====
310
311 <[center]
312 <[columns]
313 [[[.65\textwidth]]]
314
315 # SMB 3.0 (Win8 / 2012):
316 #* new crypto (sign/encrypt) [4.0]
317 #* secure negotiation [4.0]
318 #* durable handles v2 [4.0]
319 #* persistent file handles [WIP/tracer]
320 #* '''_red_Multi-Channel_''' [WIP+]
321 #* SMB direct [designing/starting]
322 #* cluster features [designing]
323 #** witness [WIP+]
324 #* storage features [WIP]
325 # SMB 3.0.2 (Win8.1 / 2012R2): [master]
326 # SMB 3.1.1 (Win10 / 2014):
327 #* negotiate contexts, preauth: [master] 
328
329 [[[.35\textwidth]]]
330 %<<<durable-crop-colormod-1024,width=.9\textwidth>>>
331 <<<smb-auto-crop1,width=\textwidth>>>
332 [columns]>
333 [center]>
334
335
336 ==== SMB 3.1 ====
337
338 <[block]{implemented}
339 * 3.1.1 dialect
340 * negotiate contexts
341 * preauthentication integrity
342 * encryption improvements (choose cipher) \\ %
343 AES-128-CCM --> AES-128-GCM
344 [block]>
345
346 <[block]{not implemented}
347 * cluster dialect fencing
348 * cluster client failover v2 (client)
349 [block]>
350
351
352 [frame]>
353
354 <[sambabg]
355
356 ==== ====[plain]
357
358 <[center]
359 \Large
360 '''Multi-Channel'''
361 [center]>
362
363 [frame]>
364 [sambabg]>
365
366 %%==== ====[plain]
367 %%
368 %%old
369 %%
370 %
371 %%==== Clusterd Samba / CTDB (SOFS since 2007) ====
372 %%
373 %%<[center]
374 %%<<<design-ctdb-three-nodes.png,width=.9\textwidth>>>
375 %%[center]>
376
377
378
379 %%% === SMB 3.0 ====
380 %%% 
381 %%% \transdissolve
382 %%% 
383 %%% +<2->{
384 %%% * new crypto (signing, transport encryption)
385 %%% * persistent file handles
386 %%% * multi-channel
387 %%% * RDMA transport (SMB direct)
388 %%% * storage features
389 %%% * clustering
390 %%% ** witness
391 %%% ** transparent failover (continuous availability)
392 %%% ** all-active (scale-out)
393 %%% }
394 %%% 
395 %%% ==== SMB3 - Goals ====
396 %%% 
397 %%% \transdissolve
398 %%% 
399 %%% +<2->{
400 %%% * fault tolerance / reliability
401 %%% * performance / throughput / scaling
402 %%% * focus on support for server workloads \\ %
403 %%% (as opposed to workstation workloads)
404 %%% * especially support for:
405 %%% ** Hyper-V
406 %%% ** MS-SQL
407 %%% * goals:
408 %%% ** replace block storage in data center
409 %%% ** block (SCSI) over SMB
410 %%% }
411 %%% 
412 %%% ==== Requirements for Hyper-V ====
413 %%% 
414 %%% \transdissolve
415 %%% 
416 %%% +<2->{
417 %%% * minimum requirements:
418 %%% ** SMB 3.0
419 %%% ** is that really all??? - maybe resilient file handles..
420 %%% }
421 %%% +<3->{
422 %%% * desired features:
423 %%% ** cluster ($\ge 2$ nodes)
424 %%% ** CA / persistent handles
425 %%% ** RDMA / SMB direct
426 %%% ** multi channel
427 %%% }
428
429 %%% ==== SMB Protocol in Samba ====
430 %%% 
431 %%% \transdissolve
432 %%% 
433 %%% +<2->{
434 %%% * Samba $<$ 3.5:
435 %%% ** SMB 1
436 %%% * Samba 3.5:
437 %%% ** experimental incomplete support for SMB 2.0
438 %%% * Samba 3.6:
439 %%% ** official support for SMB 2.0
440 %%% ** missing: durable handles
441 %%% ** default server max proto: SMB 1
442 %%% * Samba 4.0:
443 %%% ** SMB 2.0: complete with durable handles
444 %%% ** SMB 2.1: basis, multi-credit, dynamic reauthentication
445 %%% ** SMB 3.0: basis, crypto, secure negotiation, durable v2
446 %%% ** default server max proto: SMB 3.0
447 %%% * Samba 4.1
448 %%% ** SMB 3.02: basic
449 %%% }
450
451 %%% ====  ==== [plain]
452 %%% <[center]
453 %%% {\Large
454 %%% Technical Details...
455 %%% }
456 %%% [center]>
457
458 %%% ==== ====[plain]
459 %%% 
460 %%% \transdissolve
461 %%% 
462 %%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
463 %%% 
464 %%% 
465 %%% 
466
467 ==== Multi-Channel - General ====
468
469 * bind multiple transport connections to one session
470 * increase throughput and fault tolerance
471
472 ==== Multi-Channel - Windows/Protocol ====
473
474 # establish initial session on TCP connection
475 # find interfaces with interface discovery: \\ %
476 @FSCTL\_QUERY\_NETWORK\_INTERFACE\_INFO@
477 # bind additional TCP (or RDMA) connection (channel) to established SMB3 session (session bind)
478 # windows: uses connections of same (and best quality)
479 # windows: binds only to a single node
480 # replay / retry mechanisms, epoch numbers
481
482 ==== Multi-Channel - Samba ====
483
484 <[block]{samba/smbd: multi-process}
485 * '''Currently:''' process $\Leftrightarrow$ TCP connection
486 * '''Idea:''' transfer new TPC connection to existing smbd
487 * '''How?''' ==> use fd-passing (sendmsg/recvmsg)
488 * '''When?''' as early as possible, based on client GUID \\ %
489 ==> per client GUID single process model
490 [block]>
491
492 ==== Multi-Channel - Samba ====
493
494 <[center]
495 <<<smb3-mc-samba_exp.png,height=.9\textheight>>>
496 [center]>
497
498 ==== Multi-Channel - Samba ====
499
500 # preparation: \\ %
501 messaging rewrite using unix dgm sockets with sendmsg [DONE,4.2]
502 # add fd-passing to messaging [DONE,4.2]
503 # preparations in internal structures [ess.DONE]
504 # implement smbd message to pass a tcp connection [ess.DONE]
505 # transfer connection already in negprot (ClientGUID) [largely DONE]
506 # implement session bind [ess.DONE]
507 # implement channel epoch numbers [WIP]
508 # implement interface discovery [WIP]
509 # implement test case [WIP]
510
511
512 ==== @MSG\_SMBXSRV\_CONNECTION\_PASS@ ====
513
514 <[block]{from smbXsrv.idl}
515 <[code]
516 typedef struct {
517     NTTIME                 initial_connect_time;
518     GUID                   client_guid;
519     hyper                  seq_low;
520     DATA_BLOB              negotiate_request;
521 } smbXsrv_connection_pass0;
522 [code]>
523 [block]>
524
525 ==== Internal Structures (smbXsrv) ====
526
527
528 <[block]{before}
529 <[code]
530 smbXsrv_session->smbXsrv_connection
531 [code]>
532 [block]>
533
534 <[block]{after}
535 <[code]
536 smbXsrv_session->smbXsrv_client->smbXsrv_connections
537 [code]>
538 [block]>
539
540 [frame]>
541
542 <[sambabg]
543
544 ==== ====[plain]
545
546 <[center]
547 \Large
548 shell breakout to browse code/diff
549 [center]>
550
551
552
553 ==== ====[plain]
554
555 <[center]
556 \Large
557 Multi-Channel Demo
558 [center]>
559
560 ==== ====[plain]
561
562 <[center]
563 \Large
564 '''Outlook: SMB Direct'''
565 [center]>
566
567 [frame]>
568 [sambabg]>
569
570
571 ==== SMB Direct (RDMA) ====
572
573 * windows:
574 ** requires multi-channel
575 ** start with TCP, bind an RDMA channel
576 ** reads and writes use RDMA write/read
577 ** protocol/metadata via send/receive
578
579 * wireshark dissector: [DONE]
580
581 * samba (TODO):
582 ** prereq: multi-channel / fd-passing
583 ** buffer / transport abstractions [TODO]
584 ** _red_problem_: libraries: not fork safe and no fd-passing \\ %
585 ==> central daemon (or kernel module) to serve as RDMA "proxy"
586
587 ==== SMB Direct (RDMA) - Plan ====
588
589 <[center]
590 <<<smb3-rdma-samba-v2_exp.png,height=.9\textheight>>>
591 [center]>
592
593 %%%==== SMB Direct (RDMA) - Plan ====
594 %%%
595 %%%+<2->{
596 %%%* smbd-d (rdma proxy daemon)
597 %%%** listens on unix domain socket (@/var/lib/smbd-d/socket@)
598 %%%** listens for RDMA connection (as told by main smbd)
599 %%%* main smbd:
600 %%%** listens for TCP connections
601 %%%** connects to smbd-d-socket
602 %%%*** request rdma-interfaces, tell smbd-d on which to listen
603 %%%** "accepts" new smb-direct connections on smdb-d-socket
604 %%%}
605 %%%
606 %%%==== SMB Direct (RDMA) - Plan ====
607 %%%
608 %%%+<2->{
609 %%%* client
610 %%%** connects via TCP --> smbd forks child smbd (c)
611 %%%** connects via RDMA to smbd-d
612 %%%* smbd-d
613 %%%** creates socket-pair as rdma-proxy-channel
614 %%%** passes one end of socket-pair to main smbd for accept
615 %%%** sends smb direct packages over proxy-channel
616 %%%* main smbd
617 %%%** upon receiving NegProt: pass proxy-socket to c based on ClientGUID
618 %%%* c
619 %%%** continues proxy-communication with smdb-d
620 %%%}
621 %%%+<3->{
622 %%%* For @rdma\_read@ and @rdma\_write@:
623 %%%** c and smbd-d establish shared memory area
624 %%%}
625
626
627 %%% ==== Persistent Handles ====
628 %%% 
629 %%% \transdissolve
630 %%% 
631 %%% +<2->{
632 %%% * like durable file handles with strong guarantees
633 %%% * framework is already there in samba (by support for durable v2)
634 %%% ** ==> easy to satisfy at the protocol level
635 %%% }
636 %%% +<3->{
637 %%% * the difficulty lies in implementing the guarantees
638 %%% ** need make metadata persistent
639 %%% ** but don't kill performance!
640 %%% ** persistent tdbs !would! kill performance
641 %%% ** ideas:
642 %%% *** need to be sync
643 %%% *** record-level transactions (instead of db-level)
644 %%% *** only replicate to some nodes, not all
645 %%% }
646
647
648 %%==== Clustering Concepts (Windows) ====
649 %%
650 %%\transdissolve
651 %%
652 %%+<2->{
653 %%* Cluster:
654 %%** (``traditional'') failover cluster (active-passive)
655 %%** protocol: @SMB2\_SHARE\_CAP\_CLUSTER@
656 %%** Windows:
657 %%*** runs off a cluster (failover) volume
658 %%*** offers the Witness service
659 %%}
660 %%+<3->{
661 %%* Scale-Out (SOFS):
662 %%** scale-out cluster (all-active!)
663 %%** protocol: @SMB2\_SHARE\_CAP\_SCALEOUT@
664 %%** no client caching
665 %%** Windows: runs off a cluster shared volume (implies cluster)
666 %%}
667 %%+<4->{
668 %%* Continuous Availability (CA):
669 %%**  transparent failover, persistent handles
670 %%**  protocol: @SMB2\_SHARE\_CAP\_CONTINUOUS\_AVAILABILITY@
671 %%**  can independently turned on on any cluster share (failover or scale-out)
672 %%** ==> changed client retry behaviour!
673 %%}
674
675 %%% ==== Clustering -- Controlling Flags from Windows ====
676 %%% 
677 %%% \transdissolve
678 %%% 
679 %%% +<2->{
680 %%% * a share on a cluster carries
681 %%% ** @SMB2\_SHARE\_CAP\_CLUSTER@ $\Leftrightarrow$ the shared FS is a cluster volume.
682 %%% }
683 %%% +<3->{
684 %%% * a share on a cluster carries
685 %%% ** @SMB2\_SHARE\_CAP\_SCALEOUT@ $\Leftrightarrow$ the shared FS is a CSV
686 %%% *** implies  @SMB2\_SHARE\_CAP\_CLUSTER@
687 %%% }
688 %%% +<4->{
689 %%% * independently settable on a clustered share:
690 %%% ** @SMB2\_SHARE\_CAP\_CONTINUOUS\_AVAILABILITY@
691 %%% *** implies  @SMB2\_SHARE\_CAP\_CLUSTER@
692 %%% }
693 %%% 
694
695 %%==== Clustering -- Server Behaviour ====
696 %%
697 %%\transdissolve
698 %%
699 %%+<2->{
700 %%* @SMB2\_SHARE\_CAP\_CLUSTER@:
701 %%** run witness service (RPC)
702 %%** client can register and get notified about resource changes
703 %%}
704 %%+<3->{
705 %%* @SMB2\_SHARE\_CAP\_SCALEOUT@:
706 %%** do not grant batch oplocks, write leases, handle leases
707 %%** ==> no durable handles unless also CA
708 %%}
709 %%+<4->{
710 %%* @SMB2\_SHARE\_CAP\_CONTINUOUS\_AVAILABILITY@:
711 %%** offer persistent handles
712 %%** timeout from durable v2 request
713 %%}
714 %%
715
716 %%==== Clustering -- Client Behaviour (Win8) ====
717 %%
718 %%\transdissolve
719 %%
720 %%
721 %%+<2->{
722 %%* @SMB2\_SHARE\_CAP\_CLUSTER@:
723 %%** clients happily work if witness is not available
724 %%}
725 %%+<3->{
726 %%* @SMB2\_SHARE\_CAP\_SCALEOUT@:
727 %%** clients happily connect if @CLUSTER@ is not set.
728 %%** clients DO request oplocks/leases/durable handles
729 %%** clients are not confused if they get these
730 %%}
731 %%+<4->{
732 %%* @SMB2\_SHARE\_CAP\_CONTINUOUS\_AVAILABILITY@:
733 %%** clients happily connect if @CLUSTER@ is not set.
734 %%** clients typically request persistent handle with RWH lease
735 %%}
736
737 %%%+<5->{
738 %%%* Note:\\ %
739 %%%Win8 sends @SMB2\_FLAGS\_REPLAY\_OPERATION@ in writes and reads (from 2nd in a row) \\ %
740 %%%$\Leftrightarrow$ \\ %
741 %%%The server announces @SMB2\_CAP\_PERSISTENT\_HANDLES@.
742 %%%}
743
744 %%% ==== Clustering -- Client Behaviour (Win8) : Retries  ====
745 %%% 
746 %%% +<2->{
747 %%% * Test: Win8 against slightly pimped Samba (2 IPs)
748 %%% }
749 %%% +<3->{
750 %%% * Server-Matrix (on/off):
751 %%% ** persistent handle cap
752 %%% ** durable handles
753 %%% ** cluster share cap
754 %%% ** scale out cap
755 %%% ** ca share cap
756 %%% }
757 %%% +<4->{
758 %%% * The test:
759 %%% ** connect to share with explorer
760 %%% ** start copying file (2G)
761 %%% ** kill smbd
762 %%% ** wait for the client to pop up an error dialog
763 %%% ** click cancel
764 %%% ** stop capture
765 %%% }
766 %%% 
767 %%% ==== Clustering -- Client Behaviour (Win8) : Retries  ====
768 %%% 
769 %%% +<2->{
770 %%% * only two different retry characteristics: CA $\leftrightarrow$ non-CA
771 %%% }
772 %%% +<3->{
773 %%% * non-CA-case
774 %%% ** 3 consecutive attempt rounds:
775 %%% *** for each of the two IPs: \\ %
776 %%% arp IP \\ %
777 %%% three tcp syn attempts to IP with 0.5 sec breaks
778 %%% ** ==> some 2.1 seconds for 1 round
779 %%% ** between attempts:
780 %%% ** dns, ping, arp ... 5.8 seconds
781 %%% ** ==> _red_18 seconds_
782 %%% }
783 %%% +<4->{
784 %%% * CA-Case
785 %%% ** retries attempt rounds from above for _red_14 minutes_
786 %%% }
787 %%% 
788 %%% 
789 %%% 
790 %%% ==== ====[plain]
791 %%% 
792 %%% \transdissolve
793 %%% 
794 %%% <[center]
795 %%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
796 %%% [center]>
797 %%% 
798 %%% 
799
800 %%==== Clustering with Samba/CTDB ====
801 %%
802 %%+<2->{
803 %%* all-active SMB-cluster with Samba and CTDB... \\ %
804 %%+<3->{...since 2007! \smiley }
805 %%}
806 %%+<4->{
807 %%* transparent for the client
808 %%** CTDB:
809 %%*** metadata and messaging engine for Samba in a cluster
810 %%*** plus cluster resource manager (IPs, services...)
811 %%** client only sees one ``big'' SMB server
812 %%** we could not change the client!...
813 %%** works ``well enough''
814 %%}
815 %%+<5->{
816 %%* challenge:
817 %%** how to integrate SMB3 clustering with Samba/CTDB
818 %%** good: rather orthogonal
819 %%** ctdb-clustering transparent mostly due to management
820 %%}
821 %%
822 %%==== Witness Service ====
823 %%
824 %%+<2->{
825 %%* an RPC service
826 %%** monitoring of availability of resources (shares, NICs)
827 %%** server asks client to move to another resource
828 %%}
829 %%+<3->{
830 %%* remember:
831 %%** available on a Windows SMB3 share $\Leftrightarrow$ @SMB2\_SHARE\_CAP\_CLUSTER@
832 %%** but clients happily connect w/o witness
833 %%}
834 %%+<4->{
835 %%* status in Samba [WIP (Metze, Gregor Beck)]:
836 %%** async RPC: WIP, good progress ($\Rightarrow$ Metze's talk)
837 %%** wireshark dissector: essentially done
838 %%** client: in @rpcclient@ - done
839 %%** server: dummy PoC / tracer bullet implementation done
840 %%** CTDB: changes / integration needed
841 %%}
842
843
844 %%% ==== ====[plain]
845 %%% 
846 %%% <[center]
847 %%% {\Large
848 %%% !@https://wiki.samba.org/index.php/SMB3@!
849 %%% }
850 %%% [center]>
851 %%% 
852 %%% ==== ====[plain]
853 %%% 
854 %%% \transdissolve
855 %%% 
856 %%% <[center]
857 %%% <[columns]
858 %%% [[[.6\textwidth]]]
859 %%% 
860 %%% [[[.3\textwidth]]]
861 %%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
862 %%% [columns]>
863 %%% [center]>
864 %%% 
865
866 ==== SMB features in Samba ====
867
868 <[center]
869 \Large
870 @https://wiki.samba.org/index.php/Samba3/SMB3@
871 [center]>
872
873
874 %%% ==== Misc ====[plain]
875 %%% 
876 %%% %\transdissolve
877 %%% 
878 %%% <[center]
879 %%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
880 %%% [center]>
881
882 %%% ==== Misc ====
883 %%% 
884 %%% <[block]{File Systems}
885 %%% * gpfs, gluster, ceph, btrfs...
886 %%% * support through vfs modules
887 %%% * fuse-based: avoid context switches
888 %%% * instrument SMB3 storage features (fsctls)
889 %%% [block]>
890 %%% 
891 %%% ==== Misc ====
892 %%% 
893 %%% %%<[block]{Under the hood}
894 %%% %%* restructurings, reconsilations
895 %%% %%* ctdb moved into samba tree
896 %%% %%* published libs: talloc, tdb, tevent ...
897 %%% %%[block]>
898 %%% 
899 %%% <[block]{Testing}
900 %%% * unprivileged selftest, autobuild
901 %%% * selfcontained testing: wrapper
902 %%% ** socket wrapper
903 %%% ** nss wrapper
904 %%% ** uid wrapper
905 %%% ** resolv wrapper [_red_new_]
906 %%% * externalized as separate projects:
907 %%% ** ==> @http://cwrap.org/@
908 %%% ** git on samba.org
909 %%% ** ==> Andreas Schneider's talk
910 %%% [block]>
911
912
913 %%% ==== Forecast: Cloudy ====
914 %%% 
915 %%% <[block]{Possible involvement with OpenStack}
916 %%% * SMB storage service for Windows (and other) VMs
917 %%% * SMB3 storage backend for Hyper-V images
918 %%% * also: chances for AD-integration into auth
919 %%% [block]>
920
921 %% ==== Credits ====
922 %% 
923 %% <[block]{especially but not exclusively}
924 %% * Volker Lendecke
925 %% * Stefan Metzmacher
926 %% * Ralph Böhme
927 %% * Jeremy Allison
928 %% * David Disseldorp
929 %% * Andreas Schneider
930 %% [block]>
931
932
933 %%% ==== Conclusion ====[plain]
934 %%% 
935 %%% %%\transdissolve
936 %%% 
937 %%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
938 %%% 
939 %%% 
940 %%% ==== Conclusion ====
941 %%% 
942 %%% <[block]{Remember}
943 %%% * Samba 4.X is quite different from 3.Y
944 %%% [block]>
945 %%% 
946 %%% <[block]{What's coming?}
947 %%% * Performance: the story continues
948 %%% * Interop: strengthen strenths
949 %%% * SMB(3) features: a lot to come ( ==> cluster, hyper-v, ...)
950 %%% * Some clouds in the sky...
951 %%% [block]>
952
953 [frame]>
954
955 <[sambabg]
956 ==== Thanks for your attention! ====[plain]
957
958 %\transdissolve
959
960 <[center]
961 <[columns]
962 [[[.6\textwidth]]]
963
964 {\Large
965
966 Questions?
967
968 --*3em--
969
970 @obnox\@samba.org@
971
972 --*.5em--
973
974 @madam\@redhat.com@
975 }
976 [[[.3\textwidth]]]
977 <<<feet-sand-1280.png,height=.8\textheight>>>
978 %<<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
979
980 [columns]>
981 [center]>
982 [frame]>
983 [sambabg]>