List:Commits« Previous MessageNext Message »
From:tomas Date:June 12 2007 10:35am
Subject:bk commit into 5.1 tree (tomas:1.2494) BUG#29044
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-06-12 10:35:21+02:00, tomas@stripped +5 -0
  Bug#29044 - memory buddy allocator "unoptimal" memory handling
  - add config param to have better behavior with large tables

  storage/ndb/include/mgmapi/mgmapi_config_parameters.h@stripped, 2007-06-12 10:35:19+02:00,
tomas@stripped +2 -0
    Bug#29044 - memory buddy allocator "unoptimal" memory handling
    - add config param to have better behavior with large tables

  storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp@stripped, 2007-06-12 10:35:19+02:00,
tomas@stripped +1 -0
    Bug#29044 - memory buddy allocator "unoptimal" memory handling
    - add config param to have better behavior with large tables

  storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp@stripped, 2007-06-12 10:35:19+02:00,
tomas@stripped +6 -0
    Bug#29044 - memory buddy allocator "unoptimal" memory handling
    - add config param to have better behavior with large tables

  storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp@stripped, 2007-06-12 10:35:19+02:00,
tomas@stripped +5 -0
    Bug#29044 - memory buddy allocator "unoptimal" memory handling
    - add config param to have better behavior with large tables

  storage/ndb/src/mgmsrv/ConfigInfo.cpp@stripped, 2007-06-12 10:35:19+02:00,
tomas@stripped +12 -0
    Bug#29044 - memory buddy allocator "unoptimal" memory handling
    - add config param to have better behavior with large tables

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tomas
# Host:	whalegate.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-telco-gca

--- 1.33/storage/ndb/include/mgmapi/mgmapi_config_parameters.h	2007-06-05 17:43:51 +02:00
+++ 1.34/storage/ndb/include/mgmapi/mgmapi_config_parameters.h	2007-06-12 10:35:19 +02:00
@@ -118,6 +118,8 @@
 
 #define CFG_DB_O_DIRECT               168
 
+#define CFG_DB_MAX_ALLOCATE           169
+
 #define CFG_DB_SGA                    198 /* super pool mem */
 #define CFG_DB_DATA_MEM_2             199 /* used in special build in 5.1 */
 

--- 1.99/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2007-06-05 17:43:54 +02:00
+++ 1.100/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2007-06-12 10:35:19 +02:00
@@ -1314,6 +1314,18 @@
     STR_VALUE(MAX_INT_RNIL) },
 
   { 
+    CFG_DB_MAX_ALLOCATE,
+    "MaxAllocate",
+    DB_TOKEN,
+    "Maximum size of allocation to use when allocating memory for tables",
+    ConfigInfo::CI_USED,
+    false,
+    ConfigInfo::CI_INT,
+    "32M",
+    "1M",
+    "1G" },
+
+  { 
     CFG_DB_MEMREPORT_FREQUENCY,
     "MemReportFrequency",
     DB_TOKEN,

--- 1.62/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2007-05-14 10:34:20 +02:00
+++ 1.63/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2007-06-12 10:35:19 +02:00
@@ -2618,6 +2618,7 @@
 
   ArrayPool<Page> c_page_pool;
   Uint32 cnoOfAllocatedPages;
+  Uint32 m_max_allocate_pages;
   
   Tablerec *tablerec;
   Uint32 cnoOfTablerec;

--- 1.38/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp	2007-05-14 10:34:20 +02:00
+++ 1.39/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp	2007-06-12 10:35:19 +02:00
@@ -308,6 +308,12 @@
   Uint32 noOfTriggers= 0;
   
   Uint32 tmp= 0;
+
+  if (ndb_mgm_get_int_parameter(p, CFG_DB_MAX_ALLOCATE, &tmp))
+    tmp = 32 * 1024 * 1024;
+  m_max_allocate_pages = (tmp + GLOBAL_PAGE_SIZE - 1) / GLOBAL_PAGE_SIZE;
+
+  tmp = 0;
   ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_TUP_PAGE_RANGE, &tmp));
   initPageRangeSize(tmp);
   ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_TUP_TABLE, &cnoOfTablerec));

--- 1.12/storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp	2007-04-26 13:41:31 +02:00
+++ 1.13/storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp	2007-06-12 10:35:19 +02:00
@@ -434,6 +434,11 @@
 // We will grow by 18.75% plus two more additional pages to grow
 // a little bit quicker in the beginning.
 /* -----------------------------------------------------------------*/
+
+  if (noAllocPages > m_max_allocate_pages)
+  {
+    noAllocPages = m_max_allocate_pages;
+  }
   Uint32 allocated = allocFragPages(regFragPtr, noAllocPages);
   regFragPtr->noOfPagesToGrow += allocated;
 }//Dbtup::allocMoreFragPages()
Thread
bk commit into 5.1 tree (tomas:1.2494) BUG#29044tomas12 Jun