1 Reply Latest reply on Dec 8, 2011 3:34 PM by Paula B-Oracle

    Calculating the size of the database in memory

      I am using BDB 5.1.19 with BTREE as an access method.
      I would like to calculate the memory footprint that would be needed for that.
      I followed the following doc:

      useful-bytes-per-page = (page-size - page-overhead) * page-fill-factor
      bytes-of-data = n-records *
      (bytes-per-entry + page-overhead-for-two-entries)
      n-pages-of-data = bytes-of-data / useful-bytes-per-page
      total-bytes-on-disk = n-pages-of-data * page-size

      I am not interested in calculating the size on disk but just in memory.
      Would the following be enough:
      bytes-of-data = n-records *(bytes-per-entry + page-overhead-for-two-entries)

      Since the rest is only for space on disk i don't need it, is that correct?
      Would this calculation help me also to calculate the cache size or is the cache size influenced by the page size?