Date: Fri, 21 Mar 2014 18:56:54 +0400 From: Dmitry Sivachenko <trtrmitya@gmail.com> To: hackers@freebsd.org Subject: madvise() vs posix_fadvise() Message-ID: <D6BD48AF-9522-495D-8D54-37854E53C272@gmail.com>
index | next in thread | raw e-mail
Hello! I have a program which uses large data files (read-only, via mmap()). These machines have a bit more RAM that these files occupy, so it is possible to have all these data in memory. What techniques should I use to promote this data not to be purged from RAM: -- madvise(MADV_WILLNEED) -- posix_fadvise(POSIX_FADV_WILLNEED) -- both? Some parts of this mmap()ed data is frequently accessed, some is not, and I see that rarely accessed regions are purged from RAM. I want disk cache (program writes large log files) to have lower priority, so disk cache does not purge mmaped regions from memory. Thanks.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D6BD48AF-9522-495D-8D54-37854E53C272>
