Swap no Swap - Pros / Cons



  • What are the advantages and disadvantages of running a full install with no swap space on system with plenty of physical memory such that everything fits and swap space should never be needed?

    Would there be any advantage for say USB Flash drive longevity running full install?  Would swap space even get written to at all?

    The obvious disadvantages I guess is no crash dump reports with no swap space.

    What are others?



  • @NOYB:

    What are the advantages and disadvantages of running a full install with no swap space on system with plenty of physical memory such that everything fits and swap space should never be needed?

    If you really do have plenty of physical memory the only disadvantage of configuring swap space is that it takes away from space that could be allocated for another purpose. But what purpose?

    @NOYB:

    Would there be any advantage for say USB Flash drive longevity running full install?

    Unlikely.

    @NOYB:

    Would swap space even get written to at all?

    Possibly for initial format and then for crash dumps.

    @NOYB:

    The obvious disadvantages I guess is no crash dump reports with no swap space.

    Debugging crashes without crash dumps is nearly impossible. Debugging crashes with crash dumps is merely "challenging".

    I can't see the point in running a full install on a "RAM rich" system with no no swap space UNLESS you are really skimping on disk space. My full install home pfSense has 256MB RAM, 260MB swap (which I don't think I have seen more than 0 used) and a 1GB solid state disk module.



  • It really is RAM rich.  An old notebook with 2 GB.

    What started the thinking about this is that the Quick/Easy install creates a 2 GB swap space, and was thinking about using a 2 GB USB Flash stick.  And 2GB swap space seemed kind of excessive considering it will never get used under normal circumstances (except for a crash dump).  Can’t remember the last time that happened aside of me doing something stupid.

    But the 2GB USB Flash stick is off the table now anyway, because the ones I have write too slow.  Read is marginal.