flightaware / speedtables

Speed tables is a high-performance memory-resident database. The speed table compiler reads a table definition and generates a set of C access routines to create, manipulate and search tables containing millions of rows. Currently oriented towards Tcl.
https://flightaware.github.io/speedtables/
BSD 3-Clause "New" or "Revised" License
65 stars 15 forks source link

Clear dirty page bits before final unmap #65

Closed snoe925 closed 7 years ago

snoe925 commented 7 years ago

Attempt to avoid Linux syncing dirty pages at process exit by clearing the dirty bit on the pages.

resuna commented 7 years ago

Shouldn't this be conditional on a (possibly default) table/share setting? Originally there was a flag for this purpose.

Also, even if MAP_NOSYNC is defined (as on BSD) speedtables isn't using that feature anymore because the boost shared memory API doesn't support it. So this shouldn't be guarded by an ifdef.

mutability commented 7 years ago

I think you want msync not madvise (and it probably doesn't do what you want..)