Skip to content

Commit 65933d9

Browse files
docs: recommend InnoDB over MEMORY engine for Boost tables
Large installations and those using the multiprocessing update feature (introduced in 1.2.17) are susceptible to race conditions and lock contention when using MEMORY engine. InnoDB with SSD/NVMe storage is now the default recommendation. Also fix: - 'formally' -> 'formerly' - duplicate 'the the' - 'Utilityes' -> 'Utilities' - invalid two-table ALTER TABLE SQL (comma-separated table list) Closes #106 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
1 parent ed4c330 commit 65933d9

1 file changed

Lines changed: 31 additions & 18 deletions

File tree

Boost.md

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Summary
44

5-
Cacti Performance Settings, formally known as `boost` are available to support
5+
Cacti Performance Settings, formerly known as `boost` are available to support
66
very large Cacti installations, and are required for supporting the multiple
77
**Data Collector** architecture that Cacti affords.
88

9-
Designed years ago, Boosts intent was to reduce the the main data collectors
9+
Designed years ago, Boosts intent was to reduce the main data collectors
1010
cycle time by caching writes to disk, and those writes would be handled by an
1111
out of band process currently known as `poller_boost.php`.
1212

@@ -31,12 +31,21 @@ on demand by the Cacti Administrator. They include:
3131

3232
## Prerequisites
3333

34+
> **Recommendation**: For most installations, especially those using the
35+
> **multiprocessing update** feature introduced in Cacti 1.2.17, or any
36+
> deployment with multiple Data Collectors, use **InnoDB** for all Boost tables.
37+
> The MEMORY engine can cause race conditions between concurrent processes
38+
> competing for memory table locks, which leads to polling backlogs and data
39+
> loss on busy systems. InnoDB with SSD or NVMe storage performs comparably and
40+
> avoids these failure modes. MEMORY tables are also incompatible with MariaDB
41+
> Galera and MySQL replication.
42+
3443
In its initial design the Boost process leveraged MySQL Memory Tables to
35-
increase overall performance, and to reduce writing data to disk. This is still
36-
a valid case however, with improvements in InnoDB performance over the years
37-
combined with Flash storage, the need for using MySQL Memory Tables has
38-
diminished. In some cases, for example when using MariaDB Galera, or MySQL
39-
Master/Slave replication, it can not be used.
44+
increase overall performance, and to reduce writing data to disk. With
45+
improvements in InnoDB performance over the years combined with Flash storage,
46+
the need for MySQL Memory Tables has diminished. The sections below document
47+
MEMORY table sizing for sites that have an explicit reason to use it, but InnoDB
48+
is the default and recommended engine.
4049

4150
If you do wish to use Memory you have to pay close attention to the amount of
4251
data that will be cached in your design. You should periodically check that you
@@ -61,7 +70,7 @@ important. That will be explained in more detail later on in this chapter.
6170
## Checking how your system is configured
6271

6372
To see how your system is configured, you can goto
64-
`Console > Utilityes > System Utilities > View Boost Status` option, when you go
73+
`Console > Utilities > System Utilities > View Boost Status` option, when you go
6574
there, you will see an image similar to that below.
6675

6776
![Boost Status Screen](images/boost-status1.png)
@@ -123,13 +132,13 @@ The next step would me to modify the structure of your `poller_output` and
123132
`poller_output_boost` tables. You would do this by doing the following:
124133

125134
```sql
126-
ALTER TABLE poller_output,
127-
MODIFY column output varchar(50) NOT NULL default ""
128-
ENGINE=memory;
135+
ALTER TABLE poller_output
136+
MODIFY COLUMN output varchar(50) NOT NULL DEFAULT '',
137+
ENGINE = MEMORY;
129138

130-
ALTER TABLE poller_output_boost,
131-
MODIFY column output varchar(50) NOT NULL default ""
132-
ENGINE=memory;
139+
ALTER TABLE poller_output_boost
140+
MODIFY COLUMN output varchar(50) NOT NULL DEFAULT '',
141+
ENGINE = MEMORY;
133142
```
134143

135144
As previously mentioned, its also important that the `poller_output` table is
@@ -178,10 +187,14 @@ Then, save the file, and restart MySQL. Once this is done, you are ready to
178187

179188
## Flushing the Boost Cache
180189

181-
If you are planning on system maintenance if you are using MEMORY storage in
182-
MySQL or MariaDB, you should flush your Boost Cache before your system is taken
183-
offline for maintenance. To do this, you simply login to the Cacti system as
184-
root, and flush the Cache using the commands below
190+
> **Warning**: MEMORY tables are cleared on every MySQL/MariaDB restart. If you
191+
> are using MEMORY storage, always flush the Boost Cache before taking the
192+
> database offline. Failure to do so will result in loss of all buffered poller
193+
> data since the last flush.
194+
195+
If you are planning on system maintenance and are using MEMORY storage in
196+
MySQL or MariaDB, flush your Boost Cache before the system is taken offline.
197+
Login to the Cacti system as root and run the following:
185198

186199
```console
187200
cd /var/www/html/cacti

0 commit comments

Comments
 (0)