lce14: content
[obnox/slides/2014-10-lce.git] / base-wiki.wiki
1 %
2 % colors:
3 %  _blue_text text_
4 %  _red_text text_
5 %
6
7 ==== ====[plain]
8
9 %%\transdissolve
10
11 <[center]
12 <[columns]
13 [[[.3\textwidth]]]
14 <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
15 [[[.3\textwidth]]]
16 <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
17 [[[.3\textwidth]]]
18 <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
19 [columns]>
20 [center]>
21
22
23 ==== Samba... ====
24
25 <[center]
26 <<<samba-kisses-better-selection.jpg,height=.8\textheight>>>
27 [center]>
28
29
30 ==== Short History ====
31
32 * 1.9.17: 1996/08
33 * 2.0: 1999/01: domain-member, +SWAT
34 * 2.2: 2001/04: NT4-DC
35 * 3.0: 2003/09: AD-member, Samba4 project started
36 * 3.2: 2008/07: GPLv3, experimental clustering
37 * 3.3: 2009/01: clustering
38 * 3.4: 2009/07: merged S3+S4 code
39 * 3.5: 2010/03: experimental SMB 2.0
40 * 3.6: 2011/09: SMB 2.0
41 * 4.0: 2012/12: AD/DC, SMB 2.0 durable handles, 2.1, 3.0
42 * 4.1: 2013/10: stability
43 * 4.2: soon: AD trusts, performance, scalability, CTDB included
44
45 ==== Release Stream ====
46
47
48 <[center]
49 <<<samba-release-stream_exp.png,width=.8\textwidth>>>
50 [center]>
51
52
53 ==== ====[plain]
54
55 %%\transdissolve
56
57 <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
58
59
60 ==== Samba File Serving Topics ====
61
62 * SMB features (SMB3...)
63 * Clustering (CTDB)
64 * Performance
65 * Interop (Protocols, NFS, AFP, ...)
66 * special file systems support
67 * ...
68
69 %%==== Other Samba Topics ====
70 %%
71 %%* Auth/Domain Member
72 %%* RPC server
73 %%* AD Sever
74 %%* ...
75
76 ==== File Server Habitat ====
77
78 * scalable file server
79 ** scale-out: powerful clusters
80 ** scale-down: low-end boxes
81 * server workloads
82 ** hyper-v
83 * cloud / openstack?
84 * (samba $\leftrightarrow$ cifs.ko alternative to nfs?...)
85
86
87 ==== Performance ====
88
89 * cpu usage
90 ** low profile platforme (arm, ...)
91 ** memory allocations
92 * database performance
93 ** tdb
94 *** mutexes
95 *** freelist layout
96 ** concrete db design (notify, open files, ...)
97 * scaling out (1 system)
98 ** parallelism
99 *** async I/O with helper threads
100 * cluster performance
101
102
103 ==== Interop ====
104
105 * multi-protocol access
106 ** nfs (kernel, ganesha, ...)
107 ** afp: netatalk
108
109 * client-specific
110 ** apple:
111 *** @vfs\_fruit@
112 *** spotlight
113 *** AAPL
114 ** SMB2+ unix-extensions
115
116
117 ==== ====[plain]
118
119 old
120
121
122 ==== File Server Layout/Scope ====
123
124 <[center]
125 <<<samba-layers.jpg,height=.8\textheight>>>
126 [center]>
127
128 ==== SMB Features ====
129
130 * SMB 2.0:
131 ** durable file handles [4.0]
132 * SMB 2.1:
133 ** multi-credit / large mtu [4.0]
134 ** dynamic reauthentication [4.0]
135 ** leasing [WIP++]
136 ** resilient file handles [ever?]
137 * SMB 3.0:
138 ** new crypto (sign/encrypt) [4.0]
139 ** secure negotiation [4.0]
140 ** durable handles v2 [4.0]
141 ** persistent file handles [planning]
142 ** multi-channel [WIP+]
143 ** SMB direct [designed/starting]
144 ** cluster features [designing]
145 *** witness [WIP]
146 ** storage features [WIP]
147 * SMB 3.1: [WIP]
148
149
150
151 ==== Clusterd Samba / CTDB (SOFS since 2007) ====
152
153
154 <[center]
155 <<<design-ctdb-three-nodes.png,width=.9\textwidth>>>
156 [center]>
157
158
159
160 %%% === SMB 3.0 ====
161 %%% 
162 %%% \transdissolve
163 %%% 
164 %%% +<2->{
165 %%% * new crypto (signing, transport encryption)
166 %%% * persistent file handles
167 %%% * multi-channel
168 %%% * RDMA transport (SMB direct)
169 %%% * storage features
170 %%% * clustering
171 %%% ** witness
172 %%% ** transparent failover (continuous availability)
173 %%% ** all-active (scale-out)
174 %%% }
175 %%% 
176 %%% ==== SMB3 - Goals ====
177 %%% 
178 %%% \transdissolve
179 %%% 
180 %%% +<2->{
181 %%% * fault tolerance / reliability
182 %%% * performance / throughput / scaling
183 %%% * focus on support for server workloads \\ %
184 %%% (as opposed to workstation workloads)
185 %%% * especially support for:
186 %%% ** Hyper-V
187 %%% ** MS-SQL
188 %%% * goals:
189 %%% ** replace block storage in data center
190 %%% ** block (SCSI) over SMB
191 %%% }
192 %%% 
193 %%% ==== Requirements for Hyper-V ====
194 %%% 
195 %%% \transdissolve
196 %%% 
197 %%% +<2->{
198 %%% * minimum requirements:
199 %%% ** SMB 3.0
200 %%% ** is that really all??? - maybe resilient file handles..
201 %%% }
202 %%% +<3->{
203 %%% * desired features:
204 %%% ** cluster ($\ge 2$ nodes)
205 %%% ** CA / persistent handles
206 %%% ** RDMA / SMB direct
207 %%% ** multi channel
208 %%% }
209
210 %%% ==== SMB Protocol in Samba ====
211 %%% 
212 %%% \transdissolve
213 %%% 
214 %%% +<2->{
215 %%% * Samba $<$ 3.5:
216 %%% ** SMB 1
217 %%% * Samba 3.5:
218 %%% ** experimental incomplete support for SMB 2.0
219 %%% * Samba 3.6:
220 %%% ** official support for SMB 2.0
221 %%% ** missing: durable handles
222 %%% ** default server max proto: SMB 1
223 %%% * Samba 4.0:
224 %%% ** SMB 2.0: complete with durable handles
225 %%% ** SMB 2.1: basis, multi-credit, dynamic reauthentication
226 %%% ** SMB 3.0: basis, crypto, secure negotiation, durable v2
227 %%% ** default server max proto: SMB 3.0
228 %%% * Samba 4.1
229 %%% ** SMB 3.02: basic
230 %%% }
231
232 ====  ==== [plain]
233 <[center]
234 {\Large
235 Technical Details...
236 }
237 [center]>
238
239 %%% ==== ====[plain]
240 %%% 
241 %%% \transdissolve
242 %%% 
243 %%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
244 %%% 
245 %%% 
246 %%% 
247
248 ==== Multi-Channel - Windows/Protocol ====
249
250 +<2->{
251 * find interfaces with interface discovery: \\ %
252 @FSCTL\_QUERY\_NETWORK\_INTERFACE\_INFO@
253 * bind additional TCP (or RDMA) connection (channel) to established SMB3 session (session bind)
254 * bind (TCP) connections of same quality
255 * bind only to a single node
256 * replay / retry mechanisms, epoch numbers
257 }
258
259 ==== Multi-Channel - Samba ====
260
261 +<2->{
262 * samba/smbd: multi-process
263 ** process $\Leftrightarrow$ tcp connection
264 ** ==> transfer new connection to existing smbd
265 ** use fd-passing (sendmsg/recvmsg)
266 }
267 +<3->{
268 * preparation: messaging rewrite using unix dgm sockets with sendmsg [DONE,Volker]
269 * add fd-passing [WIP]
270 * transfer connection already in negprot (ClientGUID) [TODO]
271 * implement channel epoch numbers [started]
272 * implemnt interface discovery [TODO]
273 }
274
275 ==== SMB Direct (RDMA) ====
276
277 +<2->{
278 * windows:
279 ** requires multi-channel
280 ** start with TCP, bind an RDMA channel
281 ** reads and writes use RDMB write/read
282 ** protocol/metadata via send/receive
283 }
284 +<3->{
285 * wireshark dissector: [DONE (Metze)]
286 }
287 +<4->{
288 * samba (TODO):
289 ** prereq: multi-channel / fd-passing
290 ** buffer / transport abstractions [TODO]
291 ** central daemon (or kernel module) to serve as RDMA "proxy" \\ %
292 (libraries: not fork safe and no fd-passing)
293 }
294
295 ==== SMB Direct (RDMA) - Plan ====
296
297 +<2->{
298 * smbd-d (?) listens for RDMA connection
299 * main smbd listens for TCP connection
300 * main smbd listens (for RDMA) via unix socket connect to smbd-d
301 * client connects via TCP --> smbd forks child smbd (c1)
302 * client connects via RDMA to smbd-d
303 * smbd-d notifies main smbd and transfers connection info
304 * smbd forks child (c2) that inherits connection to smbd-d
305 * c2 smbd passes [connection to smbd-d] to c1 (via ClientGUID) and exits 
306 * c1 establishes mmap area with smbd-d
307 * client does rdma calls to smbd-d
308 ** metadata and protocol calls are transferred via socket to tcp-smbd
309 ** rdma read/write directly to tcp-smbd via mmap area
310 }
311
312 %%% ==== Persistent Handles ====
313 %%% 
314 %%% \transdissolve
315 %%% 
316 %%% +<2->{
317 %%% * like durable file handles with strong guarantees
318 %%% * framework is already there in samba (by support for durable v2)
319 %%% ** ==> easy to satisfy at the protocol level
320 %%% }
321 %%% +<3->{
322 %%% * the difficulty lies in implementing the guarantees
323 %%% ** need make metadata persistent
324 %%% ** but don't kill performance!
325 %%% ** persistent tdbs !would! kill performance
326 %%% ** ideas:
327 %%% *** need to be sync
328 %%% *** record-level transactions (instead of db-level)
329 %%% *** only replicate to some nodes, not all
330 %%% }
331
332
333 ==== Clustering Concepts (Windows) ====
334
335 \transdissolve
336
337 +<2->{
338 * Cluster:
339 ** (``traditional'') failover cluster (active-passive)
340 ** protocol: @SMB2\_SHARE\_CAP\_CLUSTER@
341 ** Windows:
342 *** runs off a cluster (failover) volume
343 *** offers the Witness service
344 }
345 +<3->{
346 * Scale-Out (SOFS):
347 ** scale-out cluster (all-active!)
348 ** protocol: @SMB2\_SHARE\_CAP\_SCALEOUT@
349 ** no client caching
350 ** Windows: runs off a cluster shared volume (implies cluster)
351 }
352 +<4->{
353 * Continuous Availability (CA):
354 **  transparent failover, persistent handles
355 **  protocol: @SMB2\_SHARE\_CAP\_CONTINUOUS\_AVAILABILITY@
356 **  can independently turned on on any cluster share (failover or scale-out)
357 ** ==> changed client retry behaviour!
358 }
359
360 %%% ==== Clustering -- Controlling Flags from Windows ====
361 %%% 
362 %%% \transdissolve
363 %%% 
364 %%% +<2->{
365 %%% * a share on a cluster carries
366 %%% ** @SMB2\_SHARE\_CAP\_CLUSTER@ $\Leftrightarrow$ the shared FS is a cluster volume.
367 %%% }
368 %%% +<3->{
369 %%% * a share on a cluster carries
370 %%% ** @SMB2\_SHARE\_CAP\_SCALEOUT@ $\Leftrightarrow$ the shared FS is a CSV
371 %%% *** implies  @SMB2\_SHARE\_CAP\_CLUSTER@
372 %%% }
373 %%% +<4->{
374 %%% * independently settable on a clustered share:
375 %%% ** @SMB2\_SHARE\_CAP\_CONTINUOUS\_AVAILABILITY@
376 %%% *** implies  @SMB2\_SHARE\_CAP\_CLUSTER@
377 %%% }
378 %%% 
379 ==== Clustering -- Server Behaviour ====
380
381 \transdissolve
382
383 +<2->{
384 * @SMB2\_SHARE\_CAP\_CLUSTER@:
385 ** run witness service (RPC)
386 ** client can register and get notified about resource changes
387 }
388 +<3->{
389 * @SMB2\_SHARE\_CAP\_SCALEOUT@:
390 ** do not grant batch oplocks, write leases, handle leases
391 ** ==> no durable handles unless also CA
392 }
393 +<4->{
394 * @SMB2\_SHARE\_CAP\_CONTINUOUS\_AVAILABILITY@:
395 ** offer persistent handles
396 ** timeout from durable v2 request
397 }
398
399
400 ==== Clustering -- Client Behaviour (Win8) ====
401
402 \transdissolve
403
404
405 +<2->{
406 * @SMB2\_SHARE\_CAP\_CLUSTER@:
407 ** clients happily work if witness is not available
408 }
409 +<3->{
410 * @SMB2\_SHARE\_CAP\_SCALEOUT@:
411 ** clients happily connect if @CLUSTER@ is not set.
412 ** clients DO request oplocks/leases/durable handles
413 ** clients are not confused if they get these
414 }
415 +<4->{
416 * @SMB2\_SHARE\_CAP\_CONTINUOUS\_AVAILABILITY@:
417 ** clients happily connect if @CLUSTER@ is not set.
418 ** clients typically request persistent handle with RWH lease
419 }
420
421 %%%+<5->{
422 %%%* Note:\\ %
423 %%%Win8 sends @SMB2\_FLAGS\_REPLAY\_OPERATION@ in writes and reads (from 2nd in a row) \\ %
424 %%%$\Leftrightarrow$ \\ %
425 %%%The server announces @SMB2\_CAP\_PERSISTENT\_HANDLES@.
426 %%%}
427
428 %%% ==== Clustering -- Client Behaviour (Win8) : Retries  ====
429 %%% 
430 %%% +<2->{
431 %%% * Test: Win8 against slightly pimped Samba (2 IPs)
432 %%% }
433 %%% +<3->{
434 %%% * Server-Matrix (on/off):
435 %%% ** persistent handle cap
436 %%% ** durable handles
437 %%% ** cluster share cap
438 %%% ** scale out cap
439 %%% ** ca share cap
440 %%% }
441 %%% +<4->{
442 %%% * The test:
443 %%% ** connect to share with explorer
444 %%% ** start copying file (2G)
445 %%% ** kill smbd
446 %%% ** wait for the client to pop up an error dialog
447 %%% ** click cancel
448 %%% ** stop capture
449 %%% }
450 %%% 
451 %%% ==== Clustering -- Client Behaviour (Win8) : Retries  ====
452 %%% 
453 %%% +<2->{
454 %%% * only two different retry characteristics: CA $\leftrightarrow$ non-CA
455 %%% }
456 %%% +<3->{
457 %%% * non-CA-case
458 %%% ** 3 consecutive attempt rounds:
459 %%% *** for each of the two IPs: \\ %
460 %%% arp IP \\ %
461 %%% three tcp syn attempts to IP with 0.5 sec breaks
462 %%% ** ==> some 2.1 seconds for 1 round
463 %%% ** between attempts:
464 %%% ** dns, ping, arp ... 5.8 seconds
465 %%% ** ==> _red_18 seconds_
466 %%% }
467 %%% +<4->{
468 %%% * CA-Case
469 %%% ** retries attempt rounds from above for _red_14 minutes_
470 %%% }
471 %%% 
472 %%% 
473 %%% 
474 %%% ==== ====[plain]
475 %%% 
476 %%% \transdissolve
477 %%% 
478 %%% <[center]
479 %%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
480 %%% [center]>
481 %%% 
482 %%% 
483
484 ==== Clustering with Samba/CTDB ====
485
486 +<2->{
487 * all-active SMB-cluster with Samba and CTDB... \\ %
488 +<3->{...since 2007! \smiley }
489 }
490 +<4->{
491 * transparent for the client
492 ** CTDB:
493 *** metadata and messaging engine for Samba in a cluster
494 *** plus cluster resource manager (IPs, services...)
495 ** client only sees one ``big'' SMB server
496 ** we could not change the client!...
497 ** works ``well enough''
498 }
499 +<5->{
500 * challenge:
501 ** how to integrate SMB3 clustering with Samba/CTDB
502 ** good: rather orthogonal
503 ** ctdb-clustering transparent mostly due to management
504 }
505
506 ==== Witness Service ====
507
508 +<2->{
509 * an RPC service
510 ** monitoring of availability of resources (shares, NICs)
511 ** server asks client to move to another resource
512 }
513 +<3->{
514 * remember:
515 ** available on a Windows SMB3 share $\Leftrightarrow$ @SMB2\_SHARE\_CAP\_CLUSTER@
516 ** but clients happily connect w/o witness
517 }
518 +<4->{
519 * status in Samba [WIP (Metze, Gregor Beck)]:
520 ** async RPC: WIP, good progress ($\Rightarrow$ Metze's talk)
521 ** wireshark dissector: essentially done
522 ** client: in @rpcclient@ - done
523 ** server: dummy PoC / tracer bullet implementation done
524 ** CTDB: changes / integration needed
525 }
526
527
528 %%% ==== ====[plain]
529 %%% 
530 %%% <[center]
531 %%% {\Large
532 %%% !@https://wiki.samba.org/index.php/SMB3@!
533 %%% }
534 %%% [center]>
535 %%% 
536 %%% ==== ====[plain]
537 %%% 
538 %%% \transdissolve
539 %%% 
540 %%% <[center]
541 %%% <[columns]
542 %%% [[[.6\textwidth]]]
543 %%% 
544 %%% [[[.3\textwidth]]]
545 %%% <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
546 %%% [columns]>
547 %%% [center]>
548 %%% 
549
550 ==== ====[plain]
551
552 \transdissolve
553
554 <[center]
555 <[columns]
556 [[[.6\textwidth]]]
557
558 {\Large
559
560 Questions?
561
562 --*4em--
563
564 @obnox\@samba.org@
565
566 @ma\@sernet.de@
567
568 }
569
570 [[[.3\textwidth]]]
571 <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
572 [columns]>
573 [center]>
574
575 %%% %%%% <[center]
576 %%% %%%% 
577 %%% %%%% {\Large
578 %%% %%%% 
579 %%% %%%% @obnox\@samba.org / ma\@sernet.de@
580 %%% %%%% 
581 %%% %%%% \vspace*{1em}
582 %%% %%%% 
583 %%% %%%% %%%<<<ernie-und-bert-1.jpg,width=.65\textwidth>>>
584 %%% %%%% <<<samba-kisses-better-selection.jpg,width=.6\textwidth>>>
585 %%% %%%% }
586 %%% %%%% [center]>