Benchmarking is an arcane and somewhat black art, but the level of expertise needed for simple performance tuning is fairly low. Since the Samba server's goal in life is to transfer files, we will examine only throughput, not response time to particular events, under the benchmarking microscope. After all, it's relatively easy to measure file transfer speed, and Samba doesn't suffer too badly from response-time problems that would require more sophisticated techniques.
Our basic strategy for this work will be:
-
Find a reasonably-sized file to copy and a program that reports on copy speeds, such as
smbclient.
-
Find a quiet (or typical) time to do the test.
-
Pre-run each test a few times to preload buffers.
-
Run tests several times and watch for unusual results.
-
Record each run in detail.
-
Compare the average of the valid runs to expected values.
After establishing a baseline using this method, we can adjust a single parameter and do the measurements all over again. An empty table for your tests is provided at the end of this chapter.