Performance Issue – Excessive Cache Entity Insert Statements


We’ve been experiencing performance issues on our Drupal 8 site where the TTFB is extremely slow (60+ seconds). After installing Devel and reviewing the WebProfiler, we noticed that there are several pages which have hundreds of the following INSERT statement:

INSERT INTO cache_entity (cid, expire, created, tags, checksum, data, serialized) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6) ON DUPLICATE KEY UPDATE cid = VALUES(cid), expire = VALUES(expire), created = VALUES(created), tags = VALUES(tags), checksum = VALUES(checksum), data = VALUES(data), serialized = VALUES(serialized)

There are 100+ of these statements which take 10-20ms each. 

We inherited this application, so we are unfamiliar as to when and why this was installed. Where can this be disabled or at least configured to be more efficient?

Please let me know if there is any additional information that can be provided.


Drupal version: