On Mon, 3 Aug 2020 20:42:51 +0100 Mike Pumford <mpumf...@mudcovered.org.uk> wrote:
> On 03/08/2020 17:48, Sad Clouds wrote: > > > > I believe Samba is single threaded, so can't take advantage of > > multiple CPUs for a single stream. I'm not a Xen expert, however > > I'm not sure running this in Dom0 is a representative test. I > > imagine most workloads would be done within a DomU, while Dom0 is > > just a control domain and allocates CPU and memory resources, so > > you may have additional overheads + latencies. > > > Samba uses multiple processes for parallelism. So there is a separate > smbd process for each connection. So for a single share to a single > client its single threaded. Multiple clients or multiple shares will > spawn additional smbd processes. > > Mike Which is not the best design. Might be OK with 1GbE, but when you go to 10GbE or 40GbE and higher, that single stream will saturate one CPU and your throughput will be capped. Many use-cases require good single stream performance. I suspect Samba process uses a lot of global data, hence difficult to share with multiple threads without race conditions or a lot of locking.