The actual disk space used by the ibdata file in MySQL is going to depend on how you set the server, however, I can tell you that FVM shouldn’t be adding and then deleting data under normal circunstances.
It periodically deletes some data, but it’s to prevent growing the table beyond a reasonable limit.
For wp_fvm_cache the limit is 20k rows, and for the wp_fvm_logs the limit is 500 rows. The plugin will delete rows above this count.
The wp_fvm_logs are only created when you do a manual cache purge, mostly, so they increase but not so frequently.
The wp_fvm_cache increases whenever it sees a different css or js file, so as I said earlier, if there is a dynamic css or js url (the query string changes on each pageview for example)… it’s going to keep increasing.
If the wp_fvm_cache table is increasing the row count for every pageview, then you need to exclude that file, else it’s not efficient.
You can convert wp_fvm_logs and wp_fvm_cache to MySAM too, though it will affect performance when inserting data, because it will block the table instead of the row.
Removing FVM might mitigate the database storage issue, but check if indeed the two tables are increasing rapidly to those limits. If they are not, then data would not be deleted.
It would be more likely some transients used somewhere else (theme, plugins, code…) since those are meant to be created and deleted frequently.
If the issue is with regular wordpress transients, then adding a Redis Object Cache plugin will help you move them out of MySQL (transients will not write to wp_options anymore).
—
For MariaDB, you could try to switch to Percona DB and see if it makes a difference. It’s not the first time I’ve seen performance issues on MariaDB that don’t happen with Percona… but it’s still going to depend on the settings.
Take a look at these settings and see what you can do:
innodb_file_per_table
:
- When set to
1
, this option stores each InnoDB table’s data and indexes in its own file (.ibd
file) instead of the shared ibdata1
file. This makes it easier to reclaim space at the table level. It’s typically recommended for most use cases.
innodb_page_size
:
- This setting determines the page size for InnoDB tablespaces. The default is 16KB, but it can be set to 4KB, 8KB, or 64KB depending on your workload and hardware. Smaller page sizes can reduce waste when dealing with lots of small rows but can increase overhead.
innodb_buffer_pool_size
:
- This setting controls the size of the buffer pool, where InnoDB caches data and indexes. A larger buffer pool can reduce I/O by keeping more data in memory, but it won’t directly affect disk space usage.
innodb_autoextend_increment
:
- This variable sets the increment size (in MB) for extending the size of an InnoDB data file when it’s full. A larger increment can reduce the frequency of file extensions but might lead to more unused space.
innodb_optimize_fulltext_only
:
- When set to
1
, OPTIMIZE TABLE
statements only optimize InnoDB full-text search indexes. This is relevant if you’re using full-text search and want to optimize those indexes without fully rebuilding the table.
innodb_file_format
:
- This setting determines the file format for InnoDB tables. In MariaDB 10.3 and later, the default and recommended value is
Barracuda
, which supports features like table compression.
innodb_flush_method
:
- This setting affects how InnoDB flushes data to disk. While it doesn’t directly impact space reclaiming, it can influence I/O performance and efficiency.
innodb_log_file_size
and innodb_log_files_in_group
:
- These settings control the size and number of log files in the InnoDB redo log. Proper sizing is important for performance but doesn’t directly impact space usage.
These are generic recommendations though, so good luck investigating that.