> >> Johannes, I add you in CC because you're the last one who proposed > >> something. Can I update your patch with previous suggestions from > >> reviewers ? > > > >Absolutely! OK. > >> I'm also asking for feedback in this area, others ideas are very > >> welcome. > > > >Andrew didn't like the idea of the one byte per covered page > >representation but all proposals to express continuous ranges in a > > mincore utilize byte array and the least significant bit is used to > check if the corresponding page is currently resident in memory, I > don't know the history, what's the reason for not using bitmap? > > >more compact fashion had worse worst cases and a much more involved > >interface. > > > >I do wonder if we should model fincore() after mincore() and add a > >separate syscall to query page cache coverage with statistical output > >(x present [y dirty, z active, whatever] in specified area) rather > >than describing individual pages or continuous chunks of pages in > >address order. That might leave us with better interfaces than trying > >to integrate all of this into one arcane syscall. It should works too. My tool pgfincore (for postgresql) also outputs the number of group of contiguous in-memory page, it is to get a quick idea of the access pattern: from large number of groups (random) to few groups (sequential). So for this usage, I don't really need the full vector and page level information, but some stats are needed to make those sums useful. However another usage is to snapshot/restore in-memory pages, it is useful in at least 2 scenarios. One for simple server restart, PostgreSQL is back to full speed faster when you're able to restore the previous cache content. The other one is similar, switchover to a previously 'cold' server or prepare a server to get traffic. For those use-cases, it is interesting to have the details. -- Cédric Villemain +33 (0)6 20 30 22 52 http://2ndQuadrant.fr/ PostgreSQL: Support 24x7 - Développement, Expertise et Formation
Attachment:
signature.asc
Description: This is a digitally signed message part.