lce14: content
authorMichael Adam <obnox@samba.org>
Sat, 11 Oct 2014 17:23:58 +0000 (19:23 +0200)
committerMichael Adam <obnox@samba.org>
Sat, 11 Oct 2014 17:23:58 +0000 (19:23 +0200)
base-wiki.wiki

index eef43ee99605b3f552601ac6cbabbc780f775c76..837b0a98f734e6ab7e0e9b81007a3779f7385ca4 100644 (file)
 <<<samba-chilli-flavour-crop-bright-1280.jpg,height=.8\textheight>>>
 
 
-==== Samba File Serving Topics ====
-
-* SMB features (SMB3...)
-* Clustering (CTDB)
-* Performance
-* Interop (Protocols, NFS, AFP, ...)
-* special file systems support
-* ...
+==== Samba File Server Topics / Challenges ====
+
+* scalable file server / performance
+** scale-up: exhaust powerful boxes
+** scale-out: flexible all-active clusters
+** scale-down: perform well on low-end boxes
+* server workloads / SMB features
+** small \# of connections, threaded applications
+** Hyper-V, ...
+** SMB3 (clustering, RDMA, ...)
+* interop / multi-protocol access (nfs, afp, ...)
+* special file systems support (gluster, ceph, gpfs, btrfs, ...)
+* cloud / openstack?...
+%* (samba $\leftrightarrow$ cifs.ko alternative to nfs?...)
+
+
+%% ==== Samba File Serving Topics ====
+%% 
+%% * Performance
+%% * Clustering (CTDB)
+%% * SMB features (SMB3...)
+%% * Interop (protocols, NFS, AFP, ...)
+%% * special file systems support (gluster, ceph, gpfs, btrfs...)
+%% * ...
 
 %%==== Other Samba Topics ====
 %%
 %%* AD Sever
 %%* ...
 
-==== File Server Habitat ====
-
-* scalable file server
-** scale-out: powerful clusters
-** scale-down: low-end boxes
-* server workloads
-** hyper-v
-* cloud / openstack?
-* (samba $\leftrightarrow$ cifs.ko alternative to nfs?...)
-
-
-==== Performance ====
-
-* cpu usage
-** low profile platforme (arm, ...)
-** memory allocations
-* database performance
-** tdb
-*** mutexes
-*** freelist layout
-** concrete db design (notify, open files, ...)
-* scaling out (1 system)
-** parallelism
-*** async I/O with helper threads
-* cluster performance
+
+==== Performance - low end systems ====
+
+Reduction of CPU usage for low profile platforms like arm (SMB2)
+
+* Samba 4.0:
+** didn't saturate 1G nic (arm), CPU 100\%
+* reduced memory allocations
+* instrument SMB 2.1 multi-credit / large MTU
+* Samba 4.2:
+** saturates 1G nic (arm), CPU $<$ 100\%
+
+==== Performance - DB performance ====
+
+<[block]{TDB}
+* trivial database
+* used for IPC (smbd processes)
+* cluster (CTDB): local copies
+[block]>
+
+<[block]{hot databases}
+* @locking.tdb@ (open files)
+* @brlock.tdb@ (byte range locks)
+* @notify\_index.tdb@ (for change notify)
+[block]>
+
+==== Performance - DB performance ====
+
+<[block]{problem 1}
+* fcntl bty range locks for record locks
+* contention via single kernel spinlock
+[block]>
+
+<[block]{solution}
+* alternative to fcntl: pthread robust mutexes
+* ==> massive speedup
+* ==> included in TDB 1.3.1,  Samba 4.2
+[block]>
+
+==== Performance - DB performance ====
+
+<[block]{problem 2}
+* freelist:
+** single chain, contended (@locking.tdb@)
+** gets fragmented (singly linked)
+* especially a problem in ctdb-cluster: vacuuming
+[block]>
+
+<[block]{improvements}
+* make use of small per-record freelists (dead records)
+* add automatic defragmentation upon traversal
+* ==> included in TDB 1.3.1, Samba 4.2
+[block]>
+
+==== Performance - DB performance ====
+<[block]{problem 3}
+* change notify not scalable
+[block]>
+
+<[block]{first improvement}
+* restructured @notify.tdb@ to
+** global @notify\_index.tdb@ and
+** local @notify.tdb@
+** ==> better but still not good enough for some workloads
+[block]>
+
+<[block]{next steps}
+* replace DB-approach by new scalable, async notify daemon using messaging
+* some false positives do not harm
+* ==> TODO
+[block]>
+
+
+==== Performance - scaling ====
+
+<[block]{parellelism}
+* samba is multi-process:
+** smbd child process $\leftrightarrow$ TCP connection
+** event-loop in one process
+* within a smbd process:
+** pthread-pool jobs for potentially blocking syscalls
+** ==> parallelism for reads/writes
+** default for async I/O since Samba 4.0
+[block]>
+
+==== Performance - scaling ====
+
+<[block]{messaging}
+* classical messaging:
+** messages.tdb and signals between processes
+** does not scale well
+* new massaging in Samba 4.2:
+** fast and scalable messaging based on unix datagram messages
+** ==> WIP: integrate with AD/DC messaging
+** ==> features fd-passing for sockets (SMB3 multi-channel)
+** ==> TODO: integrate into CTDB inter-node-messaging
+[block]>
 
 
 ==== Interop ====