Skip to content

make system more responsive by using the fadvise DONTNEED #252

@chrysn

Description

@chrysn

while attic is running, file system access is slowed down for the rest of the system. that can be expected, but its effects could be mitigated if attic used posix_fadvise(POSIX_FADV_DONTNEED) on the files it is backuping. this tells the operating tystem that the "data will not be accessed in the near future" (man 2 posix_fadvise).

this should minimize the amount of disk cache contents dropped from ram to accomodate attic's reads, while not slowing down attic. (it won't read over the same file itself (will it?), but the kernel can't know that without being told, and might keep the files around just in case attic wants to look at them again).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions