Antigamente, havia uma regrinha bem difundida e que dizia que a sua partição swap deveria ter o dobro da sua quantidade de memória ram. Bem, o Con Kolivas, famoso médico e "patcheador" do kernel, disse em sua página:
"Con Kolivas"
Wed May 24 20:22:39 EST 2006
How much swapspace should I allocate?
Unfortunately there is not much good documentation on swapspace that is meaningful on today's hardware. As the discrepancy between ram speed and hard drive speed becomes greater each year, the old rule of 2*ramsize is just plain wrong. This was in the old days because the addr space was directly mapped into the first half of the double RAM sized swap, giving an easy translation formula; only the space >> RAM size was usuable as additional space.
Since most of your ram will be filled with cache, you don't need a huge swapspace, just enough to cope with transient periods of pressure.
The size should actually depend on the speed of your hard drive. On current drives I recommend about 256MB of swapspace (no matter how much ram you have). You could double it for a striped raid0 array of swapspace.
Ou seja, ele diz que a regra citada no parágrafo inicial não mais é válida. Um bom tamanho de swap é 256 mb, não importando quanto de memória ram o computador possui. Eu tenho 1 gb de ram e ainda não vi a partição swap ser usada. Acho que a única situação em que 256 mb poderiam ser insuficientes é com o uso daqueles lances de hibernação ou suspensão, mas, ainda assim, há a opção de usar o sistema de arquivos normal pra executar essa tarefa.
A minha pergunta é: alguém, com um hardware atual, já viu mais que 256 mb de swap em uso?