ablog

不器用で落着きのない技術者のメモ

スワップ領域がないとどうなるか

Systems Performance: Enterprise and the Cloud (English Edition)

Systems Performance: Enterprise and the Cloud (English Edition)

P.280

It is also interesting to ask what happen if no swap device or swap file is configured on either system. This limits virtual memory size, so unless overcommit is in use, memory allocations will fail sooner. On Linux, this may also mean that the OOM killer is used sooner.
Consider an application issue with endless memory growth. With swap, this is likely to first become a performance issue due to paging, which is an opportunity to debug the issue live. Without swap, there is no paging grace period, so either the application hits an "Out of memory" error, or the OOM killer terminates it. This may delay debugging the issue if it is seen only after hours of usage.