Re: How can I bypass the buffer cache or disable it for a process?
Steve Kargl <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.hackers |
|---|---|
| Message-ID | <[email protected]> |
On 8/5/26 22:39, Michael Schuster wrote: > > > On Thu, 6 Aug 2026, 01:24 Bob Bishop, <[email protected] > <mailto:[email protected]>> wrote: > > Hi, > >> On 4 Aug 2026, at 23:45, Friedrich Doku >> <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hello, >> >> Is there a way to reliably run a single userspace process such >> that all of its I/O (reads and writes) bypasses the UFS buffer cache? > > The short answer is probably “no”. > > > Doesn't FreeBSD support direct I/O? > It has O_DIRECT for the open() system. That may or may not help. OP has not stated if his interest is a single specific executable, which he may adapted for O_DIRECT, or for any generic executable that he may wish to run. Also, note that O_DIRECT does not mean caching will never happen. See open(2) for more info. -- steve