:: Re: [DNG] Tmpfs
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Kevin Chadwick
Fecha:  
A: dng
Asunto: Re: [DNG] Tmpfs
On 13/06/2024 14:39, Enrico Weigelt, metux IT consult wrote:
>
> Earlier versions of tmpfs (actually, ramfs) had a major drawback: non-
> swappable. But that's long gone: on memory pressure the pages can get
> swapped out exactly like userland pages.


Well you get very slightly faster app openings if you don't blink but isn't
there the potential for swapping to disk multiple times and at the worst
possible time (under pressure)? I feel like an engineer deciding to use /tmp has
decided I want this to be on disk and that is where it should stay, once?

Certainly not worth banging a drum about though.

The strongest argument I can see for tmpfs is a default should maybe serve
everyone and potentially that you might avoid wear on some SDs that do not have
wear levelling and perhaps emmc with poor wear levelling but then under pressure
are writes still lower or higher? I agree with the other poster that there
should be no issue on an SSD.

I was surprised that OpenBSDs daily script periodically clears /tmp though that
appears to be only certain files.

next_part "Removing scratch and junk files:"
if [ -d /tmp -a ! -L /tmp ]; then
    cd /tmp && {
    find -x . \
        \( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \
        -o -path './tmux-*' \) -prune -o \
        -type f -and ! -path './*.s[eh]m' -atime +7 -delete 2>/dev/null
    find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \
        ! -path ./.ICE-unix ! -name . \
        -delete >/dev/null 2>&1; }
fi