1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

thr0loc.c, srv0start.c, srv0srv.c, srv0srv.h, os0thread.h:

Reduce InnoDB memory allocation if buffer pool < 8 MB


innobase/include/os0thread.h:
  Reduce InnoDB memory allocation if buffer pool < 8 MB
innobase/include/srv0srv.h:
  Reduce InnoDB memory allocation if buffer pool < 8 MB
innobase/srv/srv0srv.c:
  Reduce InnoDB memory allocation if buffer pool < 8 MB
innobase/srv/srv0start.c:
  Reduce InnoDB memory allocation if buffer pool < 8 MB
innobase/thr/thr0loc.c:
  Reduce InnoDB memory allocation if buffer pool < 8 MB
This commit is contained in:
unknown
2003-10-17 20:31:17 +03:00
parent 6795b2642b
commit 6713bb090d
5 changed files with 40 additions and 11 deletions

View File

@ -1138,10 +1138,32 @@ innobase_start_or_create_for_mysql(void)
srv_file_flush_method_str);
return(DB_ERROR);
}
/* Set the maximum number of threads which can wait for a semaphore
inside InnoDB */
#if defined(__WIN__) || defined(__NETWARE__)
/* Create less event semaphores because Win 98/ME had difficulty creating
40000 event semaphores.
Comment from Novell, Inc.: also, these just take a lot of memory on
NetWare. */
srv_max_n_threads = 1000;
#else
if (srv_pool_size >= 8 * 1024) {
/* Here we still have srv_pool_size counted
in kilobytes, srv_boot converts the value to
pages; if buffer pool is less than 8 MB,
assume fewer threads. */
srv_max_n_threads = 10000;
} else {
srv_max_n_threads = 1000; /* saves several MB of memory,
especially in 64-bit
computers */
}
#endif
/* Note that the call srv_boot() also changes the values of
srv_pool_size etc. to the units used by InnoDB internally */
err = srv_boot();
if (err != DB_SUCCESS) {