Bottlenecks are the points where data flow is most restricted. In computer systems, the bottleneck may be due to a system resource or a particular process in a chain taking a long time to execute. To determine a bottleneck, some understanding of the resources in a computer system is required.
The main system resources in a modern computer are memory, CPU, and disk and network I/O.
Memory is a finite resource and is liable to be the scarcest resource for machines running SpamAssassin. Programs running on a machine and the data they process use memory. Memory is often supplemented with swap space or virtual memory. This allows the computer to run more programs or process more data than it might otherwise.
Swapping is not unusual on a machine with many tasks. Some processes sleep when there is no work to be processed, and wake periodically to perform tasks. When these are not processing work, the memory can be used for other tasks and the task is swapped out from the memory...