mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
buf0buf.c, buf0buf.ic, buf0buf.h:
Reduce memory usage of the buffer headers Many files: Merge InnoDB-4.1 with AWE support
This commit is contained in:
@ -140,9 +140,14 @@ byte srv_latin1_ordering[256] /* The sort order table of the latin1
|
||||
, 0xD8, 0x55, 0x55, 0x55, 0x59, 0x59, 0xDE, 0xFF
|
||||
};
|
||||
|
||||
ulint srv_pool_size = ULINT_MAX; /* size in database pages;
|
||||
MySQL originally sets this
|
||||
value in megabytes */
|
||||
ulint srv_pool_size = ULINT_MAX; /* size in pages; MySQL inits
|
||||
this to size in kilobytes but
|
||||
we normalize this to pages in
|
||||
srv_boot() */
|
||||
ulint srv_awe_window_size = 0; /* size in pages; MySQL inits
|
||||
this to bytes, but we
|
||||
normalize it to pages in
|
||||
srv_boot() */
|
||||
ulint srv_mem_pool_size = ULINT_MAX; /* size in bytes */
|
||||
ulint srv_lock_table_size = ULINT_MAX;
|
||||
|
||||
@ -218,6 +223,13 @@ ibool srv_use_doublewrite_buf = TRUE;
|
||||
|
||||
ibool srv_set_thread_priorities = TRUE;
|
||||
int srv_query_thread_priority = 0;
|
||||
|
||||
/* TRUE if the Address Windowing Extensions of Windows are used; then we must
|
||||
disable adaptive hash indexes */
|
||||
ibool srv_use_awe = FALSE;
|
||||
ibool srv_use_adaptive_hash_indexes = TRUE;
|
||||
|
||||
|
||||
/*-------------------------------------------*/
|
||||
ulint srv_n_spin_wait_rounds = 20;
|
||||
ulint srv_spin_wait_delay = 5;
|
||||
@ -1956,9 +1968,19 @@ srv_normalize_init_values(void)
|
||||
|
||||
srv_log_buffer_size = srv_log_buffer_size / UNIV_PAGE_SIZE;
|
||||
|
||||
srv_pool_size = srv_pool_size / UNIV_PAGE_SIZE;
|
||||
srv_pool_size = srv_pool_size / (UNIV_PAGE_SIZE / 1024);
|
||||
|
||||
srv_awe_window_size = srv_awe_window_size / UNIV_PAGE_SIZE;
|
||||
|
||||
srv_lock_table_size = 20 * srv_pool_size;
|
||||
if (srv_use_awe) {
|
||||
/* If we are using AWE we must save memory in the 32-bit
|
||||
address space of the process, and cannot bind the lock
|
||||
table size to the real buffer pool size. */
|
||||
|
||||
srv_lock_table_size = 20 * srv_awe_window_size;
|
||||
} else {
|
||||
srv_lock_table_size = 20 * srv_pool_size;
|
||||
}
|
||||
|
||||
return(DB_SUCCESS);
|
||||
}
|
||||
@ -2323,6 +2345,12 @@ srv_sprintf_innodb_monitor(
|
||||
"Total memory allocated %lu; in additional pool allocated %lu\n",
|
||||
ut_total_allocated_memory,
|
||||
mem_pool_get_reserved(mem_comm_pool));
|
||||
if (srv_use_awe) {
|
||||
buf += sprintf(buf,
|
||||
"In addition to that %lu MB of AWE memory allocated\n",
|
||||
srv_pool_size / ((1024 * 1024) / UNIV_PAGE_SIZE));
|
||||
}
|
||||
|
||||
buf_print_io(buf, buf_end);
|
||||
buf = buf + strlen(buf);
|
||||
ut_a(buf < buf_end + 1500);
|
||||
|
Reference in New Issue
Block a user