4 ms·
In regard to conclusion 2, there is another approach here - when you're finished with an old segment, posix_fadvise(..., POSIX_FADV_DONTNEED) can be used to dro
by caf 13y ago
In regard to conclusion 2, there is another approach here - when you're finished with an old segment, posix_fadvise(..., POSIX_FADV_DONTNEED) can be used to drop it from the page cache.
- apurvamehta 13y agoThat would be true if we were using C++. Unfortunately, all our code is in Scala and we use Java NIO libraries to memory map our files. AFAIK, they don't give us the option on using these POSIX calls.
- pquerna 13y agoCassandra binds to posix_fadvise to do exactly this when writing out new SSTables: https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/utils/CLibrary.java#L145-L162 https://github.com/apache/cassandra/blob/trunk/src/java/org/...
- apurvamehta 13y agoWow.. that's great to know. We will definitely investigate this approach. Thanks for sharing! :)