Appendix B. Samba Performance Tuning
This appendix discusses various ways of performance tuning and system sizing with Samba. Performance tuning is the art of finding bottlenecks and adjusting to eliminate them. Sizing is the practice of eliminating bottlenecks by spending money to avoid having them in the first place. Normally, you won’t have to worry about either with Samba. On a completely untuned server, Samba will happily support a small community of users. However, on a properly tuned server, Samba will support at least twice as many users. This chapter is devoted to outlining various performance-tuning and sizing techniques that you can use if you want to stretch your Samba server to the limit.
A Simple Benchmark
How do you know if you’re getting reasonable performance? A simple benchmark is to compare Samba with FTP. Table 2.1 shows the throughput, in kilobytes per second, of a pair of servers: a medium-size Sun SPARC Ultra and a small Linux Pentium server. Numbers are reported in kilobytes per second (KB/s).
Table B-1. Sample Benchmark Benchmarks
|
Command |
FTP |
Untuned Samba |
Tuned Samba |
|---|---|---|---|
|
Sparc get |
1014.5 |
645.3 |
866.7 |
|
Sparc put |
379.8 |
386.1 |
329.5 |
|
Pentium get |
973.27 |
N/A |
725 |
|
Pentium put |
1014.5 |
N/A |
1100 |
If you run the same tests on your server, you probably won’t see the same numbers. However, you should see similar ratios of Samba to FTP, probably in the range of 68 to 80 percent. It’s not a good idea to base all of Samba’s throughput against FTP. The golden ...