Tune the Kernel

Device I/O under Unix is handled by the kernel. The default device settings for most kernels provide somewhat equal performance for a wide range of possible applications. But no kernel, supplied off the shelf, is tuned for best TCP/IP and email performance.

In this section we outline considerations for tuning your kernel. Unfortunately, we cannot give specific tuning instructions because tuning is as widely varied as the varieties and versions of Unix itself. Some versions of Unix, for example, are tuned by running special programs, others are tuned by editing boot-time files, and yet others are tuned by editing source files and compiling a new kernel.

In general, the tuning items of highest concern for best email performance are:

  • Maximize file descriptor limits.

  • Disable source-routed packets.

  • Maximize the number of simultaneous possible TCP/IP connections.

  • Maximize TCP/IP buffer sizes.

  • Decrease TCP/IP keepalive intervals.

Other items of concern are, for example, disk I/O, the number of inodes supported on a disk, the bandwidth of your Internet connection, and the throughput guaranteed by your ISP. As we said at the beginning of this chapter, the topic of performance tuning in sendmail is so complex that it deserves a book of its own.

In the discussions that follow, first change kernel settings by hand to make sure nothing breaks. Only when proven, add those settings to boot-time scripts and document what you did.

Maximize File Descriptor Limits

A file descriptor is the ...

Get Sendmail, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.