![]() |
MySQL 26.7.0
Source Code Documentation
|
physical_capacity (total size on disk except tmp files) | +- *2/LOG_N_FILES | ("snake's head&tail cages") | +- *FREE_RATIO ("the snake's body") | +- OVERHEAD | (space which shouldn't be used for deltas) | | | +- (LOG_N_FILES - 1) * LOG_FILE_HDR_SIZE | | (file headers in cages with snake's body) | | | +- LOG_EXTRA_SAFETY_MARGIN | (just in case) | +- lsn_capacity (space to use for deltas) | +- next_file_earlier_margin | ("snake's tongue" - we want to never need more than LOG_N_FILES-1) | +- hard_logical_capacity (this is how log writer sees the capacity) | +- *LOG_EXTRA_WRITER_MARGIN_PCT/100 | (log writer's private workspace to pull of "desperate rescue") | +- soft_logical_capacity (this is how threads other than log writer see the capacity) | +- free_check_margin | (it's "reserved" - you may write to it, if you did reservation) | | | +- concurrency_margin | (space jointly reserved by threads in wait_for_space) | | | +- margin_per_thread * max_threads | | | +- LOG_FILES_DUMMY_INTAKE_SIZE | | (dummy intake which might be required during redo resize) | | | +- LOG_EXTRA_CONC_MARGIN_PCT / 100.0 * soft_logical_capacity | (just in case) | +- log_free_check_capacity (if redo is this long threads should wait in wait_for_space)
More...
#include <cmath>#include "arch0arch.h"#include "log0files_capacity.h"#include "log0log.h"#include "log0sys.h"#include "log0test.h"#include "log0types.h"#include "srv0conc.h"#include "srv0mon.h"#include "srv0start.h"#include "ut0byte.h"physical_capacity (total size on disk except tmp files) | +- *2/LOG_N_FILES | ("snake's head&tail cages") | +- *FREE_RATIO ("the snake's body") | +- OVERHEAD | (space which shouldn't be used for deltas) | | | +- (LOG_N_FILES - 1) * LOG_FILE_HDR_SIZE | | (file headers in cages with snake's body) | | | +- LOG_EXTRA_SAFETY_MARGIN | (just in case) | +- lsn_capacity (space to use for deltas) | +- next_file_earlier_margin | ("snake's tongue" - we want to never need more than LOG_N_FILES-1) | +- hard_logical_capacity (this is how log writer sees the capacity) | +- *LOG_EXTRA_WRITER_MARGIN_PCT/100 | (log writer's private workspace to pull of "desperate rescue") | +- soft_logical_capacity (this is how threads other than log writer see the capacity) | +- free_check_margin | (it's "reserved" - you may write to it, if you did reservation) | | | +- concurrency_margin | (space jointly reserved by threads in wait_for_space) | | | +- margin_per_thread * max_threads | | | +- LOG_FILES_DUMMY_INTAKE_SIZE | | (dummy intake which might be required during redo resize) | | | +- LOG_EXTRA_CONC_MARGIN_PCT / 100.0 * soft_logical_capacity | (just in case) | +- log_free_check_capacity (if redo is this long threads should wait in wait_for_space)