Project

General

Profile

Bug #6583

remove whole-process swapping

Added by Josef Sipek over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2016-01-28
Due date:
% Done:

70%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Long before Unix supported paging, it used process swapping. While this was ok with the PDP-11/20's 64kB address spaces, it does not work as well today when address spaces can easily be hundreds of GB. The process swapping code is there and in theory it runs when we get extremely low on memory. In practice, paging keeps the system well above the swapping limit. Swapping only ever runs when other parts of the memory management code are doing terrible things (e.g., bug #6202) and doesn't actually help anything. The complexity this code introduces doesn't justify the little benefit it provides.

You can check the number of swapout/swapin events with kstats:

$ kstat -p ::vm:swapin ::vm:swapout

This is a change inspired by Bredan Gregg's SCaLE 12x keynote.

Also available in: Atom PDF