[Samba] Samba write performance in kernel

Lin Mac mkl23 at hotmail.com
Fri Sep 12 06:43:25 GMT 2008


> > Does using splice would really do help in performance much? 
> > Since the performance improvement might comes from two advantage: 
> > 1. no going to user space.
> > 2. no memory copy
> > splice surely have advantage 1, but doest it have the
> > second? Can we avoid  memory copy with splice, while
> > writing files to samba? (scatter-gather in block write?)
> Just to get things straight: Recently I've seen a Xeon box
> ship almost 500 megabytes (!) per second to smbclient using
> a single SMB connection via
> RAMdisk->smbd->10GigE->smbclient->/dev/null. This was
> without sendfile. So unless you want to squeeze the last 5%
> out of a heavily loaded server, I'd say the advantages of
> sendfile/recvfile are close to negligible. I might be wrong
well, in my condition, it might be 30% instead of 5%, IF splice can cover advantage 1 and 2.
1. I'm using a slow CPU (FA526) , and the memory copy is even slower. 
2. The reading performance is over 7 MB/s, with mmap and sendfile enabled, while writing is only 4-5 MB/s. Without mmap and sendfile, reading from samba is also about 4-5 MB/s. 
3. I used Oprofile to profile writing file to samba and found that CPU takes over 30% CPU time on copy_from/to_user, so I think going to user space and back again is the bottleneck.
4. My device is only 100Mbps Ethernet
5. I uses Windows client to measure throughput

> here, but the network latencies together with non-optimally
> queued requests by the client have a MUCH greater influence.
1. If splice works, can memory copy be avoided?
2. Sorry I don't really get what the "non-optimally queued requests" means. And what could I do to make it optimized?


Best Regards,
Mac Lin

5 GB ¶W¤j®e¶q ¡B³Ð·s«K±¶¡B¦w¥þ¨¾Å@©U§£¶l¥ó©M¯f¬r ¡X ¥ß§Y¤É¯Å Windows Live Hotmail

More information about the samba mailing list