3 ms·
>Microsoft recently ported SQL Server to Linux so not sure what combination of techniques they are doing on there Open options: int f = open("your fil
by valarauca1 10y ago
>Microsoft recently ported SQL Server to Linux so not sure what combination of techniques they are doing on there
Open options:
int f = open("your file", O_DIRECT|O_DSYNC|O_RDWR);
O_DIRECT signals that a file descriptor should by-pass kernel level caching and write directly to the device.
O_SYNC signals that a file descriptor calls should not return until all data+metadata has been synced with disk.
O_DSYNC does the same as O_SYNC but doesn't force meta-data synchronicity before the block ends.
Related Stack Overflow https://stackoverflow.com/questions/5055859/how-are-the-o-sync-and-o-direct-flags-in-open2-different-alike https://stackoverflow.com/questions/5055859/how-are-the-o-sy...
Related LWN article https://lwn.net/Articles/457667/ https://lwn.net/Articles/457667/