RECOVER: When we pull databases during recovery, we used to reallocate the databuffer...
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Fri, 25 May 2012 02:27:59 +0000 (12:27 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Fri, 25 May 2012 02:34:06 +0000 (12:34 +1000)
commite7d21834ae3b514210ced5f71de5d8fb4ae74b95
tree2ad0cf12f97f5a0996c6e7e8e22792f76304026e
parent7d9acaeb3700e28617e514cd61d00660b035fffb
RECOVER: When we pull databases during recovery, we used to reallocate the databuffer for each entry added. This would normally not be an issue, but for cases where memory is fragmented, this could start to cost significant cpu if we need to reallocate and move to a different region.

Change this to instead preallocate , by default, 10MByte chunks to the data buffer.
This significantly reduces the number of potential reallocate and move  operations that may be required.

Create a tunable to override/change how much preallocation should be used.

(This used to be ctdb commit 1f262deaad0818f159f9c68330f7fec121679023)
ctdb/include/ctdb_private.h
ctdb/server/ctdb_recover.c
ctdb/server/ctdb_recoverd.c
ctdb/server/ctdb_tunables.c