Next: , Up: Compression   [Contents][Index]


8.1.1 Compression inside Berekeley DB

Berkeley DB uses fixed size pages. Suppose, for example that our compression algorithm can compress by a factor of 8 in most cases, we use a disk page size that’s 1/8 of the memory page size. However there are exceptions. Some pages won’t compress well and therefore won’t fit on one disk page. Extra pages are therefore allocated and are linked into a chained list. Allocating extra pages implies that some pages may become free as a result of a better compression.

dbcompress-1 dbcompress-2 dbcompress-3 dbcompress-4