1

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?

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 Jan 9 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 Jan 10 at 1:40

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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