Commit 0136c0dd authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:4326] Add field checkpoint_waiters_max to engine status. Must still...

[t:4326] Add field checkpoint_waiters_max to engine status.  Must still display in handlerton.  Refs #4326.

git-svn-id: file:///svn/toku/tokudb@38513 c7de825b-a66e-492c-adef-691d508d4ae1
parent d0c1da75
......@@ -86,7 +86,8 @@ typedef struct __toku_engine_status {
u_int64_t checkpoint_last_lsn; /* LSN of last complete checkpoint */
u_int64_t checkpoint_count; /* number of checkpoints taken */
u_int64_t checkpoint_count_fail; /* number of checkpoints failed */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting for checkpoint_safe lock */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting to perform a checkpoint */
u_int64_t checkpoint_waiters_max; /* max threads ever simultaneously waiting to perform a checkpoint */
u_int64_t cleaner_period; /* delay between executions of cleaner */
u_int64_t cleaner_iterations; /* number of nodes to flush per cleaner execution */
u_int64_t txn_begin; /* number of transactions ever begun */
......
......@@ -86,7 +86,8 @@ typedef struct __toku_engine_status {
u_int64_t checkpoint_last_lsn; /* LSN of last complete checkpoint */
u_int64_t checkpoint_count; /* number of checkpoints taken */
u_int64_t checkpoint_count_fail; /* number of checkpoints failed */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting for checkpoint_safe lock */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting to perform a checkpoint */
u_int64_t checkpoint_waiters_max; /* max threads ever simultaneously waiting to perform a checkpoint */
u_int64_t cleaner_period; /* delay between executions of cleaner */
u_int64_t cleaner_iterations; /* number of nodes to flush per cleaner execution */
u_int64_t txn_begin; /* number of transactions ever begun */
......
......@@ -86,7 +86,8 @@ typedef struct __toku_engine_status {
u_int64_t checkpoint_last_lsn; /* LSN of last complete checkpoint */
u_int64_t checkpoint_count; /* number of checkpoints taken */
u_int64_t checkpoint_count_fail; /* number of checkpoints failed */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting for checkpoint_safe lock */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting to perform a checkpoint */
u_int64_t checkpoint_waiters_max; /* max threads ever simultaneously waiting to perform a checkpoint */
u_int64_t cleaner_period; /* delay between executions of cleaner */
u_int64_t cleaner_iterations; /* number of nodes to flush per cleaner execution */
u_int64_t txn_begin; /* number of transactions ever begun */
......
......@@ -86,7 +86,8 @@ typedef struct __toku_engine_status {
u_int64_t checkpoint_last_lsn; /* LSN of last complete checkpoint */
u_int64_t checkpoint_count; /* number of checkpoints taken */
u_int64_t checkpoint_count_fail; /* number of checkpoints failed */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting for checkpoint_safe lock */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting to perform a checkpoint */
u_int64_t checkpoint_waiters_max; /* max threads ever simultaneously waiting to perform a checkpoint */
u_int64_t cleaner_period; /* delay between executions of cleaner */
u_int64_t cleaner_iterations; /* number of nodes to flush per cleaner execution */
u_int64_t txn_begin; /* number of transactions ever begun */
......
......@@ -86,7 +86,8 @@ typedef struct __toku_engine_status {
u_int64_t checkpoint_last_lsn; /* LSN of last complete checkpoint */
u_int64_t checkpoint_count; /* number of checkpoints taken */
u_int64_t checkpoint_count_fail; /* number of checkpoints failed */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting for checkpoint_safe lock */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting to perform a checkpoint */
u_int64_t checkpoint_waiters_max; /* max threads ever simultaneously waiting to perform a checkpoint */
u_int64_t cleaner_period; /* delay between executions of cleaner */
u_int64_t cleaner_iterations; /* number of nodes to flush per cleaner execution */
u_int64_t txn_begin; /* number of transactions ever begun */
......
......@@ -479,7 +479,8 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__
printf(" u_int64_t checkpoint_last_lsn; /* LSN of last complete checkpoint */ \n");
printf(" u_int64_t checkpoint_count; /* number of checkpoints taken */ \n");
printf(" u_int64_t checkpoint_count_fail; /* number of checkpoints failed */ \n");
printf(" u_int64_t checkpoint_waiters_now; /* number of threads currently waiting for checkpoint_safe lock */ \n");
printf(" u_int64_t checkpoint_waiters_now; /* number of threads currently waiting to perform a checkpoint */ \n");
printf(" u_int64_t checkpoint_waiters_max; /* max threads ever simultaneously waiting to perform a checkpoint */ \n");
printf(" u_int64_t cleaner_period; /* delay between executions of cleaner */ \n");
printf(" u_int64_t cleaner_iterations; /* number of nodes to flush per cleaner execution */ \n");
printf(" u_int64_t txn_begin; /* number of transactions ever begun */ \n");
......
......@@ -86,7 +86,8 @@ typedef struct __toku_engine_status {
u_int64_t checkpoint_last_lsn; /* LSN of last complete checkpoint */
u_int64_t checkpoint_count; /* number of checkpoints taken */
u_int64_t checkpoint_count_fail; /* number of checkpoints failed */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting for checkpoint_safe lock */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting to perform a checkpoint */
u_int64_t checkpoint_waiters_max; /* max threads ever simultaneously waiting to perform a checkpoint */
u_int64_t cleaner_period; /* delay between executions of cleaner */
u_int64_t cleaner_iterations; /* number of nodes to flush per cleaner execution */
u_int64_t txn_begin; /* number of transactions ever begun */
......
......@@ -86,7 +86,8 @@ typedef struct __toku_engine_status {
u_int64_t checkpoint_last_lsn; /* LSN of last complete checkpoint */
u_int64_t checkpoint_count; /* number of checkpoints taken */
u_int64_t checkpoint_count_fail; /* number of checkpoints failed */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting for checkpoint_safe lock */
u_int64_t checkpoint_waiters_now; /* number of threads currently waiting to perform a checkpoint */
u_int64_t checkpoint_waiters_max; /* max threads ever simultaneously waiting to perform a checkpoint */
u_int64_t cleaner_period; /* delay between executions of cleaner */
u_int64_t cleaner_iterations; /* number of nodes to flush per cleaner execution */
u_int64_t txn_begin; /* number of transactions ever begun */
......
......@@ -213,6 +213,8 @@ toku_checkpoint(CACHETABLE ct, TOKULOGGER logger,
checkpoint_safe_checkpoint_lock();
(void) __sync_fetch_and_sub(&status.waiters_now, 1);
if (status.waiters_now > status.waiters_max)
status.waiters_max = status.waiters_now; // threadsafe, within checkpoint_safe lock
SET_CHECKPOINT_FOOTPRINT(10)
multi_operation_checkpoint_lock();
SET_CHECKPOINT_FOOTPRINT(20)
......
......@@ -94,7 +94,8 @@ typedef struct {
uint64_t last_lsn;
uint64_t checkpoint_count;
uint64_t checkpoint_count_fail;
uint64_t waiters_now; // how many threads are currently waiting for the checkpoint_safe lock
uint64_t waiters_now; // how many threads are currently waiting for the checkpoint_safe lock to perform a checkpoint
uint64_t waiters_max; // max threads ever simultaneously waiting for the checkpoint_safe lock to perform a checkpoint
} CHECKPOINT_STATUS_S, *CHECKPOINT_STATUS;
void toku_checkpoint_get_status(CHECKPOINT_STATUS stat);
......
......@@ -1933,6 +1933,7 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st
engstat->checkpoint_count = cpstat.checkpoint_count;
engstat->checkpoint_count_fail = cpstat.checkpoint_count_fail;
engstat->checkpoint_waiters_now = cpstat.waiters_now;
engstat->checkpoint_waiters_max = cpstat.waiters_max;
}
engstat->cleaner_period = toku_get_cleaner_period_unlocked(env->i->cachetable);
engstat->cleaner_iterations = toku_get_cleaner_iterations_unlocked(env->i->cachetable);
......@@ -2277,6 +2278,7 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) {
n += snprintf(buff + n, bufsiz - n, "checkpoint_count %"PRIu64"\n", engstat.checkpoint_count);
n += snprintf(buff + n, bufsiz - n, "checkpoint_count_fail %"PRIu64"\n", engstat.checkpoint_count_fail);
n += snprintf(buff + n, bufsiz - n, "checkpoint_waiters_now %"PRIu64"\n", engstat.checkpoint_waiters_now);
n += snprintf(buff + n, bufsiz - n, "checkpoint_waiters_max %"PRIu64"\n", engstat.checkpoint_waiters_max);
n += snprintf(buff + n, bufsiz - n, "cleaner_period %"PRIu64"\n", engstat.cleaner_period);
n += snprintf(buff + n, bufsiz - n, "cleaner_iterations %"PRIu64"\n", engstat.cleaner_iterations);
n += snprintf(buff + n, bufsiz - n, "txn_begin %"PRIu64"\n", engstat.txn_begin);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment