|
NAMEGenezzo::SpaceMan::SMExtent.pm - Extent Space ManagementSYNOPSISDESCRIPTIONThis module contains the space management hooks for Genezzo::Block::RDBlock basic block operations. Any insert/update/delete operation which modifies a block might change the space usage. All minor changes are reflected in the local block XHP (eXtent Header Position) record. Any changes greater than ~30% are reflected in the extent header XHA (eXtent Header _A_), which has a bitvec to track every block in the extent. Larger changes must propagate to the segment header (or subheader) X1A (eXtent FIRST _A_), which tracks space usage for every extent in the segment.Space management must balance efficient space usage against update costs/concurrency issues. Frequently updating the extent headers and segment headers provides more accurate information on actual block usage, but these blocks become a point of contention when multiple updates are running simultaneously. If the extent and segment headers are updated infrequently, space managment might allocate new extents unnecessarily because it doesn't know that free space is still available, or worst-case, it may attempt to re-use blocks which are already full. The basic pushhash (see Genezzo::PushHash::hph routines are designed to be robust if an operation runs out of space, so this situation is not insurmountable. Need hooks to update segment header. Allocating space without updating the segment header is fine, since the operation to obtain new free blocks can view the list of extents with free blocks in the segment header, and then it can probe the extent headers to check if space is still available. The converse problem is that deletes may free up blocks or even entire extents, and this information must get back to the segment header so it knows that space is available. At minimum, an operation which causes an extent to transition from full to at least one block free should update the segment header. FUNCTIONS
EXPORTTODO
AUTHORJeffrey I. Cohen, jcohen@genezzo.comSEE ALSOGenezzo::Block::RDBlock, perl(1).Copyright (c) 2006, 2007 Jeffrey I Cohen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Address bug reports and comments to: jcohen@genezzo.com For more information, please visit the Genezzo homepage at <http://www.genezzo.com>
Visit the GSP FreeBSD Man Page Interface. |