diff options
author | heikki@donna.mysql.fi <> | 2001-08-29 19:42:23 +0300 |
---|---|---|
committer | heikki@donna.mysql.fi <> | 2001-08-29 19:42:23 +0300 |
commit | 1311f7ce163eb3e022640b122f84726856bf1824 (patch) | |
tree | 9d78d40bd578ed463aac576cc0fbd077bbe9cd20 /innobase/srv | |
parent | e4ba2983449a1a7dc87b4746edcb92c064cf9b5a (diff) | |
download | mariadb-git-1311f7ce163eb3e022640b122f84726856bf1824.tar.gz |
trx0roll.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0mysql.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0purge.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0sel.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0uins.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0umod.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
row0upd.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0start.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
sync0arr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
fil0fil.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ibuf0ibuf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
lock0lock.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
os0file.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0btr.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0sea.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.c Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
srv0srv.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0sys.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
trx0trx.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
btr0cur.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
buf0buf.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
data0data.h Fix the primary key update + BLOB bug, improve InnoDB Monitor prints
ha_innobase.cc Fix the auto-inc+REPLACE+replication bug, improve InnoDB Monitor prints
Diffstat (limited to 'innobase/srv')
-rw-r--r-- | innobase/srv/srv0srv.c | 80 | ||||
-rw-r--r-- | innobase/srv/srv0start.c | 7 |
2 files changed, 69 insertions, 18 deletions
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index 8dd9c9f3feb..ba556e1c050 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -111,7 +111,14 @@ ibool srv_print_buf_io = FALSE; ibool srv_print_log_io = FALSE; ibool srv_print_latch_waits = FALSE; +ulint srv_n_rows_inserted = 0; +ulint srv_n_rows_updated = 0; +ulint srv_n_rows_deleted = 0; +ulint srv_n_rows_read = 0; + ibool srv_print_innodb_monitor = FALSE; +ibool srv_print_innodb_lock_monitor = FALSE; +ibool srv_print_innodb_tablespace_monitor = FALSE; /* The parameters below are obsolete: */ @@ -137,6 +144,11 @@ ulint srv_test_n_reserved_rnds = ULINT_MAX; ulint srv_test_array_size = ULINT_MAX; ulint srv_test_n_mutexes = ULINT_MAX; +/* Array of English strings describing the current state of an +i/o handler thread */ + +char* srv_io_thread_op_info[SRV_MAX_N_IO_THREADS]; + /* IMPLEMENTATION OF THE SERVER MAIN PROGRAM ========================================= @@ -1926,23 +1938,25 @@ loop: } background_loop: - /* In this loop we run background operations while the server + /* In this loop we run background operations when the server is quiet */ current_time = time(NULL); - if (srv_print_innodb_monitor - && difftime(current_time, last_monitor_time) > 8) { + if (difftime(current_time, last_monitor_time) > 15) { + + last_monitor_time = time(NULL); + + if (srv_print_innodb_monitor) { - printf("================================\n"); - last_monitor_time = time(NULL); + printf("=====================================\n"); ut_print_timestamp(stdout); printf(" INNODB MONITOR OUTPUT\n" - "================================\n"); - printf("--------------------------\n" - "LOCKS HELD BY TRANSACTIONS\n" - "--------------------------\n"); + "=====================================\n"); + printf("------------\n" + "TRANSACTIONS\n" + "------------\n"); lock_print_info(); printf("-----------------------------------------------\n" "CURRENT SEMAPHORES RESERVED AND SEMAPHORE WAITS\n" @@ -1955,11 +1969,40 @@ background_loop: "BUFFER POOL\n" "-----------\n"); buf_print_io(); + printf("--------------\n" + "ROW OPERATIONS\n" + "--------------\n"); + printf( + "Number of rows inserted %lu, updated %lu, deleted %lu, read %lu\n", + srv_n_rows_inserted, + srv_n_rows_updated, + srv_n_rows_deleted, + srv_n_rows_read); + printf("Server activity counter %lu\n", srv_activity_count); printf("----------------------------\n" "END OF INNODB MONITOR OUTPUT\n" "============================\n"); - } + } + + if (srv_print_innodb_tablespace_monitor) { + printf("================================================\n"); + + ut_print_timestamp(stdout); + + printf(" INNODB TABLESPACE MONITOR OUTPUT\n" + "================================================\n"); + + fsp_print(0); + fprintf(stderr, "Validating tablespace\n"); + fsp_validate(0); + fprintf(stderr, "Validation ok\n"); + printf("---------------------------------------\n" + "END OF INNODB TABLESPACE MONITOR OUTPUT\n" + "=======================================\n"); + } + } + mutex_enter(&kernel_mutex); if (srv_activity_count != old_activity_count) { mutex_exit(&kernel_mutex); @@ -2009,8 +2052,18 @@ background_loop: } mutex_exit(&kernel_mutex); + if (srv_print_innodb_monitor) { + ut_print_timestamp(stdout); + printf(" InnoDB (main thread) starts buffer pool flush\n"); + } + n_pages_flushed = buf_flush_batch(BUF_FLUSH_LIST, 100, ut_dulint_max); + if (srv_print_innodb_monitor) { + ut_print_timestamp(stdout); + printf(" InnoDB flushed %lu pages\n", n_pages_flushed); + } + mutex_enter(&kernel_mutex); if (srv_activity_count != old_activity_count) { mutex_exit(&kernel_mutex); @@ -2038,12 +2091,7 @@ background_loop: /* mem_print_new_info(); */ -/* - fsp_print(0); - fprintf(stderr, "Validating tablespace\n"); - fsp_validate(0); - fprintf(stderr, "Validation ok\n"); -*/ + #ifdef UNIV_SEARCH_PERF_STAT /* btr_search_print_info(); */ #endif diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c index b3f5dbb28b5..c4002767226 100644 --- a/innobase/srv/srv0start.c +++ b/innobase/srv/srv0start.c @@ -67,8 +67,6 @@ os_file_t files[1000]; mutex_t ios_mutex; ulint ios; -#define SRV_MAX_N_IO_THREADS 1000 - ulint n[SRV_MAX_N_IO_THREADS + 5]; os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 5]; @@ -591,6 +589,11 @@ innobase_start_or_create_for_mysql(void) return((int) err); } + /* Restrict the maximum number of file i/o threads */ + if (srv_n_file_io_threads > SRV_MAX_N_IO_THREADS) { + srv_n_file_io_threads = SRV_MAX_N_IO_THREADS; + } + #if !(defined(WIN_ASYNC_IO) || defined(POSIX_ASYNC_IO)) /* In simulated aio we currently have use only for 4 threads */ |