Re: Keep a file in memory an any cost



On 05/11/11 11:19, Alain Spineux wrote:
Hello I have a file, that is an index, it is open all the time by the
application,
but sometime the access are slow because the file was moved out of the cache.

How can I keep it in memory all the time ?
I can read it at regular interval, but this is a little over kill ?

Any idea

thanks.


There is a kernel facility that nails pages to memory so that
they are not paged out (such as for DMA purposes).
But I do not know if such a facility is accessible directly from
any userland calls via libc.
BSD used to have a vadvise() call to accomplish such a feat.

--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines



Relevant Pages

  • Re: Keep a file in memory an any cost
    ... but sometime the access are slow because the file was moved out of the cache. ... How can I keep it in memory all the time? ... There is a kernel facility that nails pages to memory so that ... any userland calls via libc. ...
    (Fedora)
  • Re: Cached memory never gets released
    ... Stock linux 2.4.26 kernel. ... Due to flash bug 3M of memory gets lost due to font memory getting lost ... The output of "free" cache number steadily grows. ... longer to exhaust all of system memory with the cache. ...
    (Linux-Kernel)
  • Re: Is Greenspun enough?
    ... Most OSes memory map executables directly from the file system so code doesn't pollute the file cache or swap space. ...
    (comp.lang.lisp)
  • Re: UMA cache back pressure
    ... on a cache for another week or two. ... done in memory allocation last years improved situation. ... heavy and doesn't benefit much from bucket sizing. ... You're also biasing the first zones in the list. ...
    (freebsd-current)
  • Re: UMA cache back pressure
    ... on a cache for another week or two. ... done in memory allocation last years improved situation. ... heavy and doesn't benefit much from bucket sizing. ... You're also biasing the first zones in the list. ...
    (freebsd-hackers)