On Sat, Mar 28, 2015 at 9:14 PM, Tim Darby <[email protected]> wrote:
> On Sat, Mar 28, 2015 at 2:52 PM, Matthew Dillon < > [email protected]> wrote: > >> >> : >> :> a: 1GB boot >> :> b: 32GB swap >> :> d: * hammer (root and everything else on one hammer >> filesystem) >> : >> :fur such a config there is no need to reserve 10% unused. >> :just add TRIMming b partition at every boot. swap would rarely be full. >> >> Yes, very true. swap can be TRIMmed on every boot and in most >> situations this will leave enough unallocated space. >> >> In my example I totally forgot to include an 'unused' partition to >> hold the reserved area, too, but just having a larger swap partition >> and TRIMming it on boot probably works even better. >> >> The -e option to swapon will trim swap. Hmm.... our rc scripts don't >> provide a way to override that to add the -e. >> >> > I like this idea. Would I have to use unencrypted swap for this to work? > > Tim > Can I make rc do this by modifying df_swap1_start() in rc.d/swap1: -swapon -a && return ${RC_CONFIGURED} +swapon -ae && return ${RC_CONFIGURED} Tim
