I migrated to drupal 8 and now it has 760 blocks. I plan at least to triple this number. Blocks are placed into nodes content with Insert Block module. When I was setting up website the database was 200 mb, now when cache is not cleared it's 2gb+. There are two tables 1gb each.

At the moment when I save or edit block structure it takes 10 seconds to save it. CPU is't at 100, so website is working fine so far, but I'm worried that it might break down due to very large cache tables.

What do you think I should do to save performance other then stop adding blocks?

  • Additional information request. Post on pastebin.com and share the links. A) complete (not edited) my.cnf or my.ini From SSH root login, Text results of: B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; E) complete MySQLTuner report AND Optional very helpful information, if available includes - htop OR top OR mytop for most active apps, ulimit -a for a linux/unix list of limits, iostat -xm 5 3 for IOPS by device and core/cpu count, for server workload tuning analysis to provide suggestions. Commented Oct 27, 2019 at 22:26

1 Answer 1


From a capabilities and code perspective, there is no practical limit to the number of entities in a system (blocks, nodes, users). drupal.org is a good example of this; it has tons of users and nodes on it.

That doesn't preclude needing to properly scale out the rest of the system. This is particularly important in a Drupal 8 system, where caching is used extensively. One of the most overlooked aspects of this is properly tuning the database.

Out of the box, MySQL can have some bad default parameters. MySQLTuner can provide some guidance on how to adjust your system, particularly the buffer size. If your cache tables get large, I/O from them can slow down when they are hitting disk.

When you get to the point where you need to squeeze more performance out of a tuned site or if you are memory limited for proper tuning, you may want to consider a non-database caching solution like memcache or Redis. These can really help with large systems.

  • Will block structure saving time increase more as I'll be increasing number of blocks?
    – Andy Core
    Commented Jan 9, 2019 at 14:50
  • @AndyCore On its own, saving a block should not cause a noticeable increase with a properly tuned database. Hooks that run may cause some increase if they have to loop over all blocks. A side effect, though, of saving is the cache invalidations that happen. When the invalidated entries are needed, they will be rebuilt and then recached. This is why periodic tuning and re-evaluating non-database caches is needed to maintain proper site health.
    – mpdonadio
    Commented Jan 10, 2019 at 1:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.