Hi Thomas and Noel, What do you think to include some internal informations of current state of MVStore. I think that such informations can be useful in some situations (tunning, perfomance improvements in the code and so on). As the MVStore is still experimental, maybe some additional informations could help to track some problems and still keep useful in the future.
I thought to show initially a few informations about the cache memory/access and about IO rate. Thoughts? Regards, Fred -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /home/fred/NetBeansProjects/h2-trunk/trunk/h2 # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: src/main/org/h2/mvstore/MVStore.java --- src/main/org/h2/mvstore/MVStore.java Base (BASE) +++ src/main/org/h2/mvstore/MVStore.java Modificado Localmente (Baseado em LOCAL) @@ -2553,6 +2553,16 @@ } /** + * Get the chunk cache. + * + * @return the cache + */ + public CacheLongKeyLIRS<PageChildren> getChunkCache() { + return cacheChunkRef; + } + + + /** * A background writer thread to automatically store changes from time to * time. */ Index: src/main/org/h2/table/MetaTable.java --- src/main/org/h2/table/MetaTable.java Base (BASE) +++ src/main/org/h2/table/MetaTable.java Modificado Localmente (Baseado em LOCAL) @@ -108,8 +108,10 @@ private static final int LOCKS = 26; private static final int SESSION_STATE = 27; private static final int QUERY_STATISTICS = 28; - private static final int META_TABLE_TYPE_COUNT = QUERY_STATISTICS + 1; + private static final int MVSTORE_STATISTICS = 29; + private static final int META_TABLE_TYPE_COUNT = MVSTORE_STATISTICS + 1; + private final int type; private final int indexColumn; private final MetaIndex metaIndex; @@ -537,6 +539,25 @@ ); break; } + case MVSTORE_STATISTICS: { + setObjectName("MVSTORE_STATISTICS"); + cols = createColumns( + "DATABASE", + "UNSAVED_MEMORY_BYTES LONG", + "WRITE_TOTAL_BYTES LONG", + "READ_TOTAL_BYTES LONG", + "WRITE_OPERATIONS_COUNT INT", + "READ_OPERATIONS_COUNT INT", + "FILE_SIZE_BYTES LONG", + "PAGE_CACHE_USED_MEMORY_BYTES LONG", + "PAGE_CACHE_HITS LONG", + "PAGE_CACHE_MISSES LONG", + "CHUNK_CACHE_USED_MEMORY_BYTES LONG", + "CHUNK_CACHE_HITS LONG", + "CHUNK_CACHE_MISSES LONG" + ); + break; + } default: throw DbException.throwInternalError("type="+type); } @@ -1807,6 +1828,39 @@ } break; } + case MVSTORE_STATISTICS: { + if (getDatabase().getMvStore() != null) { + add(rows, + //DATABASE + getDatabase().getShortName(), + //UNSAVED_MEMORY + "" + getDatabase().getMvStore().getStore().getUnsavedMemory(), + //WRITE_TOTAL_BYTES LONG" + "" + getDatabase().getMvStore().getStore().getFileStore().getWriteBytes(), + //READ_TOTAL_BYTES LONG + "" + getDatabase().getMvStore().getStore().getFileStore().getReadBytes(), + //WRITE_OPERATIONS_COUNT INT + "" + getDatabase().getMvStore().getStore().getFileStore().getWriteCount(), + //READ_OPERATIONS_COUNT INT + "" + getDatabase().getMvStore().getStore().getFileStore().getReadCount(), + //FILE_SIZE LONG + "" + getDatabase().getMvStore().getStore().getFileStore().size(), + //PAGE_CACHE_USED_MEMORY + "" + getDatabase().getMvStore().getStore().getCache().getUsedMemory(), + //PAGE_CACHE_HITS + "" + getDatabase().getMvStore().getStore().getCache().getHits(), + //PAGE_CACHE_MISSES + "" + getDatabase().getMvStore().getStore().getCache().getMisses(), + //CHUNCK_CACHE_USED_MEMORY + "" + getDatabase().getMvStore().getStore().getChunkCache().getUsedMemory(), + //CHUNCK_CACHE_HITS + "" + getDatabase().getMvStore().getStore().getChunkCache().getHits(), + //CHUNCK_CACHE_MISSES + "" + getDatabase().getMvStore().getStore().getChunkCache().getMisses() + ); + } + break; + } default: DbException.throwInternalError("type="+type); }